InterventionParser.parse_intervention: InterventionParser.parse_intervention

Description Usage Arguments Value

View source: R/InterventionParser.R

Description

Function to select the current intervention from an intervention list. It will check whether the current timestamp is an intervention timestamp with respect to the current outcome. If it is, it will return the actual intervention. The intervention needs to be specified as follows. Each intervention is a list consisting of three attributes: variable, when, and what. The variable entry denotes the name of the variable on which the intervention is done. Usually this is the 'A' variable, but this could be tweaked. Secondly one has to specify the when variable. This variable denotes when the intervention should be performed. Lastly the what variable. This denotes the actual intervention to be performed. E.g., one could denote treatment as 1 and control as 0. Then an intervention could be to give everybody a treatment, forcing everyone to have a 1 as treatment variable. This would then boil down to a what of 1.

Usage

1
2
InterventionParser.parse_intervention(intervention, current_time,
  current_outcome, check = FALSE)

Arguments

intervention

the intervention to give list(variable, when, what)

current_time

integer with the current time

current_outcome

string the name of the current relevant variable

check

boolean perform checks on the input variables

Value

a list with when, what and if an intervention should be given at this time (list(when, what, should_intervene)). If one whould not intervene, the when and what are -1.


frbl/OnlineSuperLearner documentation built on Feb. 9, 2020, 9:28 p.m.