## Not run:
# dat1 <- HolzingerSwineford1939
# dat1$x5 <- ifelse(dat1$x1 <= quantile(dat1$x1, .3), NA, dat1$x5)
# dat1$x9 <- ifelse(is.na(dat1$x5), NA, dat1$x9)
#
# targetModel <- "
# visual =~ x1 + x2 + x3
# textual =~ x4 + x5 + x6
# speed =~ x7 + x8 + x9
# "
# targetFit <- sem(targetModel, dat1, meanstructure = TRUE, std.lv = TRUE,
# missing = "fiml", group = "school")
# summary(targetFit, fit = TRUE, standardized = TRUE)
#
# # The number of bootstrap samples should be much higher.
# temp <- bsBootMiss(targetFit, transformation = 1, nBoot = 10, seed = 31415)
#
# temp
# summary(temp)
# hist(temp)
# hist(temp, printLegend = FALSE) # suppress the legend
# ## user can specify alpha level (default: alpha = 0.05), and the number of
# ## digits to display (default: nd = 2). Pass other arguments to hist(...),
# ## or a list of arguments to legend() via "legendArgs"
# hist(temp, alpha = .01, nd = 3, xlab = "something else", breaks = 25,
# legendArgs = list("bottomleft", box.lty = 2))
# ## End(Not run)
Run the code above in your browser using DataLab