SEQopts¶
- class pySEQTarget.SEQopts¶
Parameter builder for
pySEQTarget.SEQuentialanalysis- Parameters:
bootstrap_nboot (
int) – Number of bootstraps to performbootstrap_sample (
float) – Subsampling proportion of ID-Trials gathered for each bootstrapping iterationbootstrap_CI (
float) – If bootstrapped, confidence interval levelbootstrap_CI_method (
Literal['se','percentile']) – If bootstrapped, confidence interval method [‘SE’ or ‘percentile’]cense_colname (
Optional[str]) – Column name for censoring effect (LTFU, etc.)cense_denominator (
Optional[str]) – Override to specify denominator patsy formula for censoring models; “1” or “” indicate intercept only modelcense_numerator (
Optional[str]) – Override to specify numerator patsy formula for censoring modelscense_eligible_colname (
Optional[str]) – Column name to identify which rows are eligible for censoring model fittingcompevent_colname (
Optional[str]) – Column name specifying a competing event to the outcomecovariates (
Optional[str]) – Override to specify the outcome patsy formula for outcome model fittingdenominator (
Optional[str]) – Override to specify the outcome patsy formula for denominator model fittingexcused (
bool) – Boolean to allow excused conditions when method is censoringexcused_colnames (
List[str]) – Column names (at the same length of treatment_level) specifying excused conditions, default[]expand_only (
bool) – If True,SEQuential.expand()returns the expanded dataset and skips weighting, modelling, and survival stepsglm_package (
Literal['statsmodels','glum','jax']) – Backend for fitting logistic (outcome/competing-event) models [“statsmodels”, “glum”, or “jax”], default “statsmodels”.followup_class (
bool) – Boolean to force followup values to be treated as classesfollowup_include (
bool) – Boolean to force regular followup values into model covariatesfollowup_spline (
bool) – Boolean to force followup values to be fit to cubic splinefollowup_spline_df (
int) – Degrees of freedom for the followup cubic spline, default4followup_max (
int) – Maximum allowed followup in analysisfollowup_min (
int) – Minimum allowed followup in analysishazard_estimate (
bool) – Boolean to create hazard estimatesindicator_baseline (
str) – How to indicate baseline columns in modelsindicator_squared (
str) – How to indicate squared columns in modelskm_curves (
bool) – Boolean to create survival, risk, and incidence (if applicable) estimatesncores (
Optional[int]) – Number of cores to use if running in parallel, defaultmax(1, cpu_count() - 1)numerator (
Optional[str]) – Override to specify the outcome patsy formula for numerator models; “1” or “” indicate intercept only modeloffload (
bool) – Boolean to offload intermediate model data to diskoffload_dir (
str) – Directory to offload intermediate model dataparallel (
bool) – Boolean to run model fitting in parallelplot_colors (
List[str]) – List of colors for KM plots, if applicable, default["#F8766D", "#00BFC4", "#555555"]plot_labels (
List[str]) – List of length treat_level to specify treatment labeling, default[]plot_title (
str) – Plot titleplot_type (
Literal['risk','survival','incidence']) – Type of plot to show [“risk”, “survival” or “incidence” if compevent is specified]risk_times (
Optional[List[float]]) – Followup times at which to report risk difference and risk ratio whenkm_curves = True. Each requested time is snapped to the latest available followup at or before it, and the maximum followup is always included. Defaults toNone(report at the maximum followup only).selection_first_trial (
bool) – Boolean to only use first trial for analysis (similar to non-expanded)selection_sample (
float) – Subsampling proportion of ID-trials which did not initiate a treatmentselection_random (
bool) – Boolean to randomly downsample ID-trials which did not initiate a treatmentsubgroup_colname (
str) – Column name for subgroups to share the same weighting but different outcome model fitstreatment_level (
List[int]) – List of eligible treatment levels within treatment_col, default[0, 1]trial_include (
bool) – Boolean to force trial values into model covariatesvisit_colname (
str) – Column name specifying visit numberweight_eligible_colnames (
List[str]) – List of column names of length treatment_level to identify which rows are eligible for weight fitting, default[]weight_fit_method (
Literal['newton','bfgs','lbfgs','nm']) – The fitting method to be used [“newton”, “bfgs”, “lbfgs”, “nm”], default “newton”weight_min (
float) – Minimum weightweight_max (
float) – Maximum weightweight_lag_condition (
bool) – Boolean to fit weights based on their treatment lagweight_p99 (
bool) – Boolean to force weight min and max to be 1st and 99th percentile respectivelyweight_preexpansion (
bool) – Boolean to fit weights on preexpanded dataverbose (
bool) – Boolean to print dataset size summaries and bootstrap informationweighted (
bool) – Boolean to weight analysis
- __init__(bootstrap_nboot=0, bootstrap_sample=0.8, bootstrap_CI=0.95, bootstrap_CI_method='se', cense_colname=None, cense_denominator=None, cense_numerator=None, cense_eligible_colname=None, compevent_colname=None, covariates=None, cox_package='lifelines', denominator=None, excused=False, excused_colnames=<factory>, expand_only=False, glm_package='statsmodels', followup_class=False, followup_include=True, followup_max=None, followup_min=0, followup_spline=False, followup_spline_df=4, hazard_estimate=False, indicator_baseline='_bas', indicator_squared='_sq', km_curves=False, ncores=None, numerator=None, offload=False, offload_dir='_seq_models', parallel=False, plot_colors=<factory>, plot_labels=<factory>, plot_title=None, plot_type='survival', risk_times=None, seed=None, selection_first_trial=False, selection_sample=0.8, selection_random=False, subgroup_colname=None, treatment_level=<factory>, trial_include=True, visit_colname=None, weight_eligible_colnames=<factory>, weight_fit_method='newton', weight_min=0.0, weight_max=None, weight_lag_condition=True, weight_p99=False, weight_preexpansion=True, verbose=False, weighted=False)¶