Hi Christian,
Thank you very much for providing the example.
I have updated the x.boot.r and I have ran your code and I was to able successfully run your code using the HolzingerSwineford1939 data.
I then proceeded with my data, which is ordinal, and regrettably it did not seem to work:
> summary(
+ x.boot.out(HS.boot, myFUN = highRel, myArgs = list(higher = "higher"), ci.type = "bc")
+ )
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'object' in selecting a method for function 'summary': unused argument (object = new("lavaan", version = "0.6.12", call = lavaan(slotOptions = lavoptions, slotParTable = lavpartable, slotSampleStats = bootSampleStats, slotData = lavdata, slotModel = model.boot), timing = list(0, 0, 0, 0, 0, 0.0200000000186265, 0, 0, 0, 0, 0, 0, 0.42000000004191, 0, 0, 0.0200000000186265, 0.0399999999208376, 0, 0.0500000000465661, 0, 0.550000000046566), Options = list("cfa", "lavaan", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, "", FALSE, "delta", FALSE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, "geomin", "bordered", list(FALSE, "none", TRUE, 0.001, 1, 0, 0, numeric(0), numeric(0), 100, "gpa", TRUE, "index", 1e-05, 1e-08, FALSE, FALSE, TRUE, 10000), FALSE, "listwise", "total", FALSE, TRUE, FALSE, "default", character(0), character(0), FALSE, NULL, "DWLS", list(), "default", "default", "LISREL", TRUE, "none", "robust.sem", "scaled.shifted", c
Called from: h(simpleError(msg, call))
This is my model:
Measurement2ndOrder.cfa <- '
# Experience
Experience =~ Exp1 + Exp2 + Exp3 + Exp4 + Exp5 + Exp6
# Service Quality
Tangibility =~ SQTang1 + SQTang2 + SQTang3
Responsiveness =~ SQResp1 + SQResp2 + SQResp3
Consumables =~ SQCons1 + SQCons2 + SQCons3
Communication =~ SQCom1 + SQCom2+ SQCom3
# Perceptions Safety Precautions
SafetyPerception =~ Saf1 + Saf2 + Saf3 + Saf4 + Saf5 + Saf6 + Saf7 + Saf8
higher =~ Tangibility + Responsiveness + Consumables + Communication + SafetyPerception
'
This is how I have fitted the model:
Measurement2ndOrder.fit <- cfa(Measurement2ndOrder.cfa,
TsetNorm,
ordered = c(
"Exp1", "Exp2", "Exp3", "Exp4", "Exp5", "Exp6",
"SQTang1", "SQTang2", "SQTang3",
"SQResp1", "SQResp2", "SQResp3",
"SQCons1", "SQCons2", "SQCons3",
"SQCom1", "SQCom2", "SQCom3",
"Saf1", "Saf2", "Saf3", "Saf4", "Saf5", "Saf6", "Saf7", "Saf8"
),
std.lv=TRUE,
estimator = "WLSMV"
)
I use this following code:
HS.boot <- x.boot(Measurement2ndOrder.fit, R = 80, verbose = TRUE) # low amount of draws for testing
#code works, no errors
summary(
x.boot.out(HS.boot, myFUN = highRel, myArgs = list(higher = "higher"), ci.type = "bc")
)
# get error
Hope this information is helpful to you.
Best,
Adriaan