“Mplus CFA Example 5.1”的版本间的差异

来自OBHRM百科
跳转至: 导航搜索
第27行: 第27行:
 
|widthb=20%
 
|widthb=20%
 
|syntax=
 
|syntax=
Mplus VERSION 7.4
+
Mplus VERSION 7.4<br>MUTHEN & MUTHEN<br>02/28/2017  10:53 AM<br><br>INPUT INSTRUCTIONS<br><br>  TITLE:     this is an example of a CFA with  ! 这是标题,总共两行内容,第一行<br>          continuous factor indicators;      ! 第二行,想要多少行,就写多少行<br>  DATA:  FILE IS ex5.1.dat;                ! 读取数据文件,请确保文件名正确,另外文件的路<br>  VARIABLE: NAMES ARE y1-y6;                  ! 读取数据,该数据文件中包括6个变量的数据,变<br>  MODEL:     f1 BY y1-y3;                      ! 定义第1个因素,该因素的测量指标有:y1,y2,y<br>          f2 BY y4-y6;                      ! 定义第2个因素,该因素的测量指标有:y4,y5,y6<br><br><br><br>*** WARNING<br>  Input line exceeded 90 characters. Some input may be truncated.<br>  DATA:  FILE IS ex5.1.dat;                ! 读取数据文件,请确保文件名正确,另外文件的路?<br>*** WARNING<br>  Input line exceeded 90 characters. Some input may be truncated.<br>  VARIABLE: NAMES ARE y1-y6;                  ! 读取数据,该数据文件中包括6个变量的数据,变?<br>*** WARNING<br>  Input line exceeded 90 characters. Some input may be truncated.<br>  MODEL:     f1 BY y1-y3;                      ! 定义第1个因素,该因素的测量指标有:y1,y2,y3<br>  3 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS<br><br><br><br>this is an example of a CFA with<br>continuous factor indicators;      ! 第二行,想要多少行,就写多少行<br><br>SUMMARY OF ANALYSIS<br><br>Number of groups                                                1<br>Number of observations                                        500<br><br>Number of dependent variables                                    6<br>Number of independent variables                                  0<br>Number of continuous latent variables                            2<br><br>Observed dependent variables<br><br>  Continuous<br>   Y1          Y2          Y3          Y4          Y5          Y6<br><br>Continuous latent variables<br>  F1          F2<br><br><br>Estimator                                                      ML<br>Information matrix                                        OBSERVED<br>Maximum number of iterations                                  1000<br>Convergence criterion                                    0.500D-04<br>Maximum number of steepest descent iterations                  20<br><br>Input data file(s)<br>  ex5.1.dat<br><br>Input data format  FREE<br><br><br><br>THE MODEL ESTIMATION TERMINATED NORMALLY<br><br><br><br>MODEL FIT INFORMATION<br><br>Number of Free Parameters                      19<br><br>Loglikelihood<br><br>          H0 Value                      -4906.609<br>          H1 Value                      -4904.661<br><br>Information Criteria<br><br>          Akaike (AIC)                    9851.218<br>          Bayesian (BIC)                  9931.295<br>          Sample-Size Adjusted BIC        9870.988<br>            (n* = (n + 2) / 24)<br><br>Chi-Square Test of Model Fit<br><br>          Value                              3.896<br>          Degrees of Freedom                    8<br>          P-Value                          0.8664<br><br>RMSEA (Root Mean Square Error Of Approximation)<br><br>          Estimate                          0.000<br>          90 Percent C.I.                    0.000  0.027<br>          Probability RMSEA <= .05          0.995<br><br>CFI/TLI<br><br>          CFI                                1.000<br>          TLI                                1.013<br><br>Chi-Square Test of Model Fit for the Baseline Model<br><br>          Value                            596.921<br>          Degrees of Freedom                    15<br>          P-Value                          0.0000<br><br>SRMR (Standardized Root Mean Square Residual)<br><br>          Value                              0.014<br><br><br><br>MODEL RESULTS<br><br>                                                    Two-Tailed<br>                    Estimate      S.E.  Est./S.E.    P-Value<br><br> F1      BY<br>    Y1                1.000      0.000    999.000    999.000<br>    Y2                1.126      0.099    11.368      0.000<br>    Y3                1.019      0.089    11.482      0.000<br><br> F2      BY<br>    Y4                1.000      0.000    999.000    999.000<br>    Y5                1.059      0.129      8.199      0.000<br>    Y6                0.897      0.105      8.531      0.000<br><br> F2      WITH<br>    F1                -0.030      0.052    -0.582      0.560<br><br> Intercepts<br>    Y1                -0.022      0.063    -0.354      0.723<br>    Y2                0.026      0.062      0.410      0.682<br>    Y3                0.035      0.062      0.555      0.579<br>    Y4                -0.022      0.064    -0.350      0.726<br>    Y5                -0.016      0.058    -0.271      0.786<br>    Y6                0.048      0.058      0.824      0.410<br><br> Variances<br>    F1                0.907      0.125      7.254      0.000<br>    F2                0.760      0.133      5.734      0.000<br><br> Residual Variances<br>    Y1                1.064      0.096    11.120      0.000<br>    Y2                0.798      0.100      7.972      0.000<br>    Y3                1.010      0.095    10.597      0.000<br>    Y4                1.290      0.119    10.871      0.000<br>    Y5                0.854      0.111      7.710      0.000<br>    Y6                1.066      0.097    11.024      0.000<br><br><br>QUALITY OF NUMERICAL RESULTS<br><br>    Condition Number for the Information Matrix              0.409E-01<br>      (ratio of smallest to largest eigenvalue)<br><br><br>DIAGRAM INFORMATION<br><br>  Use View Diagram under the Diagram menu in the Mplus Editor to view the diagram.<br>  If running Mplus from the Mplus Diagrammer, the diagram opens automatically.<br><br>  Diagram output<br>    c:\program files\mplus\mplus examples\user's guide examples\ex5.1.dgm<br><br>    Beginning Time:  10:53:53<br>        Ending Time:  10:53:53<br>      Elapsed Time:  00:00:00<br><br><br><br>MUTHEN & MUTHEN<br>3463 Stoner Ave.<br>Los Angeles, CA  90066<br><br>Tel: (310) 391-9971<br>Fax: (310) 391-8971<br>Web: www.StatModel.com<br>Support: Support@StatModel.com<br><br>Copyright (c) 1998-2015 Muthen & Muthen<br>
MUTHEN & MUTHEN
 
02/28/2017  10:53 AM
 
 
 
INPUT INSTRUCTIONS
 
 
 
  TITLE:     this is an example of a CFA with  ! 这是标题,总共两行内容,第一行
 
          continuous factor indicators;      ! 第二行,想要多少行,就写多少行
 
  DATA:  FILE IS ex5.1.dat;                ! 读取数据文件,请确保文件名正确,另外文件的路
 
  VARIABLE: NAMES ARE y1-y6;                  ! 读取数据,该数据文件中包括6个变量的数据,变
 
  MODEL:     f1 BY y1-y3;                      ! 定义第1个因素,该因素的测量指标有:y1,y2,y
 
          f2 BY y4-y6;                      ! 定义第2个因素,该因素的测量指标有:y4,y5,y6
 
 
 
 
 
 
 
*** WARNING
 
  Input line exceeded 90 characters. Some input may be truncated.
 
  DATA:  FILE IS ex5.1.dat;                ! 读取数据文件,请确保文件名正确,另外文件的路?
 
*** WARNING
 
  Input line exceeded 90 characters. Some input may be truncated.
 
  VARIABLE: NAMES ARE y1-y6;                  ! 读取数据,该数据文件中包括6个变量的数据,变?
 
*** WARNING
 
  Input line exceeded 90 characters. Some input may be truncated.
 
  MODEL:     f1 BY y1-y3;                      ! 定义第1个因素,该因素的测量指标有:y1,y2,y3
 
  3 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS
 
 
 
 
 
 
 
this is an example of a CFA with
 
continuous factor indicators;      ! 第二行,想要多少行,就写多少行
 
 
 
SUMMARY OF ANALYSIS
 
 
 
Number of groups                                                1
 
Number of observations                                        500
 
 
 
Number of dependent variables                                    6
 
Number of independent variables                                  0
 
Number of continuous latent variables                            2
 
 
 
Observed dependent variables
 
 
 
   Continuous
 
  Y1          Y2          Y3          Y4          Y5          Y6
 
 
 
Continuous latent variables
 
  F1          F2
 
 
 
 
 
Estimator                                                      ML
 
Information matrix                                        OBSERVED
 
Maximum number of iterations                                  1000
 
Convergence criterion                                    0.500D-04
 
Maximum number of steepest descent iterations                  20
 
 
 
Input data file(s)
 
  ex5.1.dat
 
 
 
Input data format  FREE
 
 
 
 
 
 
 
THE MODEL ESTIMATION TERMINATED NORMALLY
 
 
 
 
 
 
 
MODEL FIT INFORMATION
 
 
 
Number of Free Parameters                      19
 
 
 
Loglikelihood
 
 
 
          H0 Value                      -4906.609
 
          H1 Value                      -4904.661
 
 
 
Information Criteria
 
 
 
          Akaike (AIC)                    9851.218
 
          Bayesian (BIC)                  9931.295
 
          Sample-Size Adjusted BIC        9870.988
 
            (n* = (n + 2) / 24)
 
 
 
Chi-Square Test of Model Fit
 
 
 
          Value                              3.896
 
          Degrees of Freedom                    8
 
          P-Value                          0.8664
 
 
 
RMSEA (Root Mean Square Error Of Approximation)
 
 
 
          Estimate                          0.000
 
          90 Percent C.I.                    0.000  0.027
 
          Probability RMSEA <= .05          0.995
 
 
 
CFI/TLI
 
 
 
          CFI                                1.000
 
          TLI                                1.013
 
 
 
Chi-Square Test of Model Fit for the Baseline Model
 
 
 
          Value                            596.921
 
          Degrees of Freedom                    15
 
          P-Value                          0.0000
 
 
 
SRMR (Standardized Root Mean Square Residual)
 
 
 
          Value                              0.014
 
 
 
 
 
 
 
MODEL RESULTS
 
 
 
                                                    Two-Tailed
 
                    Estimate      S.E.  Est./S.E.    P-Value
 
 
 
F1      BY
 
    Y1                1.000      0.000    999.000    999.000
 
    Y2                1.126      0.099    11.368      0.000
 
    Y3                1.019      0.089    11.482      0.000
 
 
 
F2      BY
 
    Y4                1.000      0.000    999.000    999.000
 
    Y5                1.059      0.129      8.199      0.000
 
    Y6                0.897      0.105      8.531      0.000
 
 
 
F2      WITH
 
    F1                -0.030      0.052    -0.582      0.560
 
 
 
Intercepts
 
    Y1                -0.022      0.063    -0.354      0.723
 
    Y2                0.026      0.062      0.410      0.682
 
    Y3                0.035      0.062      0.555      0.579
 
    Y4                -0.022      0.064    -0.350      0.726
 
    Y5                -0.016      0.058    -0.271      0.786
 
    Y6                0.048      0.058      0.824      0.410
 
 
 
Variances
 
    F1                0.907      0.125      7.254      0.000
 
    F2                0.760      0.133      5.734      0.000
 
 
 
Residual Variances
 
    Y1                1.064      0.096    11.120      0.000
 
    Y2                0.798      0.100      7.972      0.000
 
    Y3                1.010      0.095    10.597      0.000
 
    Y4                1.290      0.119    10.871      0.000
 
    Y5                0.854      0.111      7.710      0.000
 
    Y6                1.066      0.097    11.024      0.000
 
 
 
 
 
QUALITY OF NUMERICAL RESULTS
 
 
 
    Condition Number for the Information Matrix              0.409E-01
 
      (ratio of smallest to largest eigenvalue)
 
 
 
 
 
DIAGRAM INFORMATION
 
 
 
  Use View Diagram under the Diagram menu in the Mplus Editor to view the diagram.
 
  If running Mplus from the Mplus Diagrammer, the diagram opens automatically.
 
 
 
  Diagram output
 
    c:\program files\mplus\mplus examples\user's guide examples\ex5.1.dgm
 
 
 
    Beginning Time:  10:53:53
 
        Ending Time:  10:53:53
 
      Elapsed Time:  00:00:00
 
 
 
 
 
 
 
MUTHEN & MUTHEN
 
3463 Stoner Ave.
 
Los Angeles, CA  90066
 
 
 
Tel: (310) 391-9971
 
Fax: (310) 391-8971
 
Web: www.StatModel.com
 
Support: Support@StatModel.com
 
 
 
Copyright (c) 1998-2015 Muthen & Muthen
 
 
|comment=
 
|comment=
 
<nowiki>!</nowiki>这是标题,总共两行内容,第一行<br>
 
<nowiki>!</nowiki>这是标题,总共两行内容,第一行<br>

2017年2月28日 (二) 11:10的版本

示意图

代码与注释

Mplus代码 注释
TITLE: this is an example of a CFA with

continuous factor indicators;
DATA: FILE IS ex5.1.dat;
VARIABLE: NAMES ARE y1-y6;
MODEL: f1 BY y1-y3;
f2 BY y4-y6;

!这是标题,总共两行内容,第一行

!第二行,想要多少行,就写多少行
!读取数据文件,请确保文件名正确,另外文件的路径应该与对应的分析程序(本文件)在同一目录下;或者标明绝对路径,比如:c:\mplus\ex5.1.dat。
!读取数据,该数据文件中包括6个变量的数据,变量名称可以自己定。比如,可以是y1-y6,也可以是item1-item6
!定义第1个因素,该因素的测量指标有:y1,y2,y3,具体根据上面的变量名来定。如果上面写的是item1-item6,这个地方修改为:item1-item3,请注意-为英文的-
!定义第2个因素,该因素的测量指标有:y4,y5,y6,具体根据上面的变量名来定。如果上面写的是item1-item6,这个地方修改为:item4-item6,请注意-为英文的-


结果

Mplus代码 注释
Mplus VERSION 7.4
MUTHEN & MUTHEN
02/28/2017 10:53 AM

INPUT INSTRUCTIONS

TITLE: this is an example of a CFA with  ! 这是标题,总共两行内容,第一行
continuous factor indicators;  ! 第二行,想要多少行,就写多少行
DATA: FILE IS ex5.1.dat;  ! 读取数据文件,请确保文件名正确,另外文件的路
VARIABLE: NAMES ARE y1-y6;  ! 读取数据,该数据文件中包括6个变量的数据,变
MODEL: f1 BY y1-y3;  ! 定义第1个因素,该因素的测量指标有:y1,y2,y
f2 BY y4-y6;  ! 定义第2个因素,该因素的测量指标有:y4,y5,y6



*** WARNING
Input line exceeded 90 characters. Some input may be truncated.
DATA: FILE IS ex5.1.dat;  ! 读取数据文件,请确保文件名正确,另外文件的路?
*** WARNING
Input line exceeded 90 characters. Some input may be truncated.
VARIABLE: NAMES ARE y1-y6;  ! 读取数据,该数据文件中包括6个变量的数据,变?
*** WARNING
Input line exceeded 90 characters. Some input may be truncated.
MODEL: f1 BY y1-y3;  ! 定义第1个因素,该因素的测量指标有:y1,y2,y3
3 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS



this is an example of a CFA with
continuous factor indicators;  ! 第二行,想要多少行,就写多少行

SUMMARY OF ANALYSIS

Number of groups 1
Number of observations 500

Number of dependent variables 6
Number of independent variables 0
Number of continuous latent variables 2

Observed dependent variables

Continuous
Y1 Y2 Y3 Y4 Y5 Y6

Continuous latent variables
F1 F2


Estimator ML
Information matrix OBSERVED
Maximum number of iterations 1000
Convergence criterion 0.500D-04
Maximum number of steepest descent iterations 20

Input data file(s)
ex5.1.dat

Input data format FREE



THE MODEL ESTIMATION TERMINATED NORMALLY



MODEL FIT INFORMATION

Number of Free Parameters 19

Loglikelihood

H0 Value -4906.609
H1 Value -4904.661

Information Criteria

Akaike (AIC) 9851.218
Bayesian (BIC) 9931.295
Sample-Size Adjusted BIC 9870.988
(n* = (n + 2) / 24)

Chi-Square Test of Model Fit

Value 3.896
Degrees of Freedom 8
P-Value 0.8664

RMSEA (Root Mean Square Error Of Approximation)

Estimate 0.000
90 Percent C.I. 0.000 0.027
Probability RMSEA <= .05 0.995

CFI/TLI

CFI 1.000
TLI 1.013

Chi-Square Test of Model Fit for the Baseline Model

Value 596.921
Degrees of Freedom 15
P-Value 0.0000

SRMR (Standardized Root Mean Square Residual)

Value 0.014



MODEL RESULTS

Two-Tailed
Estimate S.E. Est./S.E. P-Value

F1 BY
Y1 1.000 0.000 999.000 999.000
Y2 1.126 0.099 11.368 0.000
Y3 1.019 0.089 11.482 0.000

F2 BY
Y4 1.000 0.000 999.000 999.000
Y5 1.059 0.129 8.199 0.000
Y6 0.897 0.105 8.531 0.000

F2 WITH
F1 -0.030 0.052 -0.582 0.560

Intercepts
Y1 -0.022 0.063 -0.354 0.723
Y2 0.026 0.062 0.410 0.682
Y3 0.035 0.062 0.555 0.579
Y4 -0.022 0.064 -0.350 0.726
Y5 -0.016 0.058 -0.271 0.786
Y6 0.048 0.058 0.824 0.410

Variances
F1 0.907 0.125 7.254 0.000
F2 0.760 0.133 5.734 0.000

Residual Variances
Y1 1.064 0.096 11.120 0.000
Y2 0.798 0.100 7.972 0.000
Y3 1.010 0.095 10.597 0.000
Y4 1.290 0.119 10.871 0.000
Y5 0.854 0.111 7.710 0.000
Y6 1.066 0.097 11.024 0.000


QUALITY OF NUMERICAL RESULTS

Condition Number for the Information Matrix 0.409E-01
(ratio of smallest to largest eigenvalue)


DIAGRAM INFORMATION

Use View Diagram under the Diagram menu in the Mplus Editor to view the diagram.
If running Mplus from the Mplus Diagrammer, the diagram opens automatically.

Diagram output
c:\program files\mplus\mplus examples\user's guide examples\ex5.1.dgm

Beginning Time: 10:53:53
Ending Time: 10:53:53
Elapsed Time: 00:00:00



MUTHEN & MUTHEN
3463 Stoner Ave.
Los Angeles, CA 90066

Tel: (310) 391-9971
Fax: (310) 391-8971
Web: www.StatModel.com
Support: Support@StatModel.com

Copyright (c) 1998-2015 Muthen & Muthen
!这是标题,总共两行内容,第一行

!第二行,想要多少行,就写多少行
!读取数据文件,请确保文件名正确,另外文件的路径应该与对应的分析程序(本文件)在同一目录下;或者标明绝对路径,比如:c:\mplus\ex5.1.dat。
!读取数据,该数据文件中包括6个变量的数据,变量名称可以自己定。比如,可以是y1-y6,也可以是item1-item6
!定义第1个因素,该因素的测量指标有:y1,y2,y3,具体根据上面的变量名来定。如果上面写的是item1-item6,这个地方修改为:item1-item3,请注意-为英文的-
!定义第2个因素,该因素的测量指标有:y4,y5,y6,具体根据上面的变量名来定。如果上面写的是item1-item6,这个地方修改为:item4-item6,请注意-为英文的-