Description Usage Arguments See Also
View source: R/tmle_parallel.R
This is needed to use Savio or any multicore system effectively.
Another benefit is that the SuperLearner objects for the Q and g estimation are saved. This allows one to examine the risk estimates for example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | tmle_parallel(
Y,
A,
W,
family,
g.SL.library,
Q.SL.library,
id = 1:length(Y),
verbose = F,
V = 5,
sl_fn = SuperLearner::SuperLearner,
cvsl_fn = SuperLearner::CV.SuperLearner,
cvQinit = F,
conserve_memory = T,
...
)
|
Y |
Outcome |
A |
Treatment indicator |
W |
Covariates |
family |
Gaussian or binomial |
g.SL.library |
SL library for estimating g |
Q.SL.library |
SL library for estimating Q |
id |
Optional list of subject-specific ids. |
verbose |
If TRUE outputs additional information during execution. |
V |
Number of cross-validation folds to use when estimating g and Q. Defaults to 5 as tmle package does. |
sl_fn |
SuperLearner function to use for estimation of g and possibly Q. By default this uses the normal SuperLearner function which is sequential. Other options would be to pass in mcSuperLearner, snowSuperLearner, or CV.SuperLearner. For functions that require additional arguments (e.g. the cluster argument of for snowSuperLearner) one should create a new function that overloads the call and sets that argument. This is what setup_parallel_tmle() does. |
cvsl_fn |
CV.SuperLearner equivalent, can be used for estimating Q. |
cvQinit |
If T, estimate Q using cvsl_fn, otherwise use sl_fn. |
conserve_memory |
If T, remove the fitLibrary elements to save memory after we have done the relevant prediction. |
... |
Remaining arguments are passed through to tmle::tmle(). |
setup_parallel_tmle
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.