knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) # [](https://ci.appveyor.com/project/ck37/tlmixture)
tlmixture is an R package to construct mixtures of groups of correlated exposures (treatments) and estimate the relationship between the mixture and an outcome.
You can install the development version of tlmixture from GitHub:
if (!requireNamespace("remotes")) install.packages("remotes") remotes::install_github("ck37/tlmixture")
This is a simple example which shows how to use some basic function arguments.
library(tlmixture) # Basic example code result = tlmixture( # Dataframe containing outcome, exposures, and adjustment variables. data, # Name of the outcome variable. outcome = "y", # Vector of exposure names (single group), or a list with separate vectors per group. exposures = c("exposure1", "exposure2", "exposure3") # This will evaluate mixtures at low/medium/high levels. quantiles_mixtures = 3, # This SuperLearner library will be used for propensity too. estimator_outcome = c("SL.mean", "SL.glmnet", "SL.ranger") # How many CV-TMLE folds to use; more is generally better, but slower to compute. folds_cvtmle = 3) # Review parameter estimates and confidence intervals. result$combined$results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.