ctCheckFit: Check absolute fit of ctFit or ctStanFit object.

Description Usage Arguments Value Examples

View source: R/ctCheckFit.R

Description

Check absolute fit of ctFit or ctStanFit object.

Usage

1
ctCheckFit(fit, niter = 500, probs = c(0.025, 0.5, 0.975))

Arguments

fit

ctFit or ctStanFit object.

niter

number of data generation iterations to use to calculate quantiles.

probs

3 digit vector of quantiles to return and to test significance.

Value

numeric matrix showing Z score difference for each lower triangular index of the covariance matrix of data – observed covariance minus mean of generated, weighted by sd of generated covariance.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(ctExample1)
traitmodel <- ctModel(n.manifest=2, n.latent=2, Tpoints=6, LAMBDA=diag(2), 
  manifestNames=c('LeisureTime', 'Happiness'), 
  latentNames=c('LeisureTime', 'Happiness'), TRAITVAR="auto")
traitfit <- ctFit(dat=ctExample1, ctmodelobj=traitmodel)

check <- ctCheckFit(traitfit,niter=5)
plot(check)

## End(Not run)

cdriveraus/ctsem documentation built on April 18, 2019, 9:51 a.m.