paramExtract {MplusAutomation} | R Documentation |
Extract parameters from a data frame of Mplus estimates
Description
This is a simple convenience function designed to facilitate
looking at specific parameter types by easily return a subset
of a data frame with those types only. It is designed to follow up
the results returned from the readModels
function.
Usage
paramExtract(
x,
params = c("regression", "loading", "undirected", "expectation", "variability", "new")
)
Arguments
x |
A data frame (specifically the type returned by |
params |
A character string indicating the types of parameters to be returned.
Options currently include ‘regression’, ‘loading’, ‘undirected’,
‘expectation’, ‘variability’, and ‘new’ for new/additional parameters.
Regressions include regression of one variable
|
Value
A subset data frame with the parameters of interest.
Author(s)
Joshua F. Wiley <jwiley.psych@gmail.com>
See Also
Examples
## Not run:
test <- mplusObject(
TITLE = "test the MplusAutomation Package and my Wrapper;",
MODEL = "
mpg ON wt hp;
wt WITH hp;",
usevariables = c("mpg", "wt", "hp"),
rdata = mtcars)
res <- mplusModeler(test, "mtcars.dat", modelout = "model1.inp", run = 1L)
# store just the unstandardized parameters in 'd'
d <- res$results$parameters$unstandardized
# extract just regression parameters
paramExtract(d, "regression")
# extract other types of parameters using shorthand
paramExtract(d, "u")
paramExtract(d, "e")
paramExtract(d, "v")
## End(Not run)