estimate_h0 | R Documentation |
modsem
modelsEstimates a baseline model (H0) from a given model (H1). The baseline model is estimated by removing all interaction terms from the model.
estimate_h0(object, warn_no_interaction = TRUE, ...)
## S3 method for class 'modsem_da'
estimate_h0(object, warn_no_interaction = TRUE, ...)
## S3 method for class 'modsem_pi'
estimate_h0(object, warn_no_interaction = TRUE, reduced = TRUE, ...)
object |
An object of class |
warn_no_interaction |
Logical. If 'TRUE', a warning is issued if no interaction terms are found in the model. |
... |
Additional arguments passed to the 'modsem_da' function, overriding the arguments in the original model. |
reduced |
Should the baseline model be a reduced version of the model?
If |
estimate_h0(modsem_da)
: Estimate baseline model for modsem_da
objects
estimate_h0(modsem_pi)
: Estimate baseline model for modsem_pi
objects
## Not run:
m1 <- "
# Outer Model
X =~ x1 + x2 + x3
Y =~ y1 + y2 + y3
Z =~ z1 + z2 + z3
# Inner model
Y ~ X + Z + X:Z
"
# LMS approach
est_h1 <- modsem(m1, oneInt, "lms")
est_h0 <- estimate_h0(est_h1, calc.se=FALSE) # std.errors are not needed
compare_fit(est_h1 = est_h1, est_h0 = est_h0)
# Double centering approach
est_h1 <- modsem(m1, oneInt, method = "dblcent")
est_h0 <- estimate_h0(est_h1, oneInt)
compare_fit(est_h1 = est_h1, est_h0 = est_h0)
# Constrained approach
est_h1 <- modsem(m1, oneInt, method = "ca")
est_h0 <- estimate_h0(est_h1, oneInt)
compare_fit(est_h1 = est_h1, est_h0 = est_h0)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.