voiage.methods.network_meta_analysis.NetworkMetaAnalysisData
Data structure for Network Meta-Analysis inputs.
Attributes
Section titled “Attributes”treatment_effects : dict[tuple[str, str], numpy.ndarray]
Mapping from treatment pairs to effect-size samples.
n_studies : int
Number of studies in the network.
treatments : list[str]
Treatment names.
outcome_type : str
Outcome type, such as continuous or binary.
Examples
Section titled “Examples”>>> import numpy as np >>> from voiage.methods.network_meta_analysis import NetworkMetaAnalysisData >>> data = NetworkMetaAnalysisData({(“A”, “B”): np.array([0.1, 0.2])}, 1, [“A”, “B”]) >>> data.get_n_treatments() 2
Methods
Section titled “Methods”get_treatment_names
Section titled “get_treatment_names”get_treatment_names([positional or keyword] self: None = None) -> list[str]Return list of treatment names.
Parameters:
self
Returns: list[str]
get_n_treatments
Section titled “get_n_treatments”get_n_treatments([positional or keyword] self: None = None) -> intReturn number of treatments.
Parameters:
self
Returns: int
get_n_samples
Section titled “get_n_samples”get_n_samples([positional or keyword] self: None = None) -> intReturn number of PSA samples.
Parameters:
self
Returns: int