group.center | R Documentation |
Creates a within-study (or within-cluster) version of the covariate in question.
group.center(var, grp)
var |
The covariate to be group centered. |
grp |
A vector corresponding to the group identification. |
A column or vector containing the group.centered covariate.
# Load data
data(corrdat)
# Create a group centered covariate
males_c <- group.center(corrdat$males, corrdat$studyid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.