Description Usage Arguments Author(s) References Examples
Estimate of tau for MR.
1 | rashidtau(resd, p, delta = 0.8)
|
resd |
|
p |
|
delta |
John Kloke kloke@biostat.wisc.edu
Rashid, M.M., McKean, J.W., Kloke, J.D. (2011). R Estimates and Associated Inferences for Mixed Models with Covariates in a Multi-Center Clinical Trial. Statistics in Biopharmaceutical Research.
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 (resd, p, delta = 0.8)
{
n = length(resd)
rd = sort(matrix(abs(outer(resd, resd, "-")), ncol = 1))
tn = quantile(rd, delta)/sqrt(n)
gtn = 0
for (i in 1:n^2) {
if (rd[i] <= tn) {
gtn = gtn + 1
}
else {
break
}
}
gtn = gtn/n^2
rashidtau = 1/((sqrt(3)/tn) * gtn * sqrt((n - p - 1)/n))
rashidtau
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.