center_data: Generate centered versions of all variables in a data set.

Description Usage Arguments Value Examples

Description

Variables that are cluster-mean centered will be labeled with a "cwc" suffix (abbreviation for centered within cluster), the cluster means of level-1 variables will be labeled with a "means" suffix, and variables that are grand-mean centered will be labeled with a "cgm" suffix (abbreviation for centered grand mean).

Usage

1
center_data(data, cluster)

Arguments

data

Data frame, matrix, or tibble containing the data to center.

cluster

Column label of data corresponding to the cluster/group identification variable.

Value

An augmented database with variables indicating level-1 cluster means, cluster-mean centered level-1 variables, grand-mean centered level-1 variables, and grand-mean centered level-2 variables.

Examples

1
2
3
4
## Not run: 
center_data(data = timss, cluster = "idteach")

## End(Not run)

jadahlke/hlmer documentation built on May 31, 2019, 8:43 a.m.