Hi,
I ran an EFA model and was able to obtain the summary but not parameters. I keep getting the following error (even after I downloaded the new MplusAutomation version)
NAs introduced by coercionError extracting MODEL RESULTS in output file: efa_e.out
<simpleError in `[<-`(`*tmp*`, r, 1:length(line), value = line): subscript out of bounds>
NULL
The model is below
Thanks so much!
setwd("/Volumes/GoogleDrive/My Drive/Social profiles")
library(MplusAutomation)
library(rhdf5)#not compatible with my R version
p_f[p_f=="NaN"] <- NA
class(p_f)
p_s<-subset(p_f,select=-c(ID))
efa_e <- mplusObject(
TITLE = "TWO-LEVEL EXPLORATORY FACTOR ANALYSIS",
VARIABLE =
"usevar=
dEmpa_1 dEmpa_2 dEmpa_3
;
CLUSTER=id",
ANALYSIS =
"type = twolevel EFA 1 2 UW 1 2 UB;
estimator = MLR;",
MODEL = "" ,
PLOT = "type = plot3;",
OUTPUT = "sampstat standardized residual modindices (3.84);",
usevariables = colnames(p_s),
rdata = p_s)
mplusModeler(efa_e,
hashfilename = FALSE,
modelout = "efa_e.inp",
dataout = "mplusdata.dat",
run = 1L
)
readModels(target = "~/Google Drive/My Drive/Social profiles/efa_e.out")$summaries
#readModels(target = "~/Google Drive/My Drive/Social profiles/efa_e.out")$parameters
readModels("efa_e.out", what="parameters")$parameters$unstandardized