Skip to content

Move contact matrix transpose inside model function? #259

@adamkucharski

Description

@adamkucharski

Currently we have the following pre-processing step in {epidemics} vignettes:

# prepare contact matrix
contact_matrix <- t(contact_data[["matrix"]])

This is to ensure that the internal conversion of R0 to beta is correct in the .prepare_population() step (full breakdown here). However, the transpose is often quite confusing for new users, particularly as it occurs so early in code.

Would be easier to just implement the transpose internally at the start of model_default()? I can't see any reason this would be an issue, and could make usage of the package more intuitive.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions