getModelFitness {stablespec} | R Documentation |
Scoring the given SEM models.
Description
Compute the model chi-square
and model complexity
of the given SEM models.
Usage
getModelFitness(theData = NULL, allModelString = NULL, numTime = NULL,
longitudinal = NULL, co = NULL, mixture = NULL)
Arguments
theData |
a data frame containing the data to which the model is to
be fit. If parameter |
allModelString |
|
numTime |
number of time slices. If the data is cross-sectional, this argument must be set to 1. |
longitudinal |
|
co |
whether to use |
mixture |
if the data contains both continuous and
categorical (or ordinal) variables, this argument can be set
to |
Value
a matrix
of models including their fitness':
chi-square
and model complexity.
Author(s)
Ridho Rahmadi r.rahmadi@cs.ru.nl
Examples
the_data <- crossdata6V
#assummed that variable 5 does not cause variables 1, 2, and 3
models <- modelPop(nPop=5, numVar=6, longitudinal=FALSE,
consMatrix = matrix(c(5, 1, 5, 2, 5, 3), 3, 2, byrow=TRUE))
model_fitness <- getModelFitness(theData=the_data,
allModelString=models, numTime=1, longitudinal=FALSE,
co="covariance", mixture = FALSE)