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)

robumeta documentation built on May 1, 2019, 8:21 p.m.