Model Frame and Linear Transform for Aggregated Model Outputs

naomi_output_frame(
  mf_model,
  area_aggregation,
  age_groups = unique(mf_model[["age_group"]]),
  sexes = unique(mf_model[["sex"]])
)

Arguments

mf_model

Model frame

area_aggregation

data.frame with columns area_id and model_area_id.

age_groups

Age groups to include in aggregated outputs.

sexes

Sexes to include in aggregated outputs.

Value

A list consisting of a data.frame mf and a sparse matrix A. The data frame mf provides a model matrix defining the stratifications for the outputs. The sparse matrix A defines a linear transform to aggregate the rows of mf_model to the rows of the output mf