recursive_ice: Recursively apply the ICE algorithm

View source: R/ice.R

recursive_iceR Documentation

Recursively apply the ICE algorithm

Description

Recursively apply the ICE algorithm

Usage

recursive_ice(
  t,
  k,
  data,
  inside_formula_t,
  inside_formula_tmin1,
  outside_formula,
  inside_family,
  binomial_n = NULL,
  models = TRUE,
  tmle = FALSE,
  weights = NULL
)

Arguments

t

int. Timepoint the estimand applies to

k

int. Always 0 if called at the user level. Timepoint the outer expectation applies to

data

wide data frame

inside_formula_t

chr. glue-style formula for inside model for Yt (times indexed by t, e.g. '~Lt')

inside_formula_tmin1

chr. glue-style formula for inside model for Yt (times indexed by t, e.g. '~Lt-1')

outside_formula

chr. glue-style formula for outside models (times indexed by k, e.g. '~Lk)

inside_family

stats::families object (or chr) for glm inside models

binomial_n

vector of length nrow(data) of group sizes if Y is binomial aggregate data

models

lgl. Return all models as an attribute?

tmle

lgl. Incorporate tmle updating step to make estimator doubly robust?

weights

Matrix of IPTW weights as returned by cbind(1, calc_weights(...)). Default NULL, required if tmle=TRUE.


audreyrenson/didgformula documentation built on Oct. 9, 2022, 11:45 a.m.