View source: R/helperFunctions.R
semPower.getDf | R Documentation |
Determines the degrees of freedom of a given model provided as lavaan
model string. This only returns the regular df and does not account for approaches using scaled df.
This requires the lavaan
package.
semPower.getDf(lavModel, nGroups = NULL, group.equal = NULL)
lavModel |
the |
nGroups |
for multigroup models: the number of groups. |
group.equal |
for multigroup models: vector defining the type(s) of cross-group equality constraints following the |
Returns the df of the model.
## Not run:
lavModel <- '
f1 =~ x1 + x2 + x3 + x4
f2 =~ x5 + x6 + x7 + x8
f3 =~ y1 + y2 + y3
f3 ~ f1 + f2
'
semPower.getDf(lavModel)
# multigroup version
semPower.getDf(lavModel, nGroups = 3)
semPower.getDf(lavModel, nGroups = 3, group.equal = c('loadings'))
semPower.getDf(lavModel, nGroups = 3, group.equal = c('loadings', 'intercepts'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.