targeted.formula package

Submodules

targeted.formula.riskreg module

targeted.formula.riskreg.riskreg(data: str, target: str, type='rr', **kwargs)

Risk regression with binary exposure

Parameters
  • data (pandas.DataFrame) –

  • target (str) – Formula describing respone and exposure/treatment of the form ‘response ~ exposure’

  • type (str) – Type of model (rr: relative risk, rd: risk difference)

  • nuisance (str, optional) – nuisance (odds-product) regression formula (string: ‘x1+x2+…’)

  • propensity (str, optional) – propensity model (default: same as nuisance)

  • interaction – interactions (string: ‘x1+x2+…’, default: none)

Returns

Riskreg object

Return type

Riskreg

Module contents