# DGB
## Linear Contrast of Medians (Within Subjects)
ci.lc.median.ws <- function(alpha, m, h, V) {
# Computes a confidence interval for a linear function
# of within-subject medians
# Args:
# alpha: alpha value for 1-alpha confidence
# m: rx1 vector of sample medians for within-subject conditions
# h: rx1 vector coefficients of linear function
# V: rxr covariance matrix of within-subject sample medians
# Values:
# estimate of linear function, SE of linear function, lower limit, upper limit
z <- qnorm(1 - alpha/2)
est <- t(h)%*%m
se <- sqrt(t(h)%*%V%*%h)
ll <- est - z*se
ul <- est + z*se
out <- t(c(est, se, ll, ul))
colnames(out) <- c("Estimate", "SE", "LL", "UL")
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.