rmcelreath / rethinking

Statistical Rethinking course and book package
2.14k stars 601 forks source link

Multi-level model issue #254

Open SP977 opened 4 years ago

SP977 commented 4 years ago

after running model m14.2 (beta-binomial model)- I got the following error: Error in unserialize(socklist[[n]]) : error reading from connection Error in serialize(data, node$con, xdr = FALSE) : error writing to connection

Then I changed cores= 1 from 4, This works for this model. Then I moved to the m14.3 model, after running the model R crashed. Are there any thoughts to fix it? Help appreciated!

rmcelreath commented 4 years ago

This is an issue with Stan, possibly the StanHeaders issue others have been experiencing. See https://github.com/rmcelreath/rethinking/issues/252#issuecomment-650113991

paul-grassl commented 4 years ago

I'm still experiencing problems with a beta-binomial model even with a newer version of rstan (2.21.2). Is downgrading rstan and StandHeaders still the recommended way?

My versions:

packageVersion('rethinking') [1] ‘2.1’ packageVersion('StanHeaders') [1] ‘2.21.0.6’ packageVersion('rstan') [1] ‘2.21.2’

rmcelreath commented 4 years ago

There have been lots of issues with rstan. I can't really recommend a specific solution for rstan, but you might try cmdstanr. See https://github.com/rmcelreath/rethinking#quick-installation

paul-grassl commented 4 years ago

Okay, thank you for the fast response!