mrwilcoxontau: MR estimate of tau.

Description Usage Arguments Author(s) References See Also Examples

Description

MR estimate of tau.

Usage

1
mrwilcoxontau(x, y, center, beta)

Arguments

x

n by p design matrix

y

n by 1 response vector

center

n by 1 vector denoting block (cluster) membership

beta

p by 1 vector

Author(s)

John Kloke kloke@biostat.wisc.edu

References

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.

See Also

mrdisp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### Internal function ###
## The function is currently defined as
function (x, y, center, beta) 
{
    x <- as.matrix(x)
    a <- unique(center)
    nc <- length(a)
    p <- ncol(x)
    tauhats <- rep(0, nc)
    for (i in 1:nc) {
        x1 <- as.matrix(x[center == a[i], ])
        y1 <- y[center == a[i]]
        tauhats[i] <- rashidtau(y1 - x1 %*% beta, p)
    }
    mean(tauhats)
  }

kloke/mrfit documentation built on May 20, 2019, 12:34 p.m.