Comments (11)
I have the problem with fits from brms launched through brms::launch_shiny, but not with rstanarm fits launched via rstanarm::launch_shinystan, so if you can't reproduce it, maybe it's on @paul-buerkner's side and Gene Quinn did not mention this.
from shinystan.
Thanks for reporting. I still haven't been able to reliably reproduce this
problem so it's been difficult to debug. Haven't forgotten about it though.
When used with rstanarm models, shinystan lets rstanarm generate the plots
for the graphical posterior predictive checks (i.e., rstanarm creates the
ggplot objects and then shinystan just displays them), so that might be why
there's no issue when using rstanarm models.
On Fri, Jan 22, 2016 at 3:26 AM, Ruben C. Arslan [email protected]
wrote:
I have the problem with fits from brms launched through
brms::launch_shiny, but not with rstanarm fits launched via
rstanarm::launch_shinystan, so if you can't reproduce it, maybe it's on
@paul-buerkner https://github.com/paul-buerkner's side and Gene Quinn
did not mention this.—
Reply to this email directly or view it on GitHub
#107 (comment).
from shinystan.
That would explain it at least. @paul-buerkner told me hadn't implemented it yet, but since the interface looks the same otherwise, it's easy to get mixed up. But you should probably ask Gene Quinn whether that was the case for him too.
from shinystan.
Gene's example wasn't brms related (just regular rstan with a .stan file)
but it's possible (likely even) that it turns out to be the same problem
under the hood.
On Friday, January 22, 2016, Ruben C. Arslan [email protected]
wrote:
That would explain it at least. @paul-buerkner
https://github.com/paul-buerkner told me hadn't implemented it yet, but
since the interface looks the same otherwise, it's easy to get mixed up.
But you should probably ask Gene Quinn whether that was the case for him
too.—
Reply to this email directly or view it on GitHub
#107 (comment).
from shinystan.
Does this happen with every brms model you try or just with certain ones?
On Friday, January 22, 2016, Jonah Sol Gabry [email protected] wrote:
Gene's example wasn't brms related (just regular rstan with a .stan file)
but it's possible (likely even) that it turns out to be the same problem
under the hood.On Friday, January 22, 2016, Ruben C. Arslan <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:That would explain it at least. @paul-buerkner
https://github.com/paul-buerkner told me hadn't implemented it yet,
but since the interface looks the same otherwise, it's easy to get mixed
up. But you should probably ask Gene Quinn whether that was the case for
him too.—
Reply to this email directly or view it on GitHub
#107 (comment)
.
from shinystan.
All so far, including gaussian and forked families. Tried maybe 5.
from shinystan.
Ok thanks. I try a few from brms and maybe that will help diagnose this. So
far I had just been testing with regular rstan models.
On Friday, January 22, 2016, Ruben C. Arslan [email protected]
wrote:
All so far, including gaussian and forked families. Tried maybe 5.
—
Reply to this email directly or view it on GitHub
#107 (comment).
from shinystan.
I am more than happy to help if needed. However, I currently don't see how brmsfit objects could be used with PPcheck of shinystan. The reason is that they do not contain a parameter with the y_rep values, because this would lead to models of multiple GBs for larger models. Instead, we have the predict method that generates those values within R, but those values cannot be included inside PPcheck of shinystan since they are not part of the model itself.
from shinystan.
Ok that makes sense. So this brms issue is separate from the original
issue.
I think I've finally solved the original issue, so I'm going to close this
after I test it, but if you want can you open a new issue for allowing the
PPcheck page to accept yrep from the user in the same way it does for y? I'm
definitely open to adding that functionality, which would allow it to work
with your package and be useful in general.
On Friday, January 22, 2016, Paul-Christian Bürkner <
[email protected]> wrote:
I am more than happy to help if needed. However, I currently don't see how
brmsfit objects could be used with PPcheck of shinystan. The reason is that
they do not contain a parameter with the y_rep values, because this would
lead to models of multiple GBs for larger models. Instead, we have the
predict method that generates those values within R, but those values
cannot be included inside PPcheck of shinystan as y_rep, since they are not
part of the model itself.—
Reply to this email directly or view it on GitHub
#107 (comment).
from shinystan.
That would certainly be great! I will open another issue for this. :-)
from shinystan.
I just posted a reply to the original post on stan-users, which I'll copy here:
Hi Gene,Sorry for the delay, but I've finally got this sorted out. The problem is that your y_rep doesn't have the right dimensions but ShinyStan was just waiting for an object with the correct dimensions instead of issuing a warning. I'm going to fix that so the warning appears. You can get the PPcheck page to work for your model if you make a slight tweak to your Stan code. The problem is that you have y declared as a real array with Nobs elements but y_rep is only declared as a scalar real. y_rep should have the same dimensions as y, so you can just change your generated quantities block to
generated quantities{ real y_rep[Nobs]; for (n in 1:Nobs) y_rep[n] <- gamma_rng(alpha,beta); }and then you'll be getting the right posterior predictive distribution and ShinyStan's PPcheck should work for you.
Jonah
I'm going to close this and open a new issue for adding the appropriate warning about dimensions.
from shinystan.
Related Issues (20)
- use posterior package for handling draws HOT 2
- Check for R version 4.0 HOT 1
- selectizeInput for estimates statistics instead of checkboxGroupInput HOT 1
- Default for "max_treedepth"/"max_td" (11) incorrect? HOT 4
- Add support for CmdStanR objects HOT 3
- diagnostics page doesn't load if `stan_used=FALSE`? HOT 1
- Suppress messages when packages are loaded
- how to raise limit above 1000 parameters? HOT 3
- Shiny stan do not work in ubuntu (tested in ubuntu 20.04 and 16.04 both LTS versions)
- variables missing from drop-down HOT 5
- Problem with LaTeX table: ErrorL subscription out of bounds HOT 6
- Latex for graphs like stan_ac, stan_dens, and others HOT 3
- Rocker script?
- Problem with missing themes HOT 13
- Flickering when selecting parameters on page "ESTIMATE"
- gtools is orphaned - Consider a replacement?
- Issue when launching shinystan demo
- launch_shinystan error message
- toggle view for `exp(param)' ?
- Running ‘testthat.R’/opt/local/Library/Frameworks/R.framework/Resources/bin/BATCH: line 60: 98584 Bus error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinystan.