<commit_before>stremr
==========

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/stremr)](http://cran.r-project.org/package=stremr)
[![](http://cranlogs.r-pkg.org/badges/stremr)](http://cran.rstudio.com/web/packages/stremr/index.html)
[![Travis-CI Build Status](https://travis-ci.org/osofr/stremr.svg?branch=master)](https://travis-ci.org/osofr/stremr)
[![Coverage Status](https://coveralls.io/repos/osofr/stremr/badge.svg?branch=master&service=github)](https://coveralls.io/github/osofr/stremr?branch=master)

The `stremr` R package implements the tools for streamlined analysis of  survival for treatment and monitoring events. In particular, it implements the Inverse Probability Weighted Estimator (IPW) of the hazard function in time-to-failure data. The user can specify static, dynamic or stochastic interventions on time-varying treatment, time-varying monitoring events. The input data needs to be in long format, with a specific **fixed** temporal ordering of the variables. The package supports modeling of right-censored data, where right-censoring variables can be coded as either binary or categorical (to represent all of the censoring events with one variable). Either representation allows for separate modeling of different right-censoring events. The time-varying exposures and monitoring events can be multivariate (several exposures and monitoring events at each time point). More than one variable can be used for coding each exposure and monitoring event and each of these can be binary, categorical or continuous. Separate models are fit for the observed censoring, exposure and monitoring mechanisms and each of these models can be fit by either pooling all subject-time data or by stratifying the model fits according to some arbitrary user-specified criteria. For example, the user may request that the exposure mechanism is modeled separately for each of the observed time-points (stratified by time). The same applies to modeling monitoring and censoring mechanisms. The output includes the estimated survival curve, which is obtained as a mapping from the estimated discrete hazard function. When several interventions for exposure/monitoring are specified, the package will produce one survival estimate for each intervention.

### Installation

<!-- To install the CRAN release version of `stremr`: 

```R
install.packages('stremr')
```
 -->

To install the development version (requires the `devtools` package):

```R
devtools::install_github('osofr/stremr', build_vignettes = FALSE)
```

### Documentation

 For the general overview of the package:

```R
?stremr-package
```

For specific documentation on how to run `stremr()` function:
```R
?stremr
```

<!-- Once the package is installed, see the [vignette](http://cran.r-project.org/web/packages/stremr/vignettes/stremr_vignette.pdf), consult the internal package documentation and examples. 
<commit_msg>fix intro<commit_after>stremr
==========

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/stremr)](http://cran.r-project.org/package=stremr)
[![](http://cranlogs.r-pkg.org/badges/stremr)](http://cran.rstudio.com/web/packages/stremr/index.html)
[![Travis-CI Build Status](https://travis-ci.org/osofr/stremr.svg?branch=master)](https://travis-ci.org/osofr/stremr)
[![Coverage Status](https://coveralls.io/repos/osofr/stremr/badge.svg?branch=master&service=github)](https://coveralls.io/github/osofr/stremr?branch=master)

The `stremr` R package implements the tools for streamlined analysis of  survival for treatment and monitoring events. In particular, it implements the Inverse Probability Weighted Estimator (IPW) of the hazard function in time-to-failure data. The user can specify static, dynamic or stochastic interventions on time-varying treatment, time-varying monitoring events. The input data needs to be in long format, with a specific **fixed** temporal ordering of the variables. The package supports modeling of right-censored data, where right-censoring variables can be coded as either binary or categorical (to represent all of the censoring events with one variable). Either representation allows for separate modeling of different right-censoring events. More than one variable can be used for coding each exposure and monitoring event and each of these can be binary, categorical or continuous. Separate models are fit for the observed censoring, exposure and monitoring mechanisms and each of these models can be fit by either pooling all subject-time data or by stratifying the model fits according to some arbitrary user-specified criteria. For example, the user may request that the exposure mechanism is modeled separately for each of the observed time-points (stratified by time). The same applies to modeling monitoring and censoring mechanisms. The output includes the estimated survival curve, which is obtained as a mapping from the estimated discrete hazard function. When several interventions for exposure/monitoring are specified, the package will produce one survival estimate for each intervention.

### Installation

<!-- To install the CRAN release version of `stremr`: 

```R
install.packages('stremr')
```
 -->

To install the development version (requires the `devtools` package):

```R
devtools::install_github('osofr/stremr', build_vignettes = FALSE)
```

### Documentation

 For the general overview of the package:

```R
?stremr-package
```

For specific documentation on how to run `stremr()` function:
```R
?stremr
```

<!-- Once the package is installed, see the [vignette](http://cran.r-project.org/web/packages/stremr/vignettes/stremr_vignette.pdf), consult the internal package documentation and examples. 

{'fraction_non_alphanumeric': 0.09236735413361537, 'fraction_numerical': 0.0, 'mean_word_length': 5.404063205417607, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1807773', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1463, 'n_words': 623}