Skip to content

"output_years" argument in multi-state function for non-single year time intervals. #41

@shajiang93

Description

@shajiang93

When my input data is structured in 5-year intervals, such as 2020, 2025, 2030, and 2035, specifying output_years = c(2020, 2025, 2030, 2035) causes an out-of-bound error. This happens because the multi-state function attempts to select input matrix lists at positions c(1, 5, 10, 15) instead of the intended c(1, 2, 3, 4). What I am doing currently is to give output_years as c(1,2,3,4) to make the function work and then recode the year- and age-related variables in the output later. But this seems not to be convenient. A potential solution to make this argument more flexible is to rename the list of input matrices based on the corresponding years, or any better solutions?

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