risk.adjust.quantreg: This function will ideally take an output variable name and a...

View source: R/risk.adjust.R View source: R/risk.adjust.R

risk.adjust.quantregR Documentation

This function will ideally take an output variable name and a list of input variable names, and risk adjust output.variable using quantile regression.

Description

Quantile regression fits lines to different quantiles, so this risk adjustment procedure will find the quantile of output.variable for that level, and subtract the effect of those variable from the patients outcome.

Usage

risk.adjust.quantreg(input.dt, qr.model, by.reference = FALSE)

Arguments

input.dt

Data.table with output.variable and covariates.

by.reference

Logical, whether to modify the input data.table by inserting the risk adjusted variable, and any dummy variables (Default: FALSE).

output.variable

Character name of outcome to be adjusted.

covariates

Character vector of column names to adjust upon.

jitter.output.variable

controls whether the output.variable will be jittered. It seems like DAOH is not quite continuous enough for quantreg. Perhaps not inherent to DAOH per se, but related to the distribution of the CheckWHO data (Default: FALSE).

quantiles.to.assess

Numeric vector, values between 0 and 1, of models to fit. Output variable will be adjusted by the model associated with the nearest quantile.

Details

Less quantiles will be faster, more might allow more finely grained correction, but might also be deleterious as lower quantiles have quite wide variability.


mattmoo/daohtools documentation built on Feb. 5, 2023, 5:38 a.m.