as_setting_prediction_matrix: Coerce object to a setting prediction matrix

View source: R/setting-prediction-matrix.R

as_setting_prediction_matrixR Documentation

Coerce object to a setting prediction matrix

Description

This will also calculate an all matrix, if all is not specified. This is the sum of all other matrices.

Usage

as_setting_prediction_matrix(list_matrix, age_breaks, ...)

Arguments

list_matrix

list of matrices

age_breaks

numeric vector of ages

...

extra arguments (currently not used)

Value

object of class setting prediction matrix

Examples


age_breaks_0_80_plus <- c(seq(0, 80, by = 10), Inf)
one_by_nine <- matrix(1, nrow = 9, ncol = 9)

mat_list <- list(
  home = one_by_nine,
  work = one_by_nine
)

mat_list

mat_set <- as_setting_prediction_matrix(
  mat_list,
  age_breaks = age_breaks_0_80_plus
)

mat_set


njtierney/conmat documentation built on April 17, 2025, 10:27 p.m.