Skip to content
Prev 319300 / 398506 Next

Bootstrap BCa confidence limits with your own resamples

Dear Frank,

I'm not sure that it will help, but you might look at the bootSem() function
in the sem package, which creates objects that inherit from "boot". Here's
an artificial example:

---------- snip ----------

library(sem)
for (x in names(CNES)) CNES[[x]] <- as.numeric(CNES[[x]])
model.cnes <- specifyModel()
F -> MBSA2, lam1
F -> MBSA7, lam2
F -> MBSA8, lam3
F -> MBSA9, lam4
F <-> F, NA, 1
MBSA2 <-> MBSA2, the1
MBSA7 <-> MBSA7, the2
MBSA8 <-> MBSA8, the3
MBSA9 <-> MBSA9, the4

sem.cnes <- sem(model.cnes, data=CNES)
summary(sem.cnes)

set.seed(12345) # for reproducibility
system.time(boot.cnes <- bootSem(sem.cnes, R=5000))
class(boot.cnes)
boot.ci(boot.cnes)

---------- snip ----------

I hope this helps,
 John