Last chance! 50% off unlimited learning
Sale ends in
miive(model = model, data = NULL, overid = NULL, varcov = NULL,
print.miivs = FALSE, bootstrap.se = NULL, instruments = NULL,
cov = NULL, means = NULL, N = NULL)
model
argument within the lavaanify
function for more information.overid
). See Example 3 below.NULL
."pairs"
or "residual"
for obtaining bootstrap standard errors, t-tests, and bootstrap P values. Default is NULL
.NULL
.NULL
.NULL
.dat
modeeqns
overid
overid
) exceeds the number of available MIIVs for a given equation, the maximum number of MIIVs will be used instead. In this case, the df
column for any equations in which the degrees of freedom for the Sargan
test are less than the overid
value will be appended with an *
. A note will also be displayed to alert the user to the changes. In the example below, the overid
parameter is set to 2, however the y1
equation has only 1 additional MIIV avaialable.}
instruments
instruments
option you can specify the MIIVs directly for each equation in the model. To utilize this option you must first define a list of instruments using the syntax displayed below. After the list is defined, set the instruments
argument equal to the name of the list of MIIVs. Note, instruments
are specified for an equation, and not for a specific endogenous variable.}
varcov
"ML"
and "ULS"
fitting functions are supported through the lavaan
package.}
bootstrap.se
"pairs"
and "residual"
unrestricted bootstrap are implemented using 999 bootstrap repititions.}
Bollen, K. A. 2001. Two-stage Least Squares and Latent Variable Models: Simultaneous Estimation and Robustness to Misspecifications. In R. Cudeck, S. Du Toit, and D. Sorbom (Eds.), Structural Equation Modeling: Present and Future, A Festschrift in Honor of Karl Joreskog (pp. 119-138). Lincoln, IL: Scientific Software.
# Example 1
bollen1989a_model <- '
Eta1 =~ y1 + y2 + y3 + y4
Eta2 =~ y5 + y6 + y7 + y8
Xi1 =~ x1 + x2 + x3
Eta1 ~ Xi1
Eta2 ~ Xi1
Eta2 ~ Eta1
y1 ~~ y5
y2 ~~ y4
y2 ~~ y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8
'
miive(model = bollen1989a_model, data = bollen1989a)
# Example 2
my_instruments <- '
y1 ~ x2 + x3
y5 ~ y2 + y3 + y4 + x2
y2 ~ y3 + y7 + y8 + x2
y3 ~ y2 + y4 + y6 + y8
y4 ~ y3 + y6
y6 ~ y3 + y4 + y7 + x2
y7 ~ y2 + y4 + y6 + y8
y8 ~ y2 + y3 + y7 + x2
x2 ~ y1 + y5 + y2 + y3 + y4 + y6
x3 ~ y1 + y5 + y2 + y3 + y4 + y6
'
miive(model = bollen1989a_model, data = bollen1989a,
instruments = my_instruments)
# Example 3
miive(model = bollen1989a_model, data = bollen1989a, overid = 2)
# Example 4
bollen1989a_model_r <- '
Eta1 =~ y1 + l2*y2 + l3*y3 + l4*y4
Eta2 =~ y5 + l2*y6 + l3*y7 + l4*y8
Xi1 =~ x1 + x2 + l1*x3
Eta1 ~ Xi1
Eta2 ~ Xi1
Eta2 ~ Eta1
y1 ~~ y5
y2 ~~ y4
y2 ~~ y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8
# Equality Constraints
l1 == 0.5
l2 == l2
l3 == l3
l4 == l4
'
miive(model = bollen1989a_model_r, data = bollen1989a)
Run the code above in your browser using DataLab