group.center: Convenience function for calculating group-centered...

Description Usage Arguments Value Examples

View source: R/group.center.R

Description

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

Usage

1

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

1
2
3
4
5
# Load data
data(corrdat) 

# Create a group centered covariate 
males_c <- group.center(corrdat$males, corrdat$studyid)

zackfisher/robumeta documentation built on March 13, 2021, 7:41 a.m.