You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have tried to use the run-stan-single.R script to fit the model in hsgp-eq-cd.stan to 1 wave of the covimod data, and have had a few issues (mainly with some of the helper functions) that may be of your interest.
On line 71, there is an error when applying add_contact_vector, this is because the third argument specifies if you're working with 1 wave, so single must be set to TRUE. So dt.offsets is not necessary
On line 77, when running add_row_major_idx, I found that dt.offsets didn't have all the variables required but dt.cnt did, so we changed the 2nd argument. I also noticed that the u column (index for waves and repetition) was missing but I can see you have made a note of this in stan-utility.R.
On line 80, when using add_part_offsets the second argument is contacts, so rather than being set to dt.offsets, this should be set to dt.cnt
On line 95, when applying add_hsgp_parms, args$hsgp_m needs to be specified as the 4th argument, the second dimension of the HSGP basis approximation
After changing this, I was able to compile the model but then get an error when fitting the stan_data:
Error: Missing input data for the following data variables: N_MM, N_FF, N_MF, N_FM, ROW_MAJOR_IDX_MM, ROW_MAJOR_IDX_FF, ROW_MAJOR_IDX_MF, ROW_MAJOR_IDX_FM, log_N_M, log_N_F, log_S_M, log_S_F, log_P_M, log_P_F.
With these constants and offsets that are missing, you can ensure that they are added to stan_data by changing survey = "COVIMOD" to survey = "POLYMOD" in the helper functions from stan-utility.R. After making these changes, I got a new error that there was a dimension mismatch in log_N_M (it is meant to be length 85 but is actually smaller)
Thanks,
Joshua
The text was updated successfully, but these errors were encountered:
Following Joshua’s issue, just two more things to add:
On line 71 of the run-stan-single.R script, for a single wave on the COVIMOD study, the dt.offsets argument was not needed as outlined in the definition of the add_contact_vector function in the file stan-utility.R :
we used: stan_data <- add_contact_vector(stan_data, dt.cnt, single=TRUE)
We have also tried fitting the hsgp-eq-lrd-a65 model and we cannot seem to find the required helpers.stan file in the Github repository? The helpers.stan file is mentioned in line 4 of the hsgp-eq-lrd-a65.stan file.
Hi Shozen,
We have tried to use the run-stan-single.R script to fit the model in hsgp-eq-cd.stan to 1 wave of the covimod data, and have had a few issues (mainly with some of the helper functions) that may be of your interest.
On line 71, there is an error when applying add_contact_vector, this is because the third argument specifies if you're working with 1 wave, so single must be set to TRUE. So dt.offsets is not necessary
On line 77, when running add_row_major_idx, I found that dt.offsets didn't have all the variables required but dt.cnt did, so we changed the 2nd argument. I also noticed that the u column (index for waves and repetition) was missing but I can see you have made a note of this in stan-utility.R.
On line 80, when using add_part_offsets the second argument is contacts, so rather than being set to dt.offsets, this should be set to dt.cnt
On line 95, when applying add_hsgp_parms, args$hsgp_m needs to be specified as the 4th argument, the second dimension of the HSGP basis approximation
After changing this, I was able to compile the model but then get an error when fitting the stan_data:
Error: Missing input data for the following data variables: N_MM, N_FF, N_MF, N_FM, ROW_MAJOR_IDX_MM, ROW_MAJOR_IDX_FF, ROW_MAJOR_IDX_MF, ROW_MAJOR_IDX_FM, log_N_M, log_N_F, log_S_M, log_S_F, log_P_M, log_P_F.
With these constants and offsets that are missing, you can ensure that they are added to stan_data by changing survey = "COVIMOD" to survey = "POLYMOD" in the helper functions from stan-utility.R. After making these changes, I got a new error that there was a dimension mismatch in log_N_M (it is meant to be length 85 but is actually smaller)
Thanks,
Joshua
The text was updated successfully, but these errors were encountered: