R/statpsych3.R
ci.condslope.log.Rd
Computes confidence intervals and test statistics for population conditional slopes (simple slopes) in a logistic model that includes a predictor variable (x1), a moderator variable (x2), and a product predictor variable (x1*x2). Conditional slopes are computed at low and high values of the moderator variable.
ci.condslope.log(alpha, b1, b2, se1, se2, cov, lo, hi)
alpha level for 1-alpha confidence
estimated slope coefficient for predictor variable
estimated slope coefficient for product variable
standard error for predictor coefficient
standard error for product coefficient
estimated covariance between predictor and product coefficients
low value of moderator variable
high value of moderator variable
Returns a 2-row matrix. The columns are:
Estimate - estimated conditional slope
exp(Estimate) - estimated exponentiated conditional slope
z - z test statistic
p - two-sided p-value
LL - lower limit of the exponentiated confidence interval
UL - upper limit of the exponentiated confidence interval
ci.condslope.log(.05, .132, .154, .031, .021, .015, 5.2, 10.6)
#> Estimate exp(Estimate) z p LL
#> At low moderator 0.9328 2.541616 2.269824 0.023218266 1.135802
#> At high moderator 1.7644 5.838068 2.906507 0.003654887 1.776421
#> UL
#> At low moderator 5.687444
#> At high moderator 19.186357
# Should return:
# Estimate exp(Estimate) z p
# At low moderator 0.9328 2.541616 2.269824 0.023218266
# At high moderator 1.7644 5.838068 2.906507 0.003654887
# LL UL
# At low moderator 1.135802 5.687444
# At high moderator 1.776421 19.186357