jriou / covid_adjusted_cfr

MIT License
88 stars 29 forks source link

problems to run the R codes #6

Open tina1010 opened 4 years ago

tina1010 commented 4 years ago

Hi, I read through the manuscript which is truly fascinating. However, while running the code, I faced with some difficulties. Could anyone please guide me how to start and reproduce the results here. I tried running the code of "output_model13_italy.R", but I do not have the "model13IT_2020-03-18.Rdata" file in my directory. Any kind of help will be much appreciated. Thanks. Moumita.

jriou commented 4 years ago

Hi Moumita,

You need to first create model13IT_2020-03-18.Rdata from the different chains that are saved in posterior_samples by running the last part of run_models/run_model13_italy.R.

Sorry if it wasn't clear, we didn't have time to clean the code properly so users that want to run it need to dig up a bit in the code.

Let me know if it works, Julien

tina1010 commented 4 years ago

Hi Julien, Thank you so much for your help. I can understand that it is not possible everytime to clean such an extensive code. Following your suggestion, I tried running "run_models/run_model13_italy.R". It went well in the beginning. But, for "M_model13 = stan_model("models/model13d.stan")" command, R is giving me the following erorr after running it for sometimes. Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3a3078215171.o:file3a3078215171.cpp:(.text$_ZN4stan4math17cvodes_integratorILi2EE9integrateIN36model3a3014722a94_model13d_namespace14SEIR_functorEddEESt6vectorIS6_INS_11return_typeIT0_JT1_EE4typeESaISB_EESaISD_EERKT_RKS6_IS8_SaIS8_EEdRKS6_IdSaIdEERKS6_IS9_SaIS9_EESQ_RKS6_IiSaIiEEPSoddl[_ZN4stan4math17cvodes_integratorILi2EE9integrateIN36model3a3014722a94_model13d_namespace14SEIR_functorEddEESt6vectorIS6_INS_11return_typeIT0_JT1_EE4typeESaISB_EESaISD_EERKT_RKS6_IS8_SaIS8_EEdRKS6_IdSaIdEERKS6_IS9_SaIS9_EESQ_RKS6_IiSaIiEEPSoddl]+0x26d): undefined reference to `N_VMake_Serial' C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3a3078215171.o:file3a3078215171.cpp:(.text$_ZN4stan4math17cvodes_integratorILi2EE9integrateIN36model3a3014722a94_model13dnamespace14SEIR Error in sink(type = "output") : invalid connection

Is it a problem of my "rtools" installation? or am I making some serious mistake? Again thanks for your reply! Moumita