Issues with compare()
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
The error comes from $ being applied to the cstanfit attribute of a fitted model inside compare(), so start with that attribute: fit two small binomial models, then check class(attr(fit, "cstanfit")) and what compare() expects there. The report says it fails with cmdstanr 0.8.1.9 and that the work-around in #443 breaks it, so compare those two code paths. Done means compare() runs on the binomial models without the S4 error and the outputs still save.
Written by the indexing model from the issue text.
Description
I am trying to compare multiple binomial models that have various combinations of variables. When I try to compare(modelnames...), I receive the following error message:
Error in attr(object, "cstanfit")$draws :
$ operator not defined for this S4 class
Any insight on what may be causing this? This is a new problem and wasn't having this issue about a month ago.
I have tried using the current version of rethinking, compare will work but it will not save my outputs. I have used @timjzee 's version noted in #443 which will save outputs successfully, but I will receive that error when comparing. I have tried mixing and matching rethinking versions and that does not work.
Cmdnstanr version 0.8.1.9
Thanks!
- Dominant language
- R
- Stars
- 2.4k
- Forks
- 632
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rmcelreath/rethinking
-
Typo: p.381Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
rmcelreath/rethinking#482 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rmcelreath/rethinking#476 ·
-
Typo: p.302Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
rmcelreath/rethinking#475 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
rmcelreath/rethinking#474 ·
-
Comma splice: p.557Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rmcelreath/rethinking#471 ·
All issues in rmcelreath/rethinking
Similar issues
-
1.7
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pharmaverse/admiral#3235 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SticsRPacks/CroPlotR#185 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day