Skip to contents

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()