monte_g: Monte Carlo simulation

Description Usage Arguments

View source: R/medlong.R

Description

Internal use only. Monte Carlo simulation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
monte_g(
  data,
  time.seq,
  time.var,
  models,
  intervention = NULL,
  in.recode = NULL,
  out.recode = NULL,
  init.recode = NULL,
  verbose = TRUE
)

Arguments

data

a data frame in which to look for variables with which to predict.

time.seq

Time sequence.

time.var

Time varaible.

models

fitted objects.

intervention

A vector, intervention treatment per time.

in.recode

optional, On the fly recoding of variables done before the Monte Carlo loop starts. Needed to do any kind of functional forms for entry times. This is executed at each start of the Monte Carlo g-formula time steps

out.recode

optional, On the fly recoding of variables done at the end of the Monte Carlo loop. Needed for operations like counting the number of days with a treatment or creating lagged variables. This is executed at each end of the Monte Carlo g-formula time steps.

init.recode

optional, recoding of variables done at the begaining of the Monte Carlo loop. Needed for operations initalize baseline variables. This is executed at begaining of the Monte Carlo g-formula, excuted only once at time 0.

verbose

Print intervention information during calculation.


adayim/causalMed documentation built on June 2, 2020, 4:11 p.m.