socialrisk {socialrisk} | R Documentation |
Social Risk
Description
socialrisk
returns a summary dataset containing indicators of social risk,
which vary based on the taxonomy command, for each patient.
Usage
socialrisk(dat = NULL, id = NULL, dx = "dx", taxonomy = "cms")
Arguments
dat |
dataset which has been properly prepared in long format |
id |
variable of the unique patient identifier |
dx |
the column with the diagnoses (defaults to 'dx') |
taxonomy |
the taxonomy one wishes to use for social risk, with options of "cms" (default), "mha", and "siren" |
Details
This function uses data which has been properly prepared to identify and flag social risks.
Value
dataframe with one row per patient, a column for their patient id, a column with whether they have any social risk, a column with the number of social risk domains, and columns with indicator variables for each social risk
Examples
data <- clean_data(dat = i10_wide, id = patient_id, style = "wide", prefix_dx = "dx")
socialrisk(dat = data, id = patient_id, dx = dx, taxonomy = "cms")
[Package socialrisk version 0.5.1 Index]