-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
59 lines (38 loc) · 1.18 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# Cureit
<!-- badges: start -->
<!-- badges: end -->
This package allows you to easily fit and report results from cure mixture models using a tidy framework. The package includes functions to:
- Fit mixture cure models
- Summarize coefficients using tidiers and gtsummary
- Vizualize the data using nomograms
- Assess model results with Brier scores and K-indicies
## Installation
You can install {cureit} with the following code:
```{r ,eval=F}
remotes::install_github("karissawhiting/cureit")
```
Load the package:
```{r}
library(cureit)
```
# Fit Mixture Cure Models
Functions to fit the models are wrappers for the `smcure()` function from the {smcure} package with the additional capability of passing a formula and directly passing categortical variables without first creating a model matrix:
```{r}
p <- cureit(surv_formula = Surv(ttdeath, death) ~ age,
cure_formula = ~ age,
data = trial)
p$surv_coefs
p$cure_coefs
```