Model Inputs

# Set Path
  # Note a new directory with all Model information will be created in a directory based on the title of the model (defined below)
  setwd("~/R/DataHouse/Projects/MPlus_In_R")
  path <- getwd()

# DATA
  Simple_model_CBI <- readr::read_csv("Simple model CBI.csv")
  
# Title of Model 
  title <- "Model_1"

# Vars for inclusion in output
  vars <- c("depres0","depres4","depres8","depres12")

#MODEL (starts in the 'VARIABLE:' command)
Mod = #ener mplus between "" & all code must obey Mplus syntax rules 
"
MISSING ARE ALL (999);

USEVARIABLES ARE   
depres0 depres4 depres8 depres12;

MODEL:
id sd  | depres0@-1 depres4@0 depres8@1 depres12@2;

OUTPUT: 
SAMPSTAT;

PLOT:
TYPE IS PLOT3;
SERIES IS depres0(0) depres4(4) depres8(8) depres12(12);
"

Model Output

Mplus VERSION 7  
MUTHEN & MUTHEN  
08/29/2017   5:19 PM  
  
INPUT INSTRUCTIONS  
  
  TITLE: Model_1  
  DATA:  
   FILE = "D:/Documents/R/DataHouse/Projects/MPlus_In_R/Model_1/Model_1.dat";  
  VARIABLE:  
  NAMES = depres0 depres4 depres8 depres12;  
  
  MISSING ARE ALL (999);  
  
  USEVARIABLES ARE  
  depres0 depres4 depres8 depres12;  
  
  MODEL:  
  id sd  | depres0@-1 depres4@0 depres8@1 depres12@2;  
  
  OUTPUT:  
  SAMPSTAT;  
  
  PLOT:  
  TYPE IS PLOT3;  
  SERIES IS depres0(0) depres4(4) depres8(8) depres12(12);  
  
  
  
*** WARNING  
  Data set contains cases with missing on all variables.  
  These cases were not included in the analysis.  
  Number of cases with missing on all variables:  609  
   1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS  
  
  
  
Model_1  
  
SUMMARY OF ANALYSIS  
  
Number of groups                                                 1  
Number of observations                                         774  
  
Number of dependent variables                                    4  
Number of independent variables                                  0  
Number of continuous latent variables                            2  
  
Observed dependent variables  
  
  Continuous  
   DEPRES0     DEPRES4     DEPRES8     DEPRES12  
  
Continuous latent variables  
   ID          SD  
  
  
Estimator                                                       ML  
Information matrix                                        OBSERVED  
Maximum number of iterations                                  1000  
Convergence criterion                                    0.500D-04  
Maximum number of steepest descent iterations                   20  
Maximum number of iterations for H1                           2000  
Convergence criterion for H1                             0.100D-03  
  
Input data file(s)  
  D:/Documents/R/DataHouse/Projects/MPlus_In_R/Model_1/Model_1.dat  
  
Input data format  FREE  
  
  
SUMMARY OF DATA  
  
     Number of missing data patterns            11  
  
  
COVARIANCE COVERAGE OF DATA  
  
Minimum covariance coverage value   0.100  
  
  
     PROPORTION OF DATA PRESENT  
  
  
           Covariance Coverage  
              DEPRES0       DEPRES4       DEPRES8       DEPRES12  
              ________      ________      ________      ________  
 DEPRES0        0.995  
 DEPRES4        0.850         0.854  
 DEPRES8        0.804         0.762         0.807  
 DEPRES12       0.742         0.699         0.700         0.744  
  
  
SAMPLE STATISTICS  
  
  
     ESTIMATED SAMPLE STATISTICS  
  
  
           Means  
              DEPRES0       DEPRES4       DEPRES8       DEPRES12  
              ________      ________      ________      ________  
      1         4.353         3.658         3.384         3.587  
  
  
           Covariances  
              DEPRES0       DEPRES4       DEPRES8       DEPRES12  
              ________      ________      ________      ________  
 DEPRES0       17.236  
 DEPRES4        9.970        16.677  
 DEPRES8        9.236        11.267        16.476  
 DEPRES12       8.335        10.846        12.410        17.503  
  
  
           Correlations  
              DEPRES0       DEPRES4       DEPRES8       DEPRES12  
              ________      ________      ________      ________  
 DEPRES0        1.000  
 DEPRES4        0.588         1.000  
 DEPRES8        0.548         0.680         1.000  
 DEPRES12       0.480         0.635         0.731         1.000  
  
  
     MAXIMUM LOG-LIKELIHOOD VALUE FOR THE UNRESTRICTED (H1) MODEL IS   -6877.337  
  
  
THE MODEL ESTIMATION TERMINATED NORMALLY  
  
  
  
MODEL FIT INFORMATION  
  
Number of Free Parameters                        9  
  
Loglikelihood  
  
          H0 Value                       -6891.630  
          H1 Value                       -6877.337  
  
Information Criteria  
  
          Akaike (AIC)                   13801.260  
          Bayesian (BIC)                 13843.124  
          Sample-Size Adjusted BIC       13814.544  
            (n* = (n + 2) / 24)  
  
Chi-Square Test of Model Fit  
  
          Value                             28.585  
          Degrees of Freedom                     5  
          P-Value                           0.0000  
  
RMSEA (Root Mean Square Error Of Approximation)  
  
          Estimate                           0.078  
          90 Percent C.I.                    0.052  0.107  
          Probability RMSEA <= .05           0.040  
  
CFI/TLI  
  
          CFI                                0.979  
          TLI                                0.975  
  
Chi-Square Test of Model Fit for the Baseline Model  
  
          Value                           1117.299  
          Degrees of Freedom                     6  
          P-Value                           0.0000  
  
SRMR (Standardized Root Mean Square Residual)  
  
          Value                              0.042  
  
  
  
MODEL RESULTS  
  
                                                    Two-Tailed  
                    Estimate       S.E.  Est./S.E.    P-Value  
  
 ID       |  
    DEPRES0            1.000      0.000    999.000    999.000  
    DEPRES4            1.000      0.000    999.000    999.000  
    DEPRES8            1.000      0.000    999.000    999.000  
    DEPRES12           1.000      0.000    999.000    999.000  
  
 SD       |  
    DEPRES0           -1.000      0.000    999.000    999.000  
    DEPRES4            0.000      0.000    999.000    999.000  
    DEPRES8            1.000      0.000    999.000    999.000  
    DEPRES12           2.000      0.000    999.000    999.000  
  
 SD       WITH  
    ID                 0.251      0.202      1.239      0.215  
  
 Means  
    ID                 3.868      0.128     30.255      0.000  
    SD                -0.242      0.055     -4.440      0.000  
  
 Intercepts  
    DEPRES0            0.000      0.000    999.000    999.000  
    DEPRES4            0.000      0.000    999.000    999.000  
    DEPRES8            0.000      0.000    999.000    999.000  
    DEPRES12           0.000      0.000    999.000    999.000  
  
 Variances  
    ID                10.200      0.648     15.747      0.000  
    SD                 0.740      0.142      5.202      0.000  
  
 Residual Variances  
    DEPRES0            7.428      0.688     10.791      0.000  
    DEPRES4            5.830      0.438     13.314      0.000  
    DEPRES8            4.702      0.396     11.869      0.000  
    DEPRES12           3.845      0.599      6.420      0.000  
  
  
QUALITY OF NUMERICAL RESULTS  
  
     Condition Number for the Information Matrix              0.249E-01  
       (ratio of smallest to largest eigenvalue)  
  
  
SAMPLE STATISTICS FOR ESTIMATED FACTOR SCORES  
  
  
     SAMPLE STATISTICS  
  
  
           Means  
              ID            ID_SE         SD            SD_SE  
              ________      ________      ________      ________  
 1              3.868         1.294        -0.242         0.690  
  
  
           Covariances  
              ID            ID_SE         SD            SD_SE  
              ________      ________      ________      ________  
 ID             8.439  
 ID_SE          0.013         0.087  
 SD             0.396         0.003         0.258  
 SD_SE         -0.001         0.019         0.000         0.006  
  
  
           Correlations  
              ID            ID_SE         SD            SD_SE  
              ________      ________      ________      ________  
 ID             1.000  
 ID_SE          0.015         1.000  
 SD             0.269         0.020         1.000  
 SD_SE         -0.005         0.880         0.002         1.000  
  
  
PLOT INFORMATION  
  
The following plots are available:  
  
  Histograms of sample values  
  Histograms of estimated values  
  Scatterplots (sample values, estimated factor scores, estimated values)  
  Sample means  
  Estimated means  
  Sample and estimated means  
  Latent variable distribution plots  
  Observed individual values  
  Estimated individual values  
  
     Beginning Time:  17:19:30  
        Ending Time:  17:19:30  
       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-2012 Muthen & Muthen