Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/relative.effect.R

Estimate the extent to which a covariate is confounding the treatment effect

1 |

`formula` |
an object of class 'formula' (or one that can be coerced to that class): a symbolic description of a model to be fitted. |

`data` |
a data frame containing outcome, treatment and covariates. |

`sel` |
a vector of integers or strings indicating the covariates. |

`resp` |
an integer or a string indicating the outcome variable. |

`treat` |
an integer or a string indicating the treatment variable. |

`...` |
further arguments passed to or from other methods. |

The decision about the inclusion of covariates in the propensity score model is mostly difficult. A measure describing the extent to which a covariate is confounding the treatment effect on outcome can help to decide on it. Covariates with a large impact are potential candidates for the propensity score model.

The relative effect is defined as difference between adjusted and
unadjusted treatment effect related to the unadjusted effect (per
cent). Therefore, treatment effects on outcome, unadjusted and
adjusted for covariates, are estimated using internally `glm`

.

Two options are available to fit appropriate regression models. Either
a formula is specified, typically as 'resp ~ treat + cov'
(`formula`

), or `resp`

, `treat`

and `sel`

are
given to specify the outcome and treatment variable and the
covariates.

`relative.effect`

returns a list containing the following
components:

`unadj.treat` |
the estimated unadjusted treatment effect on outcome. |

`adj.treat.cov` |
a vector containing the estimated treatment effects on outcome, individually adjusted for the selected covariates. |

`rel.treat` |
a vector containing the relative effect for each covariate. |

`name.treat` |
a string indicating the name of the treatment. |

`name.resp` |
a string indicating the name of the outcome. |

`name.sel` |
a vector of strings indicating the names of the selected covariates. |

`family` |
the error distribution and link function used in the
model (see |

Susanne Stampf susanne.stampf@usb.ch

`glm`

, formula

1 2 3 4 5 6 7 8 9 10 11 12 13 |

```
Loading required package: lme4
Loading required package: Matrix
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.