-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I have modify static and dynamic covariates into .RData files in lines code: https://github.com/OD1992/epiwave.mapping/blob/master/NGA_example.Rmd#L237&242.
Currently, dynamic covariates are not included in the X matrix: https://github.com/OD1992/epiwave.mapping/blob/master/NGA_example.Rmd#L925
I want to include treatment seeking (a vector rows=553593) into the reporting fraction r to multiply by the clinical_case_incidence ( matrix 553593x36) in line code: https://github.com/OD1992/epiwave.mapping/blob/master/NGA_example.Rmd#L1052
I fail because of the dimensions.
**Note: this is fixed by
convert the vector to a greta array
s_ts <- as_data(all_s_ts) # greta array of shape (n)
s_ts_matrix <- s_ts %*% t(rep(1, 36)) # now 553593 × 36
reported_clinical_case_incidence <- s_ts_matrix * clinical_case_incidence # r * clinical_case_incidence**
I am still thinking how to create catchment weights for LGAs in line code: https://github.com/OD1992/epiwave.mapping/blob/master/NGA_example.Rmd#L1118.
In section: https://github.com/OD1992/epiwave.mapping/blob/master/NGA_example.Rmd:define_prevalence
I have error (Error in daily_new_infections[prev_index, ]: ! subscript out of bounds) when I run the code without doing this !is.na(prev_index).
I have modify in line code: https://github.com/OD1992/epiwave.mapping/blob/master/NGA_example.Rmd#L1149
prevalence_estimates <- prevalence_prev_locs[idx] (giving dim=3992 x 36) replaced by prevalence_estimates <- prevalence_prev_locs[idx[,2],] (giving dim= 1996 36).
But I still have this issue (Error in initialize(): ! incompatible dimensions: 1996x1, 1996x36) in line #L1155.