knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

tmleExtract

The goal of tmleExtract is to extract parameter estimates from TMLE fits produced by the tmle package in a tidy format.

Installation

You can install with:

devtools::install_github("nt-williams/tmleExtract")

Example

Basic example:

library(tmleExtract)

set.seed(1)
n <- 250
W <- matrix(rnorm(n*3), ncol=3)
A <- rbinom(n,1, 1/(1+exp(-(.2*W[,1] - .1*W[,2] + .4*W[,3]))))
Y <- A + 2*W[,1] + W[,3] + W[,2]^2 + rnorm(n)
tmle_fit <- tmle::tmle(Y,A,W, Q.SL.library = "SL.glm", g.SL.library = "SL.glm")

tmle_extract(tmle_fit, A, Y)


nt-williams/tmleExtract documentation built on Feb. 28, 2020, 6:32 p.m.