Created
February 24, 2025 05:54
-
-
Save njtierney/0a896e7f0bce33bd49e57cf1d9a99ef8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
# example structure of the data | |
# some of the columns are: | |
# Months (1 2 3, 13, 14 15), Arm (control, intervention) | |
# Before_After (beofre, after), Village ( 1:8), household (1:8), weight (number?) | |
# this is painful... | |
tibble( | |
month = c(1, 1, 2, 2, 3, 3, 13, 13, 14, 14, 15, 15), | |
arm = c(rep("control", 2) | |
) | |
data_template <- expand_grid( | |
month = c(1:3, 13:15), | |
arm = c("control", "intervention"), | |
before_after = c("before", "after"), | |
village = 1:8, | |
household = 1:8, | |
weight = NA | |
) | |
data_template |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment