This function provides simulation-based risk ratios from a regression that involves factors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | newZelig(
ind_var_group,
ind_var_value = 1,
zero_out = NULL,
dep_var,
other_variables,
factor_variables,
.id = NULL,
.weight = NULL,
.nest = NULL,
.strata = NULL,
total_variables = c(dep_var, zero_out, other_variables, substr(.id, 1, 10)[2],
substr(.weight, 1, 10)[2], substr(.strata, 1, 10)[2]),
dat,
sex_interaction = F,
totalData = dat[, total_variables],
seed = 1234,
function_family = binomial(link = "logit")
)
|
ind_var_group |
The factor variable for which you want an estimate |
ind_var_value |
The value of ind_var_group that will be evaluated. Default set at 1. |
zero_out |
The factor variable for which we want to zero-out all other possibilities. |
dep_var |
Dependent variable |
other_variables |
What other confounders do you want to include in the model |
factor_variables |
Which of the variables should be considered categorical? |
sex_interaction |
Include if you want to interact the independent variable with sex. Default set to F. |
data |
Dataset you want to use |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.