create_design_matrices: Create Design Matrices

View source: R/model_prep.R

create_design_matricesR Documentation

Create Design Matrices

Description

Create design matrices for fixed effects and temporal, age, spatial and random effects, for both medical and traditional circumcision.

Usage

create_design_matrices(
  dat,
  area_lev = NULL,
  k_dt_age = 5,
  k_dt_time = 5,
  inc_time_tmc = FALSE
)

Arguments

dat

Shell dataset (datputted by create_shell_dataset with a row for every unique record in circumcision survey data for a given area. Also includes empirical estimates for circumcision estimates for each unique record.

area_lev

PSNU area level for specific country.

k_dt_age

Age knot spacing in spline definitions, Default: 5

k_dt_time

Time knot spacing in spline definitions, set to NULL to disable temporal splines, Default: NULL

inc_time_tmc

Indicator variable which decides whether to include temporal random effects for TMC as well as MMC, Default: FALSE

Value

List of design matrices for fixed and random effects for medical and traditional circumcision.

See Also

create_shell_dataset splineDesign tensor.prod.model.matrix as sparse.model.matrix


mrc-ide/threemc documentation built on Feb. 9, 2024, 5:16 p.m.