View source: R/outputConstraintTab.R
outputConstraintTab | R Documentation |
outputConstraintTab()
is used to perform a score test for relaxing each
invariance equality constraint between partners in a given dyadic SEM model.
outputConstraintTab(
constrainFit,
filterSig = FALSE,
gtTab = FALSE,
writeTo = NULL,
fileName = NULL
)
constrainFit |
A fitted |
filterSig |
A logical indicating whether to filter for significant constraints (default is |
gtTab |
A logical input indicating whether to generate the output in |
writeTo |
A character string specifying a directory path to where the |
fileName |
A character string specifying a desired base name for the output |
If gtTab = TRUE
and writeTo
is specified, then output will simultaneously be saved as a .rtf
file to the user's specified directory.
If output file is successfully saved, a confirmation message will be printed to the console.
If a file with the same name already exists in the user's chosen directory, it will be overwritten.
A tibble::tibble()
if gtTab = FALSE
(default), or gt::gt()
object if gtTab = TRUE
, with
rows of equality constraints (now with readable param
labels) and test statistic, df, and p for whether constraint worsens model fit.
dvn <- scrapeVarCross(dat = commitmentM, x_order = "sip", x_stem = "sat.g",
x_delim2="_", distinguish_1="f", distinguish_2="m")
sat.resids.script <- scriptCor(dvn, lvname = "Sat",
constr_dy_meas = c("loadings", "intercepts", "residuals"),
constr_dy_struct = "none")
sat.resids.mod <- lavaan::cfa(sat.resids.script, data = commitmentM, std.lv = FALSE,
auto.fix.first= FALSE, meanstructure = TRUE)
outputConstraintTab(sat.resids.mod, filterSig = FALSE,
gtTab = TRUE, writeTo = tempdir(), fileName = "dCFA_Residual")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.