group.center {robumeta} | R Documentation |
Convenience function for calculating group-centered covariates.
Description
Creates a within-study (or within-cluster) version of the covariate in question.
Usage
group.center(var, grp)
Arguments
var |
The covariate to be group centered. |
grp |
A vector corresponding to the group identification. |
Value
A column or vector containing the group.centered covariate.
Examples
# Load data
data(corrdat)
# Create a group centered covariate
males_c <- group.center(corrdat$males, corrdat$studyid)
[Package robumeta version 2.1 Index]