Last updated: 2022-06-17

Checks: 6 1

Knit directory: mcfa-fit/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20190507) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 5f09db8. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/display_simulation_code.Rmd

Unstaged changes:
    Modified:   analysis/index.Rmd
    Modified:   code/simulation-code/mcfa_sim_run.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


The following page displays the .txt files used for creating the Mplus files used in the simulation. The page is broken up into two pages

  1. The .txt files used
  2. the .R file used in conjunction with the .txt files
writeLines(readLines("code/simulation-code/mcfa_create_script_datagen.txt"))
[[init]]
iterators = cond;
cond = 1:72;

ssl2#cond = 
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200;

ssl1#cond = 
5 5 5 5 5 5 10 10 10 10 10 10 30 30 30 30 30 30 5 5 5 5 5 5 10 10 10 10 10 10 30 30 30 30 30 30 5 5 5 5 5 5 10 10 10 10 10 10 30 30 30 30 30 30 5 5 5 5 5 5 10 10 10 10 10 10 30 30 30 30 30 30;

nobs#cond = 
150 150 150 150 150 150 300 300 300 300 300 300 900 900 900 900 900 900 250 250 250 250 250 250 500 500 500 500 500 500 1500 1500 1500 1500 1500 1500 500 500 500 500 500 500 1000 1000 1000 1000 1000 1000 3000 3000 3000 3000 3000 3000 1000 1000 1000 1000 1000 1000 2000 2000 2000 2000 2000 2000 6000 6000 6000 6000 6000 6000;

obvarl2#cond = 
.111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1 .111 .111 .43 .43 1 1; 

lvvarl2#cond = 
.111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1 .111 1;

covl2#cond = 
.0333 .3  .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3  .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3  .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3  .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 .0333 .3 ;

t11#cond = 
-1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508 -1.83644 -2.02196 -2.02173 -2.19162 -2.31534 -2.46508;

t21#cond = 
-0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486 -0.64431 -0.70940 -0.70932 -0.76892 -0.81233 -0.86486;

t31#cond = 
0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486 0.64431 0.70940 0.70932 0.76892 0.81233 0.86486;

t41#cond = 
1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508 1.83644 2.02196 2.02173 2.19162 2.31534 2.46508;


t16#cond = 
-2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113 -2.19109 -2.58107 -2.34857 -2.71603 -2.60560 -2.94113;

t26#cond = 
-0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188 -0.76874 -0.90556 -0.82399 -0.95291 -0.91417 -1.03188;

t36#cond = 
0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188 0.76874 0.90556 0.82399 0.95291 0.91417 1.03188;

t46#cond = 
2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113 2.19109 2.58107 2.34857 2.71603 2.60560 2.94113;  

seed#cond = 
62287 35355 87478 40806 61450 65720 17110 52135 32041 23872 32162 80450 3241 86038 78099 93626 71396 90396 81045 11682 45972 66795 72092 136 55507 75378 6119 83869 97232 41411 36990 1050 68473 43117 7127 55484 14590 49090 4650 1736 42132 7200 29716 98264 70910 77652 24438 76096 13799 95528 76721 69387 19567 51239 83224 40565 52881 63832 1403 33902 97879 67100 41851 74102 48190 74144 60499 65280 62754 91193 11380 1521;


filename = condition_[[cond]]_gen.inp;
outputDirectory = Conditions/Condition[[cond]];
[[/init]]

MONTECARLO:
    NAMES are u1-u10;
    GENERATE = u1-u10 (4);
    CATEGORICAL = u1-u10;
    NOBSERVATIONS = [[nobs#cond]];
    NCSIZES = 1;
    CSIZES = [[ssl2#cond]] ([[ssl1#cond]]);
    SEED = [[seed#cond]];
    NREPS = 1;
    REPSAVE = ALL;
    SAVE = mcfa_condition[[cond]]_rep*.dat;

ANALYSIS:   
    TYPE = TWOLEVEL;
    ESTIMATOR = WLSMV;
    PARAMETERIZATION = THETA;

MODEL POPULATION:

    ! LEVEL 1
    %Within%
        ! Measurement Model Specification Level 1
        ! Factor 1
        f1w BY  u1*.6
                u2*.6
            u3*.6
        u4*.6
                u5*.6
                u6*.6;
        ! Factor 2
        f2w BY  u6*.6
                u7*.6
                u8*.6
                u9*.6
                u10*.6;
    ! (Co)Variances
        f1w*1;
        f2w*1;
        f1w WITH f2w*.3;
    ! LEVEL 2
    %Between%
        ! Measurement Model Specification Level 2
        ! Factor 1
        f1b BY  u1*.6
                u2*.6
            u3*.6
            u4*.6
                u5*.6
                u6*.6;
        ! Factor 2
        f2b BY  u6*.6
                u7*.6
                u8*.6
                u9*.6
                u10*.6;
    ! (Co)Variances of latent variables (ICC_lv)
        f1b@[[lvvarl2#cond]];
        f2b@[[lvvarl2#cond]];
        f1b WITH f2b*[[covl2#cond]];
        ! Residual variances of observed variables (ICC_ov)
        u1*[[obvarl2#cond]];
    u2*[[obvarl2#cond]];
    u3*[[obvarl2#cond]];
    u4*[[obvarl2#cond]];
        u5*[[obvarl2#cond]];
    u6*[[obvarl2#cond]];
    u7*[[obvarl2#cond]];
    u8*[[obvarl2#cond]];
        u9*[[obvarl2#cond]];
    u10*[[obvarl2#cond]];
    
    ! Categorical Thresholds
        ! Creates observed unit variance (approx)
    [u1$1*[[t11#cond]]  u1$2*[[t21#cond]]  u1$3*[[t31#cond]]  u1$4*[[t41#cond]]];
    [u2$1*[[t11#cond]]  u2$2*[[t21#cond]]  u2$3*[[t31#cond]]  u2$4*[[t41#cond]]];
    [u3$1*[[t11#cond]]  u3$2*[[t21#cond]]  u3$3*[[t31#cond]]  u3$4*[[t41#cond]]];
    [u4$1*[[t11#cond]]  u4$2*[[t21#cond]]  u4$3*[[t31#cond]]  u4$4*[[t41#cond]]];
        [u5$1*[[t11#cond]]  u5$2*[[t21#cond]]  u5$3*[[t31#cond]]  u5$4*[[t41#cond]]];
    [u6$1*[[t16#cond]]  u6$2*[[t26#cond]]  u6$3*[[t36#cond]]  u6$4*[[t46#cond]]];
    [u7$1*[[t11#cond]]  u7$2*[[t21#cond]]  u7$3*[[t31#cond]]  u7$4*[[t41#cond]]];
    [u8$1*[[t11#cond]]  u8$2*[[t21#cond]]  u8$3*[[t31#cond]]  u8$4*[[t41#cond]]];
        [u9$1*[[t11#cond]]  u9$2*[[t21#cond]]  u9$3*[[t31#cond]]  u9$4*[[t41#cond]]];
    [u10$1*[[t11#cond]]  u10$2*[[t21#cond]]  u10$3*[[t31#cond]]  u10$4*[[t41#cond]]];

Next, the .R file

writeLines(readLines("code/simulation-code/mcfa_sim_run.R"))
# ============================= #
# Padgett ML-CFA Study Models
# ============================= #
# Data Created: 10/15/2018    
# By: R. Noah Padgett           
# ============================= #   
# Conditions 1-72
# ============================= #
library(MplusAutomation)
createModels("mcfa_create_script_datagen.txt")
createModels("createmodels_Spec_CL1_CL2_MLR.txt")
createModels("createmodels_Spec_WL1_CL2_MLR.txt")
createModels("createmodels_Spec_CL1_WL2_MLR.txt")
createModels("createmodels_Spec_WL1_WL2_MLR.txt")

createModels("createmodels_Spec_CL1_CL2_WLSMV.txt")
createModels("createmodels_Spec_WL1_CL2_WLSMV.txt")
createModels("createmodels_Spec_CL1_WL2_WLSMV.txt")
createModels("createmodels_Spec_WL1_WL2_WLSMV.txt")

createModels("createmodels_Spec_CL1_CL2_ULSMV.txt")
createModels("createmodels_Spec_WL1_CL2_ULSMV.txt")
createModels("createmodels_Spec_CL1_WL2_ULSMV.txt")
createModels("createmodels_Spec_WL1_WL2_ULSMV.txt")

# the WLSM was not analyzed
# createModels("createmodels_Spec_CL1_CL2_WLSM.txt")
# createModels("createmodels_Spec_WL1_CL2_WLSM.txt")
# createModels("createmodels_Spec_CL1_WL2_WLSM.txt")
# createModels("createmodels_Spec_WL1_WL2_WLSM.txt")

runModels(recursive = T)

Example of the code for generating the Mplus .inp files

writeLines(readLines("code/simulation-code/createmodels_Spec_CL1_CL2_MLR.txt"))
Warning in readLines("code/simulation-code/createmodels_Spec_CL1_CL2_MLR.txt"):
incomplete final line found on 'code/simulation-code/
createmodels_Spec_CL1_CL2_MLR.txt'
[[init]]
iterators = cond repnum;
cond = 1:72;
repnum = 1;
filename = Spec_CL1_CL2_MLR_condition_[[cond]]_rep_[[repnum]].inp;
outputDirectory = Conditions/Condition[[cond]];
[[/init]]

DATA:   
    FILE IS mcfa_condition[[cond]]_rep[[repnum]].dat;

VARIABLE:
    NAMES = u1-u10 clust; 
    USEVARIABLES = u1-u10;
    CLUSTER = clust;
  
ANALYSIS:   
    TYPE IS TWOLEVEL;
    ESTIMATOR = MLR;

MODEL:

    ! LEVEL 1
    %Within%
        ! Measurement Model Specification Level 1
        f1w BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5)
                u6  (f6a);
        ! Factor 2
        f2w BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1w@1;
        f2w@1;
        f1w WITH f2w ;
        u1-u10;
   ! LEVEL 2
   %Between%
        ! Measurement Model Specification Level 2
        f1b BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5)
                u6  (f6a);
        ! Factor 2
        f2b BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1b ;
        f2b ;
        f1b WITH f2b;
        u1-u10;
    
OUTPUT: 
    SAMPSTAT tech1 standardized;

SAVEDATA:   
    RESULTS are results_spec_CL1_CL2_MLR_condition[[cond]]_rep[[repnum]].dat;
writeLines(readLines("code/simulation-code/createmodels_Spec_CL1_WL2_MLR.txt"))
Warning in readLines("code/simulation-code/createmodels_Spec_CL1_WL2_MLR.txt"):
incomplete final line found on 'code/simulation-code/
createmodels_Spec_CL1_WL2_MLR.txt'
[[init]]
iterators = cond repnum;
cond = 1:72;
repnum = 1;
filename = Spec_CL1_WL2_MLR_condition_[[cond]]_rep_[[repnum]].inp;
outputDirectory = Conditions/Condition[[cond]];
[[/init]]

DATA:   
    FILE IS mcfa_condition[[cond]]_rep[[repnum]].dat;

VARIABLE:
    NAMES = u1-u10 clust; 
    USEVARIABLES = u1-u10 ;
    CLUSTER = clust;
  
ANALYSIS:   
    TYPE IS TWOLEVEL;
    ESTIMATOR = MLR;

MODEL:

    ! LEVEL 1
    %Within%
        ! Measurement Model Specification Level 1
        f1w BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5)
                u6  (f6a);
        ! Factor 2
        f2w BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1w@1;
        f2w@1;
        f1w WITH f2w ;
        u1-u10;
   ! LEVEL 2
   %Between%
        ! Measurement Model Specification Level 2
        f1b BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5);
        ! Factor 2
        f2b BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1b ;
        f2b ;
        f1b WITH f2b;
        u1-u10;
    
OUTPUT: 
    SAMPSTAT tech1 standardized;

SAVEDATA:   
    RESULTS are results_spec_CL1_WL2_MLR_condition[[cond]]_rep[[repnum]].dat;
writeLines(readLines("code/simulation-code/createmodels_Spec_WL1_CL2_MLR.txt"))
Warning in readLines("code/simulation-code/createmodels_Spec_WL1_CL2_MLR.txt"):
incomplete final line found on 'code/simulation-code/
createmodels_Spec_WL1_CL2_MLR.txt'
[[init]]
iterators = cond repnum;
cond = 1:72;
repnum = 1;
filename = Spec_WL1_CL2_MLR_condition_[[cond]]_rep_[[repnum]].inp;
outputDirectory = Conditions/Condition[[cond]];
[[/init]]

DATA:   
    FILE IS mcfa_condition[[cond]]_rep[[repnum]].dat;

VARIABLE:
    NAMES = u1-u10 clust; 
    USEVARIABLES = u1-u10 ;
    CLUSTER = clust;
  
ANALYSIS:   
    TYPE IS TWOLEVEL;
    ESTIMATOR = MLR;

MODEL:

    ! LEVEL 1
    %Within%
        ! Measurement Model Specification Level 1
        f1w BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5);
        ! Factor 2
        f2w BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1w@1;
        f2w@1;
        f1w WITH f2w ;
        u1-u10;
   ! LEVEL 2
   %Between%
        ! Measurement Model Specification Level 2
        f1b BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5)
                u6  (f6a);
        ! Factor 2
        f2b BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1b ;
        f2b ;
        f1b WITH f2b;
        u1-u10;
    
OUTPUT: 
    SAMPSTAT tech1 standardized;

SAVEDATA:   
    RESULTS are results_spec_WL1_CL2_MLR_condition[[cond]]_rep[[repnum]].dat;
writeLines(readLines("code/simulation-code/createmodels_Spec_WL1_WL2_MLR.txt"))
Warning in readLines("code/simulation-code/createmodels_Spec_WL1_WL2_MLR.txt"):
incomplete final line found on 'code/simulation-code/
createmodels_Spec_WL1_WL2_MLR.txt'
[[init]]
iterators = cond repnum;
cond = 1:72;
repnum = 1;
filename = Spec_WL1_WL2_MLR_condition_[[cond]]_rep_[[repnum]].inp;
outputDirectory = Conditions/Condition[[cond]];
[[/init]]

DATA:   
    FILE IS mcfa_condition[[cond]]_rep[[repnum]].dat;

VARIABLE:
    NAMES = u1-u10 clust; 
    USEVARIABLES = u1-u10 ;
    CLUSTER = clust;
  
ANALYSIS:   
    TYPE IS TWOLEVEL;
    ESTIMATOR = MLR;

MODEL:

    ! LEVEL 1
    %Within%
        ! Measurement Model Specification Level 1
        f1w BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5)
;
        ! Factor 2
        f2w BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1w@1;
        f2w@1;
        f1w WITH f2w ;
        u1-u10;
   ! LEVEL 2
   %Between%
        ! Measurement Model Specification Level 2
        f1b BY  u1* (f1)
                u2  (f2)
            u3  (f3)
            u4  (f4)
                u5  (f5);
        ! Factor 2
        f2b BY  u6* (f6b)
                u7  (f7)
                u8  (f8)
                u9  (f9)
                u10 (f10);
    ! (Co)Variances
        f1b ;
        f2b ;
        f1b WITH f2b;
        u1-u10;
    
OUTPUT: 
    SAMPSTAT tech1 standardized;

SAVEDATA:   
    RESULTS are results_spec_WL1_WL2_MLR_condition[[cond]]_rep[[repnum]].dat;

sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] workflowr_1.7.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3     bslib_0.3.1      compiler_4.2.0   pillar_1.7.0    
 [5] later_1.3.0      git2r_0.30.1     jquerylib_0.1.4  tools_4.2.0     
 [9] getPass_0.2-2    digest_0.6.29    jsonlite_1.8.0   evaluate_0.15   
[13] tibble_3.1.7     lifecycle_1.0.1  pkgconfig_2.0.3  rlang_1.0.2     
[17] cli_3.3.0        rstudioapi_0.13  yaml_2.3.5       xfun_0.31       
[21] fastmap_1.1.0    httr_1.4.3       stringr_1.4.0    knitr_1.39      
[25] sass_0.4.1       fs_1.5.2         vctrs_0.4.1      rprojroot_2.0.3 
[29] glue_1.6.2       R6_2.5.1         processx_3.5.3   fansi_1.0.3     
[33] rmarkdown_2.14   callr_3.7.0      magrittr_2.0.3   whisker_0.4     
[37] ps_1.7.0         promises_1.2.0.1 htmltools_0.5.2  ellipsis_0.3.2  
[41] httpuv_1.6.5     utf8_1.2.2       stringi_1.7.6    crayon_1.5.1