medweight: Computes mediation weights

View source: R/mediator-survival.R

medweightR Documentation

Computes mediation weights

Description

Computes mediation weights for either binary or multinomial mediators. The important part is that the influence functions can be obtained to compute standard errors.

Usage

medweight(
  fit,
  data = data,
  var = NULL,
  name.weight = "weights",
  id.name = "id",
  ...
)

Arguments

fit

either glm-binomial or mlogit (mets package)

data

data frame with data

var

is NULL reads mediator and exposure from formulae in the fit.

name.weight

name of weights

id.name

name of id variable, important for SE computations

...

Additional arguments to

Author(s)

Thomas Scheike


mets documentation built on May 29, 2024, 3:51 a.m.