Description Usage Arguments Details Value Author(s) References See Also Examples
Do a Wald test based on a JR fit.
1 | wald.test.jrfit(fit, K, asymptotic = FALSE)
|
fit |
Output from jrfit. |
K |
A full row rank contrast matrix. |
asymptotic |
Should asymptotic (chi-sq) values be used or small sample (F). |
Test of K beta = 0.
statistic |
The test statistic |
p.value |
The p-value |
asymptotic |
logical indicating if asymptotic critical values were used |
df |
Which chi-sq or F degress of freedom were used |
John Kloke kloke@biostat.wisc.edu
Kloke, J.D., McKean, J.W., Rashid, M. (2009), Rank-based estimation and associated inferences for linear models with cluster correlated errors, Journal of the American Statistical Association, 104, 384-390.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (fit, K, asymptotic = FALSE)
{
est <- K %*% fit$coef
var.est <- K %*% fit$varhat %*% t(K)
statistic <- t(est) %*% solve(var.est) %*% est
q <- nrow(K)
if (asymptotic) {
p.value <- pchisq(statistic, q, lower.tail = FALSE)
df <- q
}
else {
statistic <- statistic/q
p.value <- pf(statistic, q, fit$DF, lower.tail = FALSE)
df <- c(q, fit$DF)
}
list(statistic = statistic, p.value = p.value, asymptotic = asymptotic,
df = df)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.