Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,19 @@ writing Python code:
python -m gen_surv dataset aft_ln --n 100 > data.csv
```

## 🔧 Available Generators

| Function | Description |
|--------------|--------------------------------------------|
| `gen_cphm()` | Cox Proportional Hazards Model |
| `gen_cmm()` | Continuous-Time Multi-State Markov Model |
| `gen_tdcm()` | Time-Dependent Covariate Model |
| `gen_thmm()` | Time-Homogeneous Markov Model |
| `gen_aft_log_normal()` | Accelerated Failure Time Log-Normal |
## 🔧 API Overview

| Function | Description |
|----------|-------------|
| `generate()` | Unified interface that calls any generator |
| `gen_cphm()` | Cox Proportional Hazards Model |
| `gen_cmm()` | Continuous-Time Multi-State Markov Model |
| `gen_tdcm()` | Time-Dependent Covariate Model |
| `gen_thmm()` | Time-Homogeneous Markov Model |
| `gen_aft_log_normal()` | Accelerated Failure Time Log-Normal |
| `sample_bivariate_distribution()` | Sample correlated Weibull or exponential times |
| `runifcens()` | Generate uniform censoring times |
| `rexpocens()` | Generate exponential censoring times |


```text
Expand Down
Empty file added docs/source/_static/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
"sphinx.ext.napoleon",
"myst_parser",
"sphinx.ext.viewcode",
"sphinx.ext.autosectionlabel",
]

autosectionlabel_prefix_document = True

# Point to index.md or index.rst as the root document
master_doc = "index"

Expand All @@ -36,3 +39,4 @@
html_theme = 'alabaster'
html_static_path = ['_static']


9 changes: 9 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ It includes generators for:
- **Time-Homogeneous Hidden Markov Models (THMM)**
- **Accelerated Failure Time (AFT) Log-Normal Models**

Key functions include `generate()`, `gen_cphm()`, `gen_cmm()`, `gen_tdcm()`,
`gen_thmm()`, `gen_aft_log_normal()`, `sample_bivariate_distribution()`,
`runifcens()`, and `rexpocens()`.

---

See the [Getting Started](usage) guide for installation instructions.

## 📚 Modules

```{toctree}
:maxdepth: 2
:caption: Contents

usage
modules
theory
```
Expand Down Expand Up @@ -77,6 +84,7 @@ genSurvPy/
- [License](https://github.com/DiogoRibeiro7/genSurvPy/blob/main/LICENCE)
- [Code of Conduct](https://github.com/DiogoRibeiro7/genSurvPy/blob/main/CODE_OF_CONDUCT.md)


## Citation

If you use **gen_surv** in your work, please cite it using the metadata in
Expand All @@ -89,3 +97,4 @@ If you use **gen_surv** in your work, please cite it using the metadata in
- ORCID: <https://orcid.org/0009-0001-2022-7072>
- Professional email: <[email protected]>
- Personal email: <[email protected]>

20 changes: 20 additions & 0 deletions docs/source/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,23 @@
options:
members: true
undoc-members: true

::: gen_surv.bivariate
options:
members: true
undoc-members: true

::: gen_surv.censoring
options:
members: true
undoc-members: true

::: gen_surv.cli
options:
members: true
undoc-members: true

::: gen_surv.validate
options:
members: true
undoc-members: true
33 changes: 33 additions & 0 deletions docs/source/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Getting Started

This page offers a quick introduction to installing and using **gen_surv**.

## Installation

The project is managed with [Poetry](https://python-poetry.org). Clone the repository and install dependencies:

```bash
poetry install
```

This will create a virtual environment and install all required packages.

## Basic Usage

Generate datasets directly in Python:

```python
from gen_surv import generate

# Cox Proportional Hazards example
generate(model="cphm", n=100, model_cens="uniform", cens_par=1.0, beta=0.5, covar=2.0)
```

You can also generate data from the command line:

```bash
python -m gen_surv dataset aft_ln --n 100 > data.csv
```

For a full description of available models and parameters, see the API reference.