-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
38 lines (32 loc) · 1.5 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
---
title: "README"
author: "Simon Bond"
date: "5 November 2019"
output:
md_document:
variant: gfm
---
[![Travis-CI Build Status](https://app.travis-ci.com/shug0131/rpsftm.svg?branch=master)](https://app.travis-ci.com/shug0131/rpsftm)
[![codecov](https://app.codecov.io/github/shug0131/rpsftm/branch/master/graphs/badge.svg)](https://app.codecov.io/github/shug0131/rpsftm)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/shug0131/rpsftm?branch=master&svg=true)](https://ci.appveyor.com/project/shug0131/rpsftm)
[![CRAN version](http://www.r-pkg.org/badges/version/rpsftm)](https://cran.r-project.org/package=rpsftm)
[![downloads](https://cranlogs.r-pkg.org/badges/rpsftm)](https://cran.r-project.org/package=rpsftm)
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "tools/README-"
)
```
This is an R package that implements the method of Rank Preserving Structural Failure Time models to estimate causal effects in failure time models in randomised control trials where participants do not comply with the treatment assigned.
As an example:
```{r}
library(rpsftm)
?immdef
fit <- rpsftm(Surv(progyrs, prog)~rand(imm,1-xoyrs/progyrs), data = immdef, censor_time = censyrs)
summary(fit)
plot(fit)
```
The main function is `rpsftm` which returns an object that has `print`, `summary`, and `plot` S3 methods.
See the vignette rpsftm_vignette for further details, explanation and examples.