newZelig: newZelig

Description Usage Arguments

View source: R/newZelig.R

Description

This function provides simulation-based risk ratios from a regression that involves factors.

Usage

 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")
)

Arguments

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


tlcaputi/tlcPack documentation built on March 25, 2020, 12:55 p.m.