marcdotson / counting-cockroaches

Using social media to assess the severity of service failures.
MIT License
3 stars 0 forks source link

Mckenna mrp #33

Closed weechm closed 4 years ago

weechm commented 4 years ago

@marcdotson I started to make an outline for the case study. I have the data generating and the poststratification code. @adamhettinger1 and I are planning on adding in the stan model that he has been building after we add to it what I have been able to learn from the rstanarm code

weechm commented 4 years ago

Hey @adamhettinger1 just looking at your code. Looks awesome by the way. I was wondering if you have started looking into at all making a data list from the generated data in the case study or are you just going through the prior predictive checks right now?

adamhettinger1 commented 4 years ago

I’ve just been trying to get through prior checks .

On Fri, Jan 31, 2020 at 1:46 PM McKenna Weech notifications@github.com wrote:

Hey @adamhettinger1 https://github.com/adamhettinger1 just looking at your code. Looks awesome by the way. I was wondering if you have started looking into at all making a data list from the generated data in the case study or are you just going through the prior predictive checks right now?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/marcdotson/counting-cockroaches/pull/33?email_source=notifications&email_token=ALWGY5SDSM53774IKQ5S6KLRASE3JA5CNFSM4KIN26B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKP6PIY#issuecomment-580904867, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWGY5Q2UFYBGV2EJEFFNFLRASE3JANCNFSM4KIN26BQ .

weechm commented 4 years ago

@marcdotson Can you look at my stan code. Specifically the hierarchical logit model on line 236 of the Case Study (McKenna). I keep getting the following error message that I don't understand

Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : Exception: variable does not exist; processing stage=data initialization; variable name=D; base type=int (in 'model1661a6932983_logit_hier' at line 2)

failed to create the sampler; sampling not done

marcdotson commented 4 years ago

@weechm I can't replicate the error. There are a number of files that are referenced in your markdown but aren't pushed to GitHub (or created as part of the script).

However, it's clearly an issue with compiling the sampler. The error references variable name D as well as line 2 of the logit_hier model, which is where D is specified as an integer. I would recommend first removing the the lower constraint on D and then changing D to real instead of integer.

If you can push the files that are referenced (or, better yet, have them be created as part of the script), I can dig into this more if those recommendations don't do anything.

weechm commented 4 years ago

@marcdotson which files aren't there because they should all be pushed but also I worried because it looks like none of my stan models are running but I'm trying to look into it.

Also, if you want to start looking through the case study. It is still very rough because again the stan models aren't running but as you can see I am trying to compare three different models that we have found and will probably end up using some from all three. I'm interested in maybe pulling in fixed effects from the downes model and interaction terms from the original Lauren case study into the stan user guide mrp model but I'm still working my way up there.

P.S. I haven't spell checked it yet so I hope my many many spelling errors brighten your day.

marcdotson commented 4 years ago

@weechm @hannahlee36 here's what I found:

Not sure on the Stan User's Guide one. Next steps: Explain the models that we're running. Use my blog posts as a template. If you can explain the first two models, starting with the simplest, you should have a better idea of how to get the final model working and explain it so we can move on to post-stratification.

P.S. RStudio 1.3 is out and has built-in spellchecking. Use it! ;)