tmle {drpop} | R Documentation |
Returns the targeted maximum likelihood estimates for the nuisance functions
Description
Returns the targeted maximum likelihood estimates for the nuisance functions
Usage
tmle(
datmat,
iter = 250,
margin = 0.005,
stop_margin = 0.005,
twolist = FALSE,
K = 2,
...
)
Arguments
datmat |
The data frame containing columns |
iter |
An integer denoting the maximum number of iterations allowed for targeted maximum likelihood method. Default value is 100. |
margin |
The minimum value the estimates can attain to bound them away from zero. |
stop_margin |
The minimum value the estimates can attain to bound them away from zero. |
twolist |
The logical value of whether targeted maximum likelihood algorithm fits only two modes when K = 2. |
K |
The number of lists in the original data. |
... |
Any extra arguments passed into the function. |
Value
A list of estimates containing the following components:
error |
An indicator of whether the algorithm ran and converged. Returns FALSE, if it ran correctly and FALSE otherwise. |
datmat |
A data frame returning |
References
van der Laan, M. J. and Rubin, D. (2006). Targeted maximum likelihood learning. The International Journal of Biostatistics, 2(1)
Das, M., Kennedy, E. H., & Jewell, N.P. (2021). Doubly robust capture-recapture methods for estimating population size. arXiv preprint arXiv:2104.14091.
Examples
data = matrix(sample(c(0,1), 2000, replace = TRUE), ncol = 2)
xmat = matrix(runif(nrow(data)*3, 0, 1), nrow = nrow(data))
datmat = cbind(data, data[,1]*data[,2], xmat)
colnames(datmat) = c("yj", "yk", "yjk", "q10", "q02", "q12")
datmat = as.data.frame(datmat)
result = tmle(datmat, margin = 0.005, stop_margin = 0.00001, twolist = TRUE)