Learn R Programming

seminr (version 0.7.0)

bootstrap_model: seminr bootstrap_model Function

Description

The seminr package provides a natural syntax for researchers to describe PLS structural equation models. bootstrap_model provides the verb for bootstrapping a pls model from the model parameters and data.

Usage

bootstrap_model(seminr_model, nboot = 500, cores = NULL, seed = NULL, ...)

Arguments

seminr_model

A fully estimated model with associated data, measurement model and structural model

nboot

A parameter specifying the number of bootstrap iterations to perform, default value is 500. If 0 then no bootstrapping is performed.

cores

A parameter specifying the maximum number of cores to use in the parallelization.

seed

A parameter to specify the seed for reproducibility of results. Default is NULL.

...

A list of parameters passed on to the estimation method.

References

Hair, J. F., Hult, G. T. M., Ringle, C. M., and Sarstedt, M. (2017). A Primer on Partial Least Squares Structural Equation Modeling (PLS-SEM), 2nd Ed., Sage: Thousand Oaks.

See Also

relationships constructs paths interactions

Examples

Run this code
# NOT RUN {
data(mobi)
# seminr syntax for creating measurement model
mobi_mm <- constructs(
  composite("Image",        multi_items("IMAG", 1:5)),
  composite("Expectation",  multi_items("CUEX", 1:3)),
  composite("Value",        multi_items("PERV", 1:2)),
  composite("Satisfaction", multi_items("CUSA", 1:3))
)

# interaction constructs must be created after the measurement model is defined
mobi_xm <- interactions(
  interaction_ortho("Image", "Expectation"),
  interaction_ortho("Image", "Value")
)

# structural model: note that name of the interactions construct should be
#  the names of its two main constructs joined by a '.' in between.
mobi_sm <- relationships(
  paths(to = "Satisfaction",
        from = c("Image", "Expectation", "Value",
                 "Image*Expectation", "Image*Value"))
)

seminr_model <- estimate_pls(data = mobi,
                             measurement_model = mobi_mm,
                             interactions = mobi_xm,
                             structural_model = mobi_sm)

# Load data, assemble model, and bootstrap
boot_seminr_model <- bootstrap_model(seminr_model = seminr_model,
                                     nboot = 50, cores = 2, seed = NULL)

summary(boot_seminr_model)
# }

Run the code above in your browser using DataLab