ci.indirect: Confidence interval for an indirect effect

View source: R/statpsych2.R

ci.indirectR Documentation

Confidence interval for an indirect effect

Description

Computes a Monte Carlo confidence interval (500,000 trials) for a population unstandardized indirect effect in a path model and a Sobel standard error. This function is not recommended for a standardized indirect effect. The Monte Carlo method is general in that the slope estimates and standard errors do not need to be OLS estimates with homoscedastic standard errors. For example, LAD slope estimates and their standard errors, OLS slope estimates and heteroscedastic-consistent standard errors, and (in models with no direct effects) distribution-free Theil-Sen slope estimates with recovered standard errors also could be used.

Usage

ci.indirect(alpha, b1, b2, se1, se2)

Arguments

alpha

alpha level for 1-alpha confidence

b1

unstandardized slope estimate for first path

b2

unstandardized slope estimate for second path

se1

standard error for b1

se2

standard error for b2

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated indirect effect

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

ci.indirect (.05, 2.48, 1.92, .586, .379)

# Should return (within sampling error):
# Estimate       SE       LL       UL
#   4.7616 1.625282 2.178812 7.972262
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.