Learn R Programming

ComBatFamQC (version 1.0.5)

age_list_gen: Age Trend Estimates Generation

Description

A GAMLSS model using a Normal distribution was fitted separately to rois of interest, to establish normative reference ranges for the volume of a specific ROI as a function of age, adjusting for sex and intracranial volume.

Usage

age_list_gen(
  sub_df,
  lq = 0.25,
  hq = 0.75,
  mu = "smooth",
  sigma = "smooth",
  nu = "default",
  tau = "default"
)

Value

age_list_gen returns a list containing the following components:

true_df

a dataframe contains the true age and ROI volume information

predicted_df_sex

a dataframe contains the estimated age trend adjusting sex and icv

model

the fitted GAMLSS model

Arguments

sub_df

A four-column dataset that contains age, sex, intracranial volume (ICV) and roi volume related information. The columns for age, sex, and ICV must be strictly named "age", "sex", and "icv".

lq

The lower bound quantile. eg: 0.25, 0.05

hq

The upper bound quantile. eg: 0.75, 0.95

mu

An indicator of whether to smooth age variable, include it as a linear term or only include the intercept in the mu formula. "smooth": y ~ pb(age), "linear": y ~ age, "default": y ~ 1.

sigma

An indicator of whether to smooth age variable, include it as a linear term or only include the intercept in the sigma formula. "smooth": ~ pb(age), "linear": ~ age, "default": ~ 1.

nu

An indicator of whether to smooth age variable, include it as a linear term or only include the intercept in the nu formula. "smooth": ~ pb(age), "linear": ~ age, "default": ~ 1.

tau

An indicator of whether to smooth age variable, include it as a linear term or only include the intercept in the tau formula. "smooth": ~ pb(age), "linear": ~ age, "default": ~ 1.

Examples

Run this code
sub_df <- age_df[,c("Volume_1", "age", "sex", "ICV_baseline")] |> na.omit()
colnames(sub_df) <- c("Volume_1", "age", "sex", "icv")
age_list_gen(sub_df = sub_df)

Run the code above in your browser using DataLab