dh.zByGroup: Creates z-scores within specified bands

View source: R/z-score-by-group.R

dh.zByGroupR Documentation

Creates z-scores within specified bands

Description

Especially with mental health outcomes, we often want to transform raw scores into z-scores, but within certain age bands (e.g. measurement occasion or per year). This function does this.

Usage

dh.zByGroup(df, out_var, age_var, low_band, upp_band, conns, new_obj)

Arguments

df

Character specifying a server-side data frame.

out_var

Variable to make z-scores for

age_var

Age variable

low_band

Lower band for z score

upp_band

Upper band for z score

conns

DataSHIELD connections object.

new_obj

Character specifying name for created serverside object.

Value

Z score serverside within specified bands

See Also

Other trajectory functions: dh.lmeMultPoly(), dh.makeAgePolys(), dh.makeLmerForm(), dh.predictLmer(), dh.trimPredData()

Other data manipulation functions: dh.makeAgePolys(), dh.makeIQR(), dh.quartileSplit()


lifecycle-project/ds-cs-functions documentation built on Nov. 18, 2024, 3:36 p.m.