Confidence interval for the slope of medians in a one-factor experimental design with a quantitative between-subjects factor
Source:R/statpsych2.R
ci.slope.median.bs.Rd
Computes a distrbution-free test and confidence interval for the slope of medians in a one-factor experimental design with a quantitative between-subjects factor using sample group medians and standard errors as input. The sample median and standard error for each group can be computed using the ci.median function.
Value
Returns a 1-row matrix. The columns are:
Estimate - estimated slope
SE - standard error
z - z test statistic
p - two-sided p-value
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Examples
m <- c(33.5, 37.9, 38.0, 44.1)
se <- c(0.84, 0.94, 1.65, 2.98)
x <- c(5, 10, 20, 30)
ci.slope.median.bs(.05, m, se, x)
#> Estimate SE z p LL UL
#> 0.3664407 0.1163593 3.149216 0.001637091 0.1383806 0.5945008
# Should return:
# Estimate SE z p LL UL
# 0.3664407 0.1163593 3.149216 0.001637091 0.1383806 0.5945008