Skip to content

Commit

Permalink
rename stanmodels to survivalstan
Browse files Browse the repository at this point in the history
  • Loading branch information
jburos committed Jul 12, 2016
1 parent 1a77b60 commit 0201845
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1 +1 @@
recursive-include stanmodels/stan *
recursive-include survivalstan/stan *
18 changes: 9 additions & 9 deletions README.md
Expand Up @@ -13,12 +13,12 @@ Installation / Usage

To install use pip:

$ pip install stanmodels
$ pip install survivalstan


Or clone the repo:

$ git clone https://github.com/jburos/stanmodels.git
$ git clone https://github.com/jburos/survivalstan.git
$ python setup.py install

Contributing
Expand All @@ -30,7 +30,7 @@ Example
-------

```
import stanmodels
import survivalstan
import stanity
import seaborn as sb
import matplotlib.pyplot as plt
Expand All @@ -41,27 +41,27 @@ d = dataset.data.query('futime > 7')
d.reset_index(level = 0, inplace = True)
## e.g. fit Weibull survival model
testfit_wei = stanmodels.fit_stan_survival_model(
testfit_wei = survivalstan.fit_stan_survival_model(
model_cohort = 'Weibull model',
model_code = stanmodels.stan.weibull_survival_model,
model_code = survivalstan.stan.weibull_survival_model,
df = d,
time_col = 'futime',
event_col = 'death',
formula = 'age + sex',
iter = 3000,
chains = 4,
make_inits = stanmodels.make_weibull_survival_model_inits
make_inits = survivalstan.make_weibull_survival_model_inits
)
## coefplot for Weibull coefficient estimates
sb.boxplot(x = 'value', y = 'variable', data = testfit_wei['coefs'])
## e.g. fit Piecewise-exponential survival model
dlong = stanmodels.prep_data_long_surv(d, time_col = 'futime', event_col = 'death')
testfit_pem = stanmodels.fit_stan_survival_model(
dlong = survivalstan.prep_data_long_surv(d, time_col = 'futime', event_col = 'death')
testfit_pem = survivalstan.fit_stan_survival_model(
model_cohort = 'PEM model',
model_code = stanmodels.stan.pem_survival_model,
model_code = survivalstan.stan.pem_survival_model,
df = dlong,
sample_col = 'index',
timepoint_end_col = 'end_time',
Expand Down
2 changes: 1 addition & 1 deletion lint.sh
@@ -1,7 +1,7 @@
#!/bin/bash
set -o errexit

find stanmodels test -name '*.py' \
find survivalstan test -name '*.py' \
| xargs pylint \
--errors-only \
--disable=print-statement
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Expand Up @@ -7,6 +7,6 @@ description-file=README.md
[versioneer]
VCS = git
style = pep440
versionfile_source = stanmodels/_version.py
versionfile_build = stanmodels/_version.py
versionfile_source = survivalstan/_version.py
versionfile_build = survivalstan/_version.py
tag_prefix = ''
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -20,13 +20,13 @@
dependency_links = [x.strip().replace('git+', '') for x in all_reqs if 'git+' not in x]

setup(
name='stanmodels',
name='survivalstan',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='Library of Stan Models for Computational Biology',
long_description=long_description,
url='https://github.com/jburos/stanmodels',
download_url='https://github.com/jburos/stanmodels/tarball/' + versioneer.get_version(),
url='https://github.com/jburos/survivalstan',
download_url='https://github.com/jburos/survivalstan/tarball/' + versioneer.get_version(),
license="http://www.apache.org/licenses/LICENSE-2.0.html",
classifiers=[
"Development Status :: 3 - Alpha",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0201845

Please sign in to comment.