pcenter {EMAtools}R Documentation

Centering on person-means

Description

This function allows you to center on person-means (also called "centering within clusters")

Usage

pcenter(ID, var)

Arguments

ID

name of ID variable

var

name of variable to be centered

Value

A column in your dataframe (with person-centered data)

Examples

## Not run: data$centeredVAR<-pcenter(data$ID,data$var)

[Package EMAtools version 0.1.4 Index]