Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

confidence_interval

seminr confidence intervals function


Description

The seminr package provides a natural syntax for researchers to describe PLS structural equation models. confidence_interval provides the verb for calculating the confidence intervals of a direct or mediated path in a bootstrapped SEMinR model.

Usage

confidence_interval(boot_seminr_model, from, to, through, alpha)

Arguments

boot_seminr_model

A bootstrapped model returned by the bootstrap_model function.

from

A parameter specifying the antecedent composite for the path.

to

A parameter specifying the outcome composite for the path.

through

A parameter to specify a vector of mediators for the path. Default is NULL.

alpha

A parameter for specifying the alpha for the confidence interval. Default is 0.05.

Value

A vector of lower and upper confidence intervals for a path.

References

Zhao, X., Lynch Jr, J. G., & Chen, Q. (2010). Reconsidering Baron and Kenny: Myths and truths about mediation analysis. Journal of consumer research, 37(2), 197-206.

See Also

Examples

mobi_mm <- constructs(
composite("Image",        multi_items("IMAG", 1:5)),
composite("Expectation",  multi_items("CUEX", 1:3)),
composite("Quality",      multi_items("PERQ", 1:7)),
composite("Value",        multi_items("PERV", 1:2)),
composite("Satisfaction", multi_items("CUSA", 1:3)),
composite("Complaints",   single_item("CUSCO")),
composite("Loyalty",      multi_items("CUSL", 1:3))
)

# Creating structural model
mobi_sm <- relationships(
  paths(from = "Image",        to = c("Expectation", "Satisfaction", "Loyalty")),
  paths(from = "Expectation",  to = c("Quality", "Value", "Satisfaction")),
  paths(from = "Quality",      to = c("Value", "Satisfaction")),
  paths(from = "Value",        to = c("Satisfaction")),
  paths(from = "Satisfaction", to = c("Complaints", "Loyalty")),
  paths(from = "Complaints",   to = "Loyalty")
)

# Estimating the model
mobi_pls <- estimate_pls(data = mobi,
                         measurement_model = mobi_mm,
                         structural_model = mobi_sm)

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

confidence_interval(boot_seminr_model = boot_seminr_model,
                    from = "Image",
                    through = c("Expectation", "Satisfaction","Complaints"),
                    to = "Loyalty",
                    alpha = 0.05)

seminr

Building and Estimating Structural Equation Models

v2.0.2
GPL-3
Authors
Soumya Ray [aut, ths], Nicholas Patrick Danks [aut, cre], André Calero Valdez [aut], Juan Manuel Velasquez Estrada [ctb], James Uanhoro [ctb], Johannes Nakayama [ctb], Lilian Koyan [ctb], Laura Burbach [ctb], Arturo Heynar Cano Bejar [ctb], Susanne Adler [ctb]
Initial release
2021-04-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.