ci.slope: Confidence interval for a slope in a simple linear model
Description
Computes a confidence interval for a population slope coefficient in a
simple linear model using the sample correlation, sample standard
deviation of the y scores (response variable), sample standard deviation
of the x scores (predictor variable), and sample size as input.
For more details, see Section 1.11 of Bonett (2021, Volume 2)
Usage
ci.slope(alpha, cor, sdy, sdx, n)
Value
Returns a 1-row matrix. The columns are:
Estimate - estimated slope
SE - standard error
t - t test statistic
df - degrees of freedom
p - two-sided p-value
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Arguments
alpha
alpha level for 1-alpha confidence
cor
estimated Pearson correlation
sdy
estimated standard deviation of response variable
sdx
estimated standard deviation of predictor variable