Take predicted dataframe and calculate the outcome (risk difference/ratio, incidence rate difference/ratio, mean difference, and/or number needed to treat)
get_results_dataframe(predict.df, outcome.type)
(Required) A data.frame output from the
make_predict_df
function with predicted outcome for each observation
at each level of treatment/exposure.
(Required) Character argument to describe the outcome
type. Acceptable responses, and the corresponding error distribution and
link function used in the glm
, include:
(Default) A binomial distribution with link = 'logit' is used.
A Poisson distribution with link = 'log' is used.
A negative binomial model with link = 'log' is used, where the theta parameter is estimated internally; ideal for over-dispersed count data.
A Poisson distribution with link = 'log' is used; ideal for events/person-time outcomes.
A negative binomial model with link = 'log' is used, where the theta parameter is estimated internally; ideal for over-dispersed events/person-time outcomes.
A gaussian distribution with link = 'identity' is used.
A list containing the calculated results for the applicable measures (based on the outcome.type): Risk Difference, Risk Ratio, Odds Ratio, Incidence Risk Difference, Incidence Risk Ratio, Mean Difference, Number Needed to Treat, Average Tx (average predicted outcome of all observations with treatment/exposure), and Average noTx (average predicted outcome of all observations without treatment/exposure)