Returns a list of the top units ranked according to "r-value" or another specified statistic.
TopList(object, topnum = 10, sorted.by = c("RValue","PostMean","MLE","PVal"))
An object of class "rvals"
The length of the top list.
The statistic by which to sort; this could be sorted.by = "RValue"
,
sorted.by = "PostMean"
, sorted.by = "MLE"
, or
sorted.by = "PVal"
a data frame with topnum
rows and columns containing the
r-value, mle, posterior mean, and p-value rankings.
# NOT RUN {
n <- 500
theta <- rnorm(n)
ses <- sqrt(rgamma(n,shape=1,scale=1))
XX <- theta + ses*rnorm(n)
dd <- cbind(XX,ses)
rvs <- rvalues(dd, family = gaussian)
TopList(rvs, topnum = 12)
TopList(rvs, topnum = 15, sorted.by = "MLE")
# }
Run the code above in your browser using DataLab