cus_result_gen {ComBatFamQC} | R Documentation |
Generate Customized Predicted Quantiles List
Description
This function computes customized predicted quantiles for a specified feature across both female and male groups using a GAMLSS model. The resulting list object is structured for visualization purposes.
Usage
cus_result_gen(age_list, customized_q = 0.75, f)
Arguments
age_list |
A list containing all ROIs' true volumes, age trend estimates, and the fitted GAMLSS model. |
customized_q |
A numeric value between 0 and 1 representing the quantile to predict (e.g., |
f |
A string specifying the feature of interest within the |
Details
This function utilizes the GAMLSS model to compute predictions for the specified quantile across demographic groups. The results include predictions for both the specified quantile and the median, enabling enhanced visualization.
Value
A list containing the customized quantile value used for predictions and a data frame with columns for age, quantile type, prediction, and sex.
Examples
sub_df <- age_df[,c("Volume_1", "age", "sex", "ICV_baseline")] |> na.omit()
colnames(sub_df) <- c("Volume_1", "age", "sex", "icv")
age_list <- list("Volume_1" = age_list_gen(sub_df = sub_df))
cus_result_gen(age_list, customized_q = 0.75, f = "Volume_1")