Learn R Programming

ctsem (version 2.9.6)

plot.ctsemFitMeasure: Misspecification plot using ctCheckFit output

Description

Misspecification plot using ctCheckFit output

Usage

# S3 method for ctsemFitMeasure
plot(x, indices = "all", means = TRUE,
  separatemeans = TRUE, cov = TRUE, covtype = "MisspecRatio",
  cov2cor = FALSE, ggcorrArgs = list(data = NULL, cor_matrix =
  get(covtype), limits = limits, geom = "circle", max_size = 10, name =
  covtype), ...)

Arguments

x

Object output from ctsemFitMeasure function.

indices

Either 'all' or a vector of integers denoting which observations to include (from 1 to n.manifest * maximum number of obs for a subject, blocked by manifest).

means

Logical -- plot simulated means vs observed?

separatemeans

Logical -- means from different variables on same or different plots?

cov

Logical -- plot simulated cov vs observed?

covtype

Column name of cstemFitMeasure object

cov2cor

Logical -- convert covariances to correlations?

ggcorrArgs

List of arguments to GGally::ggcorr .

...

not used.

Value

Nothing, just plots.

Examples

Run this code
# 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=50)
plot(check)


scheck <- ctCheckFit(ctstantestfit,niter=500)
plot(scheck)

# }

Run the code above in your browser using DataLab