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.
eval.target(
DAG,
n,
data,
actions,
rndseed = NULL,
verbose = getOption("simcausal.verbose")
)
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"
.
DAG object with target parameter set via set.targetE
or set.targetMSM
functions
Number of observations to simulate (if simulating full data), this is overwritten by the number of observations in each data
List of action-specific data.frames
generated with sim
or simfull
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)
function. When this argument is missing, full data is automatically sampled from all available actions in the DAG
argument.
Seed for the random number generator.
Set to TRUE
to print messages on status and information to the console.
Turn this off by default using options(simcausal.verbose=FALSE).
For examples and additional details see documentation for set.targetE
or set.targetMSM