get_relative_risk {autoCovariateSelection} | R Documentation |
Compute relative risk for each of the covariates with respect to outcomes occurred
Description
get_relative_risk
function is a helper function used within the get_prioritised_covariates
function.
This function computes the prevalence in the exposed and that in the unexposed and simply returns the relative risk for all the covariates in the
input data.frame
Usage
get_relative_risk(df, outcomeVec)
Arguments
df |
The input |
outcomeVec |
The 1-D outcome vector indicating whether or not the patient experienced the outcome of interest (value = 1) or not (value =0).
The length of this vector should be equal to the number of rows of |
Value
A 1-D vector containing relative risk of the association between the covariate (confounder) and the outcome. Thus, the length of this vector will be equal to the number of covariates.
Author(s)
Dennis Robert dennis.robert.nm@gmail.com