Estimate: Estimate

View source: R/ltmleMediation_TMLECalcs.R

EstimateR Documentation

Estimate

Description

Run GLM or SuperLearner to obtain an estimate for the current node.

Usage

Estimate(
  inputs,
  form,
  subs,
  family,
  type,
  nodes,
  Qstar.kplus1,
  cur.node,
  calc.meanL,
  called.from.estimate.g,
  regimes.meanL,
  regimes.with.positive.weight,
  CSE_I = FALSE,
  CSE_Z = FALSE,
  regimes_add = NULL
)

Arguments

inputs

Output of CreateMedInputs.

form

Q form for current node.

subs

Logical indicating uncensored and non-deterministic samples.

family

a description of the error distribution and link function to be used in the model.

type

"response" or "link"

nodes

List with index for each node subset. Output of CreateNodes.

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

cur.node

Node being estimated.

calc.meanL

Estimate conditional density of A using mean of covariates. This is a useful option if there are NAs in the regime, or want to estimate variance.

called.from.estimate.g

Logical TO DO

regimes.meanL

TO DO

regimes.with.positive.weight

Regimes with positve weights. Defaults to 1:num.regimes.

CSE_I

Logical indicating whether this is estimation with instrumental variable.

CSE_Z

Logical indicating whether this is a Z estimation for the data-dependent parameter.

regimes_add

If CSE_Z is TRUE, must specify at what value the node after the mediator should be estimated at.

Value

Returns predicted values for the fit as well as the fit as well as indicators for which samples are deterministic and their values. If specified, it also returns the probability of A=1 given mean L.


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