Description Usage Arguments Value Author(s) References See Also Examples
Partitions model residuals into cluster and subcluster effects using RPP algorithm.
| 1 | 
| f | A model formula which specifices the random effects (see example) | 
| resd | The residuals from the fitted model | 
| data | The data the model was fitted on | 
| rprpair | Character string indicating the location and scale parameters to use. Default to "hl-disp", but may also be "med-mad". See Bilgic (2012). | 
| siga2 | Variance from cluster | 
| sigw2 | Variance from subcluster | 
| sigmae2 | Remaining variance not accounted for by variance of cluster and subcluster | 
J. W. McKean and Y. K. Bilgic
Y. K. Bilgic. Rank-based estimation and prediction for mixed effects models in nested designs. 2012. URL http://scholarworks.wmich.edu/dissertations/40. Dissertation.
rprmeddis, dispvar
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | # Load school data
data(schools)
# Fit fixed effects model with lmr
lmr.fit = lmr(y ~ age + sex, data=schools)
# Three level design
# Partition residuals into school and region effects with rpp algorithm
rpr(y ~ age + sex + (1 | school) + (1 | school:region), lmr.fit$ehat, schools)
# Two level design
# Estimate variance in residuals from school
rpr(y ~ age + sex + (1 | school), lmr.fit$ehat, schools)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.