SEQoutput¶
- class pySEQTarget.SEQoutput¶
Collector class for results from
SEQuential- Parameters:
options (
SEQopts) – Options used in the SEQuential processmethod (
str) – Method of analysis [‘ITT’, ‘dose-response’, or ‘censoring’]numerator_models (
List[ResultsWrapper]) – Numerator models, if applicable, from the weighting processdenominator_models (
List[ResultsWrapper]) – Denominator models, if applicable, from the weighting processcompevent_models (
List[List[ResultsWrapper]]) – Competing event models, if applicableweight_statistics (
DataFrame) – Weight statistics once returned back to the expanded datasethazard (
DataFrame) – Hazard ratio if applicablekm_data (
DataFrame) – Dataframe of risk, survival, and incidence data if applicable at all followupskm_graph (
Figure) – Figure of survival, risk, or incidence over followup timesrisk_ratio (
DataFrame) – Dataframe of risk ratios, compared between treatments and subgroupsrisk_difference (
DataFrame) – Dataframe of risk differences, compared between treatments and subgroupstime (
dict) – Timings for every step of the process completed thus fardiagnostic_tables (
dict) – Diagnostic tables (outcome, follow-up, switch, and competing-event counts where applicable), each split by baseline treatment arm. The “unique” tables count distinct subjects; the “nonunique” tables count rows: total outcome events for the outcome tables, and total person-time intervals (expanded follow-up rows) for the follow-up tables. For a one-time (terminal) outcome the unique and nonunique outcome counts coincide, since each subject contributes at most one event row.
- __init__(options=None, method=None, numerator_models=None, denominator_models=None, outcome_models=None, compevent_models=None, weight_statistics=None, hazard=None, km_data=None, km_graph=None, risk_ratio=None, risk_difference=None, time=None, diagnostic_tables=None)¶
- retrieve_data(type=None)¶
Getter for data stored within
SEQoutputThe diagnostic tables come in “unique” and “nonunique” variants that count different things, each broken down by baseline treatment arm:
unique_outcomes/nonunique_outcomes: distinct subjects who had the outcome vs. the total number of outcome events. These coincide for a one-time (terminal) outcome, since each subject contributes at most one event row.unique_followup/nonunique_followup: distinct subjects contributing follow-up vs. the total number of person-time intervals (expanded rows). The nonunique count is much larger because each subject contributes one row per follow-up period; it is the denominator that, withnonunique_outcomes, gives the per-arm event rate.
- Parameters:
type (
Optional[Literal['km_data','hazard','risk_ratio','risk_difference','unique_outcomes','nonunique_outcomes','unique_followup','nonunique_followup','unique_compevent','nonunique_compevent','unique_switches','nonunique_switches']]) – Data which you would like to access, [‘km_data’, ‘hazard’, ‘risk_ratio’, ‘risk_difference’, ‘unique_outcomes’, ‘nonunique_outcomes’, ‘unique_followup’, ‘nonunique_followup’, ‘unique_compevent’, ‘nonunique_compevent’, ‘unique_switches’, ‘nonunique_switches’]- Return type:
DataFrame
- summary(type=None)¶
Returns a list of model summaries of either the numerator, denominator, outcome, or competing event models
- to_md(filename='SEQuential_results.md')¶
Generates a markdown report of the SEQuential analysis results.
- Return type: