没有合适的资源?快使用搜索试试~ 我知道了~
首页Mplus 8用户指南:第15章 数据、变量与定义命令详解
Mplus 8用户指南:第15章 数据、变量与定义命令详解
需积分: 14 3 下载量 63 浏览量
更新于2024-07-16
收藏 452KB PDF 举报
第15章 "标题、数据、变量和定义命令"(TITLE, DATA, VARIABLE, AND DEFINE Commands)是Mplus 8 用户手册中的核心章节,它详尽地介绍了进行统计分析时至关重要的基础步骤。首先,TITLE 命令用于为整个分析设定一个标题,提供对分析内容的简洁概述。它的通用格式是:TITLE: title_for_the_analysis,允许用户自由输入标题,但需避免使用Mplus本身的命令词汇(如title、data等)作为标题,除非它们后面跟有冒号。 DATA 命令则是数据输入的关键,它向Mplus程序提供了要分析的数据集的相关信息,包括数据源、变量类型、缺失值处理等。这一步骤对于确保分析基于准确的数据基础至关重要。 VARIABLE 命令则详述了数据集中要分析的变量,包括变量的名称、变量类型(连续、分类、顺序)、可能的测量层次(如指标或因子),以及任何预处理或编码步骤。理解并正确定义变量是构建有效模型的基础。 DEFINE 命令在这一章中扮演着核心角色,它允许用户对现有变量进行转换,创建新的变量或者定义复杂的数学表达式,这对于模型构建中的变量操作和预处理至关重要。通过DEFINE命令,研究人员能够根据分析需求定制变量的表示形式,以便更好地适应特定的统计模型。 这部分内容强调了在Mplus中组织和准备数据的重要性,因为正确的标题、数据和变量定义直接决定了分析的准确性和可读性。掌握这些命令不仅有助于新用户快速上手,也对经验丰富的用户进行模型优化和复杂分析提供了指导。本章内容对于任何使用Mplus进行统计分析的人员来说都是必不可少的参考资料。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/12243322/bgf.jpg)
TITLE, DATA, VARIABLE, And DEFINE Commands
577
IMPUTE = y1-y4 u1-u4 (c) x1 x2;
where values will be imputed for the continuous variables y1, y2, y3, y4,
x1, and x2 and the categorical variables u1, u2, u3, and u4.
The IMPUTE option has an alternative specification that is convenient
when there are several variables that cannot be specified using the list
function. When c in parentheses follows the equal sign, it means that c
applies to all of the variables that follow. For example, the following
IMPUTE statement specifies that the variables x1, x3, x5, x7, and x9 are
categorical:
IMPUTE = (c) x1 x3 x5 x7 x9;
The keyword ALL can be used to indicate that values are to be imputed
for all variables in the dataset. The ALL option can be used with the c
setting, for example,
IMPUTE = ALL (c);
indicates that all of the variables in the data set are categorical.
NDATASETS
The NDATASETS option is used to specify the number of imputed data
sets to create. The default is five. Following is an example of how to
specify the NDATASETS option:
NDATASETS = 20;
where 20 is the number of imputed data sets that will be created. The
default for the NDATASETS option is 5.
SAVE
The SAVE option is used to save the imputed data sets for subsequent
analysis using TYPE=IMPUTATION in the DATA command. It is
specified as follows:
SAVE = impute*.dat;
![](https://csdnimg.cn/release/download_crawler_static/12243322/bg10.jpg)
CHAPTER 15
578
where the asterisk (*) is replaced by the number of the imputed data set.
A file is also produced that contains the names of all of the data sets. To
name this file, the asterisk (*) is replaced by the word list.
FORMAT
The FORMAT option is used to specify the format in which the imputed
data will be saved. All dependent and independent variables used in the
analysis are saved. In addition, all other variables that are used in
conjunction with the analysis are saved as well as any variables specified
using the AUXILIARY option of the VARIABLE command. The names
of the data sets along with the names of the variables saved and the
format are printed in the output. The default is to save the analysis
variables using a fixed format.
Following is an example of how to specify the FORMAT option to save
imputed data in a free format:
FORMAT IS FREE;
Imputed data can also be saved in a fixed format specified by the user.
The user has the choice of which F or E format the analysis variables are
saved in with the format of other saved variables determined by the
program. This option is specified as:
FORMAT IS F2.0;
which indicates that all analysis variables will be saved with an F2.0
format.
MODEL
The MODEL option is used to specify the type of unrestricted H1 model
to use for imputation (Asparouhov & Muthén, 2010b). The MODEL
option has three settings: COVARIANCE, SEQUENTIAL, and
REGRESSION. The default is COVARIANCE. The COVARIANCE
setting uses a model of unrestricted means, variances, and covariances
for a set of continuous variables. The SEQUENTIAL setting uses a
sequential regression method also referred to as the chained equations
algorithm in line with Raghunathan et al. (2001). The REGRESSION
![](https://csdnimg.cn/release/download_crawler_static/12243322/bg11.jpg)
TITLE, DATA, VARIABLE, And DEFINE Commands
579
setting uses a model where variables with missing data are regressed on
variables without missing data (Asparouhov & Muthén, 2010b). To
request the sequential regression method, specify:
MODEL = SEQUENTIAL;
VALUES
The VALUES option is used to provide the values for continuous
variables that the imputed data can take. The default is to put no
restrictions on the values that the imputed data can take. The values
must be integers. For example, four five-category variables not declared
as categorical can be restricted to take on only the values of one through
five by specifying:
VALUES = y1-y4 (1-5);
The closest value to the imputed value is used. If the imputed value is
2.7, the value 3 will be used.
ROUNDING
The ROUNDING option is used to specify the number of decimals that
imputed continuous variables will have. The default is three. To request
that five decimals be used, specify:
ROUNDING = y1-y10 (5);
The value zero is used to specify no decimals, that is, integer values.
THIN
The THIN option is used to specify which intervals in the draws from
the posterior distribution are used for imputed values. The default is to
use every 100
th
iteration. To request that every 200
th
iteration be used,
specify:
THIN = 200;
![](https://csdnimg.cn/release/download_crawler_static/12243322/bg12.jpg)
CHAPTER 15
580
THE DATA TRANSFORMATION COMMANDS
There are six DATA transformation commands. They are used to
rearrange data from a wide to long format, to rearrange data from a long
to wide format, to create a binary and a continuous variable from a
semicontinuous variable, to create a set of binary variables that are
indicators of missing data for another set of variables, to create variables
for discrete-time survival modeling where a binary variable represents
the occurrence of a single non-repeatable event, and to rearrange
longitudinal data from a format where time points represent
measurement occasions to a format where time points represent age or
another time-related variable. The DATA transformation commands are
executed after the statements in the DEFINE command that come before
the CLUSTER_MEAN, CENTER, and STANDARDIZE options of the
DEFINE command. The CLUSTER_MEAN, CENTER, and
STANDARDIZE options are then executed in the order mentioned
followed by the execution of any statements that follow them.
THE DATA WIDETOLONG COMMAND
In growth modeling an outcome measured at four time points can be
represented in a data set in two ways. In the wide format, the outcome is
represented as four variables on a single record. In the long format, the
outcome is represented as a single variable using four records, one for
each time point. The DATA WIDETOLONG command is used to
rearrange data from a multivariate wide format to a univariate long
format.
When the data are rearranged, the set of outcomes is given a new
variable name and ID and repetition variables are created. These new
variable names must be placed on the USEVARIABLES statement of
the VARIABLE command if they are used in the analysis. They must be
placed after any original variables. If the ID variable is used as a cluster
variable, this must be specified using the CLUSTER option of the
VARIABLE command.
The creation of the new variables in the DATA WIDETOLONG
command occurs after any transformations in the DEFINE command and
any of the other DATA transformation commands. If listwise deletion is
剩余87页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/618226157a8a4b12bbb3098a6c4fc51c_jlzhangyi.jpg!1)
jlzhangyi
- 粉丝: 6
- 资源: 55
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 解决本地连接丢失无法上网的问题
- BIOS报警声音解析:故障原因与解决方法
- 广义均值移动跟踪算法在视频目标跟踪中的应用研究
- C++Builder快捷键大全:高效编程的秘密武器
- 网页制作入门:常用代码详解
- TX2440A开发板网络远程监控系统移植教程:易搭建与通用解决方案
- WebLogic10虚拟内存配置详解与优化技巧
- C#网络编程深度解析:Socket基础与应用
- 掌握Struts1:Java MVC轻量级框架详解
- 20个必备CSS代码段提升Web开发效率
- CSS样式大全:字体、文本、列表样式详解
- Proteus元件库大全:从基础到高级组件
- 74HC08芯片:高速CMOS四输入与门详细资料
- C#获取当前路径的多种方法详解
- 修复MySQL乱码问题:设置字符集为GB2312
- C语言的诞生与演进:从汇编到系统编程的革命
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)