Skip to contents

For each algorithm for probable Parkinson’s disease dementia (PDD), this function fits a logistic regression model predicting the diagnosis from age, sex, and their interaction. It takes as input demographic data and a tibble of PDD diagnoses (typically generated via diagnose_pdd_sample).

Usage

regress_pdd_on_demographics(d0, d1, covs = NULL, inter = TRUE)

Arguments

d0

A tibble of demographic data generated by prepare_data.

d1

A tibble of PDD diagnoses (typically the PDD element from the list returned by diagnose_pdd_sample).

covs

Either a character vector containing covariates of interest (in which case the resulting formula will be PDD ~ age * sex * (covariate1 + covariate2 + ...), or NULL (default case whereby the resulting formula will be PDD ~ age * sex).

inter

A logical indicating whether covariates ought to be added to the together with their interactions with predictors of interest (default and recommended, TRUE) or as additive terms only (FALSE).

Value

A list with the following components:

fits

A list of fitted logistic regression models for each PDD criterion.

values

A tibble of model coefficients and statistics.

plots

A named list of ggplot2 objects:

data

Plots showing raw proportions of PDD diagnoses by age and sex.

parameters

Plots summarising effect sizes (odds ratios) and associated p-values.

See also

Examples

if (FALSE) { # \dontrun{
p <- data_paths("data-raw")
data0 <- prepare_data(p)
data1 <- diagnose_pdd_sample(data0)
results <- regress_pdd_on_demographics(data0, data1$PDD)
} # }