Learn R Programming

lavaan (version 0.5-9)

InformativeTesting: Testing order Constrained Hypotheses in SEM

Description

Testing order constrained Hypotheses in SEM

Usage

InformativeTesting(model = NULL, data, constraints = NULL, 
                   R = NULL, type = "bollen.stine",
                   return.LRT = TRUE, 
                   double.bootstrap = "FDB",
                   double.bootstrap.R = 500L, 
                   double.bootstrap.alpha = 0.05,
                   parallel = c("no", "multicore", "snow"), 
                   ncpus = 1L, cl = NULL, verbose = FALSE, ...)

Arguments

model
Model syntax specifying the model. See model.syntax for more information.
data
The data frame containing the observed variables being used to fit the model.
constraints
The imposed inequality constraints on the model.
R
Integer; number of bootstrap draws. If missing the default value is set to 2000. If double.bootstrap = "standard" the default value, if missing, is set to 1000.
type
If "parametric", the parametric bootstrap is used. If "bollen.stine", the semi-nonparametric Bollen-Stine bootstrap is used. The default is set to "bollen.stine".
return.LRT
Logical; if TRUE, the function returns bootstrapped LRT-values.
double.bootstrap
If "standard" the genuine double bootstrap is used to compute an additional set of plug-in p-values for each bootstrap sample. If "FDB", the fast double bootstrap is used to compute second level LRT
double.bootstrap.R
Integer; number of double bootstrap draws. Only used if double.bootstrap = "standard". The default value is set to 500.
double.bootstrap.alpha
The significance level to compute the adjusted alpha based on the plugin p-values. Only used if double.bootstrap = "standard". The default value is set to 0.05.
parallel
The type of parallel operation to be used (if any). If missing, the default is set "no".
ncpus
Integer: number of processes to be used in parallel operation: typically one would chose this to the number of available CPUs.
cl
An optional parallel or snow cluster for use if parallel = "snow". If not supplied, a cluster on the local machine is created for the duration of the InformativeTesting call.
verbose
Logical; if TRUE, information is shown at each bootstrap draw.
...
Other named arguments from the lavaan package which are passed to the function. For example "group" in a multiple group model.

Value

  • An object of class InformativeTesting for which a summary and a plot method is available.

References

Van de Schoot, R., Hoijtink, H., & Dekovic, M. (2010). Testing inequality constrained hypotheses in SEM models. Structural Equation Modeling, 17, 443-463.

Van de Schoot, R., Strohmeier, D. (2011). Testing informative hypotheses in SEM increases power: An illustration contrasting classical. International Journal of Behavioral Development 35(2), 180-190.

Examples

Run this code
#Multiple regression model

model  <- 'y1 ~ b1*x1 + b2*x2 + b3*x3 +
          start(1.8)*x1 + start(0.017)*x2 + start(-0.31)*x3
         
          y1~~start(5.7)*y1
          '
      
constraints  <-'b2 < b1
              b3 < b1
              '


#We only generate 5 bootstrap samples; 
#in practice you may wish to use a much higher number.

example <- InformativeTesting(model = model, data = PoliticalDemocracy, 
                              constraints = constraints, R = 5) 
                              
example
#summary(example)

#The estimates for the unconstrained model and the fit measures.
#summary(example, fit = "Hu", data = data, fitmeasures = TRUE)

#plot(example)

Run the code above in your browser using DataLab