sem.aic {piecewiseSEM} | R Documentation |
AIC for piecewiseSEM (old)
sem.aic(modelList, data, corr.errors = NULL, add.vars = NULL, grouping.vars = NULL, grouping.fun = mean, adjust.p = FALSE, basis.set = NULL, pvalues.df = NULL, model.control = NULL, .progressBar = TRUE)
modelList |
a |
data |
a |
corr.errors |
a vector of variables with correlated errors (separated by "~~") |
add.vars |
a vector of additional variables whose independence claims should be evaluated, but which do not appear in the model list |
grouping.vars |
an optional variable that represents the levels of data aggregation for a multi-level dataset |
grouping.fun |
a function defining how variables are aggregated in |
adjust.p |
whether p-values degrees of freedom should be adjusted. Default is |
basis.set |
provide an optional basis set |
pvalues.df |
an optional |
model.control |
a |
.progressBar |
enable optional text progress bar. Default is |
This function calculates AIC and AICc (corrected for small sample sizes) values for a piecewise structural equation model (SEM).
For linear mixed effects models, p-values can be adjusted to accommodate the full model degrees of freedom
using the argument p.adjust = TRUE
. For more information, see Shipley 2013.
Returns a data.frame
where the first entry is the AIC score, and the second is
the AICc score, and the third is the likelihood degrees of freedom (K)