| Likelihood | R Documentation |
This object represents an estimate of the relevant factors of the likelihood estimated from data, or based on a priori knowledge where appropriate.
That is, it represents some subset of $P_n$. This object inherits from Lrnr_base, and so shares some properties with sl3 learners.
Specifically, to fit a likelihood object to data, one calls likelihood$train(tmle3_task).
Each likelihood factor is represented by an object inheriting from LF_base.
make_Likelihood(...)
... |
Passes all arguments to the constructor. See documentation for the Constructor below. |
R6Class object.
Likelihood object
make_Likelihood(factor_list, ...)
factor_listA list of objects inheriting from LF_base, representing the individual relevant factors.
...Not currently used.
validate_task(tmle_task)Ensure that this likelihood is compatible with a particular tmle3_Task, in that the factor names must match the tmle_task$npsem names.
tmle_task: the tmle3_Task to validate.
get_initial_likelihoods(tmle_task, nodes=NULL)Gets initial (i.e. before any TMLE updates) likelihood values for the specified nodes (or all nodes if none are specified)
for the observations in tmle_task.
tmle_task: tmle3_Task to get likelihood values for
nodes: character vectors, the list of nodes to get likelihood values for. If missing, values will be provided for all nodes.
get_likelihoods(tmle_task, nodes=NULL)Gets updated (i.e. after all TMLE updates) likelihood values for the specified nodes (or all nodes if none are specified)
for the observations in tmle_task.
tmle_task: tmle3_Task to get likelihood values for
nodes: character vectors, the list of nodes to get likelihood values for. If missing, values will be provided for all nodes.
get_possible_counterfactuals(nodes)Gets all possible combination of counterfactual values for a set of nodes. This is useful for marginalizing over a node. Returns a data.frame
with one row per possibility.
nodes: character vectors, the list of nodes to get counterfactual values for. If missing, values will be provided for all nodes.
factor_listThe list of LF_base objects specifying the relevant likelihood factors
observed_valuesThe likelihood values for the observed data. These are cached, as they are used in many places in TMLE
update_listA list of tmle_updates that have been calculated for this likelihood
Other Likelihood objects:
CF_Likelihood,
LF_base,
LF_derived,
LF_emp,
LF_fit,
LF_known,
LF_static,
LF_targeted,
Targeted_Likelihood,
define_lf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.