replicate.slope | R Documentation |
This function computes confidence intervals for a slope from the original and follow-up studies, the difference in slopes, and the average of the slopes. Equality of error variances across studies is not assumed. The confidence interval for the difference uses a 1 - 2*alpha confidence level, which is recommended for equivalence testing. Use the replicate.gen function for slopes in other types of models (e.g., binary logistic, ordinal logistic, SEM).
replicate.slope(alpha, b1, se1, n1, b2, se2, n2, s)
alpha |
alpha level for 1-alpha or 1 - 2alpha confidence |
b1 |
sample slope in original study |
se1 |
standard error of slope in original study |
n1 |
sample size in original study |
b2 |
sample slope in follow-up study |
se2 |
standard error of slope in follow-up study |
n2 |
sample size in follow-up study |
s |
number of predictor variables in model |
A 4-row matrix. The rows are:
Row 1 summarizes the original study
Row 2 summarizes the follow-up study
Row 3 estimates the difference in slopes
Row 4 estimates the average slope
The columns are:
Estimate - slope estimate (single study, difference, average)
SE - standard error
t - t-value
p - p-value
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
df - degrees of freedom
Bonett2021vcmeta
replicate.slope(.05, 23.4, 5.16, 50, 18.5, 4.48, 90, 4)
# Should return:
# Estimate SE t p
# Original: 23.40 5.160000 4.5348837 4.250869e-05
# Follow-up: 18.50 4.480000 4.1294643 8.465891e-05
# Original - Follow-up: 4.90 6.833447 0.7170612 4.749075e-01
# Average: 20.95 3.416724 6.1316052 1.504129e-08
# LL UL df
# Original: 13.007227 33.79277 45.0000
# Follow-up: 9.592560 27.40744 85.0000
# Original - Follow-up: -6.438743 16.23874 106.4035
# Average: 14.176310 27.72369 106.4035
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.