## Find the average number of cases and their standard deviation mu <- mean(nz_inc$counts, na.rm = T) # average number of cases sigma <- sd(nz_inc$counts, na.rm = T) # standard deviation in the number of cases cv <- mu / sigma # coefficient of variation params <- gamma_mucv2shapescale(mu, cv) serial_interval <- distcrete("gamma", shape = params$shape, scale = params$scale, w = 0, interval = 1)