Skip to content
Merged
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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,32 @@ From the user side, this amounts to creating a dataclass, `SEQopts`, and then fe
```python
import polars as pl
from pySEQTarget import SEQuential, SEQopts
from pySEQTarget.data import load_data

data = pl.from_pandas(SEQdata)
data = load_data("SEQdata")
options = SEQopts(km_curves = True)

# Initiate the class
model = SEQuential(data,
id_col = "ID",
time_col = "time",
eligible_col = "eligible",
treatment_col = "tx_init",
outcome_col = "outcome",
time_varying_cols = ["N", "L", "P"],
fixed_cols = ["sex"],
method = "ITT",
options = options)
parameters = options)
model.expand() # Construct the nested structure
model.bootstrap(bootstrap_nboot = 20) # Run 20 bootstrap samples
model.fit() # Fit the model
model.survival() # Create survival curves
model.plot() # Create and show a plot of the survival curves
model.collect() # Collection of important information

```

## Assumptions
There are several key assumptions in this package -
1. User provided `time_col` begins at 0 per unique `id_col`, we also assume this column contains only integers and continues by 1 for every time step, e.g. (0, 1, 2, 3, 4, ...) is allowed and (0, 1, 2, 2.5, ...) or (0, 1, 4, 5) are not
1. Provided `time_col` entries may be out of order at intake as a sort is enforced at expansion.
2. `eligible_col` and elements of `excused_colnames` are once 1, only 1 (with respect to `time_col`) flag variables.