simcausal (version 0.2.0)

eval.target: Evaluate the True Value of the Causal Target Parameter

Description

This function estimates the true value of the previously set target parameter (set.targetE or set.targetMSM) using the DAG object and either 1) data: list of action-specific simulated data.frames; or 2) actions; or 3) when data and actions are missing, using all distinct actions previously defined on the DAG object.

Usage

eval.target(DAG, n, data, actions, rndseed = NULL)

Arguments

DAG
DAG object with target parameter set via set.targetE or set.targetMSM functions
n
Number of observations to simulate (if simulating full data), this is overwritten by the number of observations in each data
data
List of action-specific data.frames generated with sim or simfull
actions
Character vector of action names which play the role of the data generating mechanism for simulated data when argument data is missing. Alternatively, actions can be a list of action DAGs pre-selected with A(DAG) fu
rndseed
Seed for the random number generator.

Value

  • For targetE returns a vector of counterfactual means, ATE or ATR; for targetMSM returns a named list with the MSM model fit ("msm"), MSM model coefficients ("coef"), the mapping of the MSM summary terms S() to the actual variable names used in the data, ("S.msm.map"), and the long format full data that was used for fitting this MSM "df_long".

Details

For examples and additional details see documentation for set.targetE or set.targetMSM