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

group.center

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)

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.