Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

group.mean

Convenience function for calculating group-mean covariates.


Description

Creates a between-study (or between-cluster) version of the covariate in question.

Usage

group.mean(var, grp)

Arguments

var

The covariate cotaining the values to be group averaged.

grp

The group from which the average should be calculated.

Value

A column or vector containing the group.mean covariate.

Examples

# Load data
data(corrdat)

# Create a group mean covariate 
age_m <- group.mean(corrdat$age, corrdat$studynum)

robumeta

Robust Variance Meta-Regression

v2.0
GPL-2
Authors
Zachary Fisher [aut, cre], Elizabeth Tipton [aut], Hou Zhipeng [aut]
Initial release
2017-05-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.