ci.slope.median.bs | R Documentation |
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.
ci.slope.median.bs(alpha, m, se, x)
alpha |
alpha level for 1-alpha confidence |
m |
vector of sample median |
se |
vector of standard errors |
x |
vector of quantitative factor values |
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
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)
# Should return:
# Estimate SE z p LL UL
# 0.3664407 0.1163593 3.149216 0.001637091 0.1383806 0.5945008
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.