generate_fake_grouped_data: A fake DGP with time varying categorical covariate for...

View source: R/post_stratified_ITS.R

generate_fake_grouped_dataR Documentation

A fake DGP with time varying categorical covariate for illustrating the code.

Description

This code makes synthetic grouped data that can be used to illustrate benefits of post stratification.

Usage

generate_fake_grouped_data(
  t_min,
  t0,
  t_max,
  method = c("complex", "linear", "jersey")
)

Arguments

t_min

Index of first time point

t0

last pre-policy timepoint

t_max

Index of last time point

method

Type of post-stratification structure to generate (three designs of 'complex', 'linear' and 'jersey' were originally concieved of when designing simulation studies with different types of structure).

Value

Dataframe of fake data, with one row per group per time period.

Examples

fdat = generate_fake_grouped_data(t_min=-5,t_max=10, t0 = 0)
table( fdat$time )
table( fdat$type )

lmiratrix/simITS documentation built on Sept. 1, 2023, 9:02 p.m.