infer {cSEM}R Documentation





 .object            = NULL,
 .quantity          = c("all", "mean", "sd", "bias", "CI_standard_z", 
                        "CI_standard_t", "CI_percentile", "CI_basic", 
                        "CI_bc", "CI_bca", "CI_t_interval"),
 .alpha             = 0.05,
 .bias_corrected    = TRUE



An R object of class cSEMResults resulting from a call to csem().


Character string. Which statistic should be returned? One of "all", "mean", "sd", "bias", "CI_standard_z", "CI_standard_t", "CI_percentile", "CI_basic", "CI_bc", "CI_bca", "CI_t_interval" Defaults to "all" in which case all quantities that do not require additional resampling are returned, i.e., all quantities but "CI_bca", "CI_t_interval".


An integer or a numeric vector of significance levels. Defaults to 0.05.


Logical. Should the standard and the tStat confidence interval be bias-corrected using the bootstrapped bias estimate? If TRUE the confidence interval for some estimated parameter theta is centered at ⁠2*theta - theta*_hat⁠, where ⁠theta*_hat⁠ is the average over all .R bootstrap estimates of theta. Defaults to TRUE


Calculate common inferential quantities. For users interested in the estimated standard errors, t-values, p-values and/or confidences intervals of the path, weight or loading estimates, calling summarize() directly will usually be more convenient as it has a much more user-friendly print method. infer() is useful for comparing different confidence interval estimates.

infer() is a convenience wrapper around a number of internal functions that compute a particular inferential quantity, i.e., a value or set of values to be used in statistical inference.

cSEM relies on resampling (bootstrap and jackknife) as the basis for the computation of e.g., standard errors or confidence intervals. Consequently, infer() requires resamples to work. Technically, the cSEMResults object used in the call to infer() must therefore also have class attribute cSEMResults_resampled. If the object provided by the user does not contain resamples yet, infer() will obtain bootstrap resamples first. Naturally, computation will take longer in this case.

infer() does as much as possible in the background. Hence, every time infer() is called on a cSEMResults object the quantities chosen by the user are automatically computed for every estimated parameter contained in the object. By default all possible quantities are computed (.quantity = all). The following table list the available inferential quantities alongside a brief description. Implementation and terminology of the confidence intervals is based on Hesterberg (2015) and Davison and Hinkley (1997).

"mean", "sd"

The mean or the standard deviation over all M resample estimates of a generic statistic or parameter.


The difference between the resample mean and the original estimate of a generic statistic or parameter.

"CI_standard_z" and "CI_standard_t"

The standard confidence interval for a generic statistic or parameter with standard errors estimated by the resample standard deviation. While "CI_standard_z" assumes a standard normally distributed statistic, "CI_standard_t" assumes a t-statistic with N - 1 degrees of freedom.


The percentile confidence interval. The lower and upper bounds of the confidence interval are estimated as the alpha and 1-alpha quantiles of the distribution of the resample estimates.


The basic confidence interval also called the reverse bootstrap percentile confidence interval. See Hesterberg (2015) for details.


The bias corrected (Bc) confidence interval. See Davison and Hinkley (1997) for details.


The bias-corrected and accelerated (Bca) confidence interval. Requires additional jackknife resampling to compute the influence values. See Davison and Hinkley (1997) for details.


The "studentized" t-confidence interval. If based on bootstrap resamples the interval is also called the bootstrap t-interval confidence interval. See Hesterberg (2015) on page 381. Requires resamples of resamples. See resamplecSEMResults().

By default, all but the studendized t-interval confidence interval and the bias-corrected and accelerated confidence interval are calculated. The reason for excluding these quantities by default are that both require an additional resampling step. The former requires jackknife estimates to compute influence values and the latter requires double bootstrap. Both can potentially be time consuming. Hence, computation is triggered only if explicitly chosen.


A list of class cSEMInfer.


Davison AC, Hinkley DV (1997). Bootstrap Methods and their Application. Cambridge University Press. doi:10.1017/cbo9780511802843.

Hesterberg TC (2015). “What Teachers Should Know About the Bootstrap: Resampling in the Undergraduate Statistics Curriculum.” The American Statistician, 69(4), 371–386. doi:10.1080/00031305.2015.1089789.

See Also

csem(), resamplecSEMResults(), summarize() cSEMResults


model <- "
# Structural model

# Measurement model
EXPE =~ expe1 + expe2 + expe3 + expe4 + expe5
IMAG =~ imag1 + imag2 + imag3 + imag4 + imag5
LOY  =~ loy1  + loy2  + loy3  + loy4
QUAL =~ qual1 + qual2 + qual3 + qual4 + qual5
SAT  =~ sat1  + sat2  + sat3  + sat4
VAL  =~ val1  + val2  + val3  + val4
## Estimate the model with bootstrap resampling 
a <- csem(satisfaction, model, .resample_method = "bootstrap", .R = 20,
          .handle_inadmissibles = "replace")

## Compute inferential quantities
inf <- infer(a)


### Compute the bias-corrected and accelerated and/or the studentized t-inverval.
## For the studentied t-interval confidence interval a double bootstrap is required.
## This is pretty time consuming.
## Not run: 
  inf <- infer(a, .quantity = c("all", "CI_bca")) # requires jackknife estimates 
## Estimate the model with double bootstrap resampling:
# Notes:
#   1. The .resample_method2 arguments triggers a bootstrap of each bootstrap sample
#   2. The double bootstrap is is very time consuming, consider setting 
#      `.eval_plan = "multisession`. 
a1 <- csem(satisfaction, model, .resample_method = "bootstrap", .R = 499,
          .resample_method2 = "bootstrap", .R2 = 199, .handle_inadmissibles = "replace") 
infer(a1, .quantity = "CI_t_interval")
## End(Not run)

[Package cSEM version 0.5.0 Index]