UpdateQMediation: UpdateQMediation

View source: R/ltmleMediation_TMLECalcs.R

UpdateQMediationR Documentation

UpdateQMediation

Description

Update the initial fit of Q using clever covariates.

Usage

UpdateQMediation(
  Qstar.kplus1,
  logitQ,
  combined.summary.measures,
  cum.g,
  cum.q.ratio,
  working.msm,
  uncensored,
  intervention.match,
  is.deterministic,
  msm.weights,
  gcomp,
  observation.weights
)

Arguments

Qstar.kplus1

Estimate of the expectation with respect to the distribution of the node one ahead of the current node given the past (dimension: n x num.regimes).

logitQ

logit predicted values of Q for the current node, as estimated by Estimate (dimension: n x num.regimes).

combined.summary.measures

TO DO (dimension: n x num.measures x num.regimes, where num.measures=num.summary.measures + num.baseline.covariates).

cum.g

Cumulative g estimate up to the most recent AC node. (dimension: n x num.regimes x num.measures)

cum.q.ratio

Cumulative Q estimate ratio of following abar.prime regime and following abar regime. (dimension: n x num.regimes x num.measures)

working.msm

Working marginal structural model.

uncensored

Uncensored samples.

intervention.match

Samples with exposure that matches intervention (dimension: n x num.regimes).

is.deterministic

Logical variable indicating samples deterministic due to death or deterministic Q.

msm.weights

Marginal structural model weights (dimension: n x num.regimes).

gcomp

Logical indicating whether to use Gcomp instead (no updating if TRUE).

observation.weights

Sample weights.

Value

Returns updated estimate of Q, unless gcomp=TRUE or no samples left for estimation purposes. The output also includes the offset (initial estimate of Q for the current node), fluctuation model, and the clever covariate.


podTockom/medltmle documentation built on Aug. 9, 2022, 9:32 a.m.