karimn / covid-19-transmission

0 stars 0 forks source link

Error when adding stringency_index to the model #41

Open Junyi-Que opened 4 years ago

Junyi-Que commented 4 years ago

When I add the stringency_index to the model using the new dataset (which can be found in the Dropbox), it reports the following:

Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : Exception: mismatch in dimension declared and found in context; processing stage=data initialization; variable name=design_matrix; position=0; dims declared=(2361,4); dims found=(2250,4) (in 'model359444027750_mobility' at line 50)

Junyi-Que commented 4 years ago

Problem located, which can be resolved from either the data side or the function side (the prepare_subnat_data function). I think it will induce the fewest changes to existing codes if I approach from the data side. I'll implement this tomorrow morning and report results.

karimn commented 4 years ago

I tried to look at the data but I didn't find the new columns in mergecleaned.csv.

Junyi-Que commented 4 years ago

Do you look at the data on GIT? I didn't push that to GIT. Look for it in the dropbox. Data Collection/OpenCovid/clean

Junyi-Que commented 4 years ago

Don't worry about it. The problem is simply that the data I provided starts from the first date when the mobility data is available but some subregions got seeded before that. You manually added spread data and mobility data before that but not for the newly added stringency index. I think it might be easier for me to solve this on the data side.

karimn commented 4 years ago

I see, ok that makes sense. When you do push your changes please also update the mergecleaned.csv file in the data/ directory. In some cases, run_mob.R needs to prepare its own version of the cleaned data.

FYI, when making changes it is safe to make them to separate branch and when it is ready goto https://github.com/karimn/covid-19-transmission/pulls to make a pull request specifying the branch you are developing this and the master branch.

Junyi-Que commented 4 years ago

The problem has been fixed and the code is running. I'll commit changes to my branch once it's done.