group.mean | R Documentation |
Creates a between-study (or between-cluster) version of the covariate in question.
group.mean(var, grp)
var |
The covariate cotaining the values to be group averaged. |
grp |
The group from which the average should be calculated. |
A column or vector containing the group.mean covariate.
# Load data
data(corrdat)
# Create a group mean covariate
age_m <- group.mean(corrdat$age, corrdat$studynum)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.