Repository navigation
Expand file tree
/
Copy pathREADME.Rmd
More file actions
59 lines (44 loc) · 1.9 KB
/
Copy pathREADME.Rmd
File metadata and controls
59 lines (44 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
# [](https://ci.appveyor.com/project/ck37/tlmixture)
```
# 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.
[](https://travis-ci.com/ck37/tlmixture)
## Installation
You can install the development version of tlmixture from GitHub:
```{r install, eval = FALSE}
if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("ck37/tlmixture")
```
## Example
This is a simple example which shows how to use some basic function arguments.
```{r example, eval = FALSE}
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
```