Skip to content

Specifying multi-strata beta with matrix #271

Description

@Averydx

At present the syntax for specifying the parameters of a multi-strata model is fairly cumbersome. I propose support for a matrix notation to specify $$\beta_{ij}$$ as entries in a num_strata x num_strata matrix. For example, RUME instantiation would look like

rume = MyRume().build(
    scope=scope,
    time_frame=time_frame,
    params={
        # IPM params
        "*::ipm::gamma": 1 / 10,
        "gpm:age_00-19::ipm::hospitalization_prob": 0.001,
        "gpm:age_20-59::ipm::hospitalization_prob": 0.005,
        "gpm:age_60-79::ipm::hospitalization_prob": 0.01,
        "*::ipm::hospitalization_duration": 5,
        "*::ipm::xi": 1 / 90,

        "*::ipm::beta": np.array([
            [0.4, 0.1, 0.1],
            [0.3, 0.1, 0.3],
            [0.1, 0.2, 0.4],
        ]),

        "*::*::population_by_age_table": acs5.PopulationByAgeTable(),
        "gpm:age_00-19::*::population": acs5.PopulationByAge(0, 19),
        "gpm:age_20-59::*::population": acs5.PopulationByAge(20, 59),
        "gpm:age_60-79::*::population": acs5.PopulationByAge(60, 79),
    },
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions