
Last chance! 50% off unlimited learning
Sale ends in
ctCI Computes confidence intervals on specified parameters / matrices for already fitted ctsem fit object.
ctCI(ctfitobj, confidenceintervals, optimizer = "NPSOL", verbose = 0)
Already fit ctsem fit object (class: ctsemFit) to estimate confidence intervals for.
character vector of matrices and or parameters for which to estimate 95% confidence intervals for.
character vector. Defaults to NPSOL (recommended), but other optimizers available within OpenMx (e.g. 'CSOLNP') may be specified.
Integer between 0 and 3 reflecting amount of output while calculating.
ctfitobj, with confidence intervals included.
Confidence intervals typically estimate more reliably using the proprietary NPSOL optimizer available within OpenMx only when
installing directly from OpenMx website. Use command " source('http://openmx.psyc.virginia.edu/getOpenMx.R') " to install OpenMx with NPSOL.
If estimating for a multigroup model, specify confidence intervals as normal, e.g. confidenceintervals = c('DRIFT', 'diffusion_Y1_Y1')
.
The necessary group prefixes are added internally.
# NOT RUN {
## Examples set to 'donttest' because they take longer than 5s.
# }
# NOT RUN {
data("ctExample3")
model <- ctModel(n.latent = 1, n.manifest = 3, Tpoints = 100,
LAMBDA = matrix(c(1, "lambda2", "lambda3"), nrow = 3, ncol = 1),
MANIFESTMEANS = matrix(c(0, "manifestmean2", "manifestmean3"), nrow = 3,
ncol = 1))
fit <- ctFit(dat = ctExample3, ctmodelobj = model, objective = "Kalman",
stationary = c("T0VAR"))
fit <- ctCI(fit, confidenceintervals = 'DRIFT')
summary(fit)$omxsummary$CI
# }
Run the code above in your browser using DataLab