emxGrowthModel {EasyMx} | R Documentation |
Create a latent growth curve model
Description
This function creates a latent growth curve model as an MxModel object.
Usage
emxGrowthModel(model, data, name, run=FALSE, identification, use, ordinal, times)
emxModelGrowth(model, data, name, run=FALSE, identification, use, ordinal, times)
Arguments
model |
character or numeric. See Details. |
data |
data used for the model |
name |
character. Optional name of the model created. |
run |
logical. Whether to run the model before returning. |
identification |
Not yet implemented. How the model is identified. Currently ignored. |
use |
character vector. The names of the variables to use. |
ordinal |
character vector. The names of the ordinal variables. |
times |
optional character or numeric vector. Either the numeric times of measurement or the names of the variables in |
Details
The model
argument can be either a character or a number that tells the kind of growth curve to make. If it is a character it currently must be one of "Intercept", "Linear", "Quadratic", "Cubic", "Quartic", or "Quintic", and it produces a polynomial growth curve of the corresponding type. If it is a number, the function produces a polynomial growth curve of the corresponding order. Zero is an intercept only, one is linear, two is quadratic; and so on.
When missing, the times
are assumed to start at zero and increment by one until the number of variables is completed.
Value
An MxModel
See Also
emxFactorModel, emxGrowthModel
Examples
# Example
require(EasyMx)
data(myLongitudinalData)
## Not run:
mod <- emxGrowthModel('Linear', data=myLongitudinalData, use=names(myLongitudinalData), run=TRUE)
## End(Not run)