50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


MIIVsem (version 0.4.6)

miive: Model-implied instrumental variable (MIIV) estimation

Description

Estimate SEM models using model-implied instrumental variables (MIIVs).

Usage

miive(model = model, data = NULL, overid = NULL, varcov = NULL,
  print.miivs = FALSE, bootstrap.se = NULL, instruments = NULL,
  cov = NULL, means = NULL, N = NULL)

Arguments

model
A model specified using lavaan model syntax. See the model argument within the lavaanify function for more information.
data
A data frame, list or environment or an object coercible by as.data.frame to data frame.
overid
A user-specified degree of overidentification (overid). See Example 3 below.
varcov
Option for estimating conditional variance and coavariance paramaters. Default is NULL.
print.miivs
A logical indicating whether or not to display MIIVs in output.
bootstrap.se
Option "pairs" or "residual" for obtaining bootstrap standard errors, t-tests, and bootstrap P values. Default is NULL.
instruments
A user-supplied list of valid MIIVs for each equation. See Example 2 below.
cov
A named numeric matrix. Default is NULL.
means
A sample mean vector. Default is NULL.
N
Numeric. The number of observations in the sample. Default is NULL.

Value

  • model

    dat

    modeeqns

Details

  • overid
{If the user-specified degree of overidentification (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 {Using the 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 {Currently, only "ML" and "ULS" fitting functions are supported through the lavaan package.} bootstrap.se {Currently, only "pairs" and "residual" unrestricted bootstrap are implemented using 999 bootstrap repititions.} Equality Constraints Users can specify equality constraints directly using labels in the model syntax. See Example 4 below.

References

Bollen, K. A. 1996. An Alternative 2SLS Estimator for Latent Variable Models. Psychometrika, 61, 109-121.

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.

Examples

Run this code
# 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