Comments (9)
from bayesplot.
from bayesplot.
Hi!
Ok, getting the bias is simple using what is there like this:
library(rstanarm)
alpha <- 1; beta <- c(-.5, .5); sigma <- 2
X <- matrix(rnorm(200), 100, 2)
y <- rnorm(100, mean = c(alpha + X %*% beta), sd = sigma)
fit <- stan_glm(y ~ X)
draws <- as.matrix(fit)
print(colnames(draws))
true <- c(alpha, beta, sigma)
mcmc_recover_intervals(draws, true)
draws_bias <- sweep(draws, 2, true)
mcmc_recover_intervals(draws_bias, rep(0, 4))
that gives me what I want for the bias. Let's see if I figure out the coverage. BTW, the package is awesome!
from bayesplot.
from bayesplot.
This is so simple that we could just include it as an example in the documentation maybe? What I have done is just a good use of what is there, so I am not sure if you really want to make this part of bayesplot as you need to maintain it. The gain of including it explicitly is that you encourage people to look at the their problems in this viewangle more likely as the option is more prominent. Up to you to decide.
from bayesplot.
from bayesplot.
So we got the bias in now which leaves the coverage. For that one would need multiple posteriors each coming from an independent fit of (usually) fake data. I am not sure of the "batch" concept is exactly that or is it?
from bayesplot.
from bayesplot.
I thought so. Should we then close this issue as it seems out of scope?
However, I do have to say that I have done such experiments, i.e. repeated fake-data simulations and then look at the coverage and correlation in the bias. Both of which were very interesting to learn about in the model as it did tell me a new aspect of my model how it performs under repetition. A correlated bias and the coverage is something one wants to know, I think; would be curious what others think. Possibly worth to discuss in a Stan meeting?
from bayesplot.
Related Issues (20)
- ppc_km_overlay(): add argument for left-truncation?
- Deprecations in ggplot2 and tidyselect
- ppc_loo_* consistency HOT 5
- Phase out functions that reside in posterior HOT 2
- ppc_loo_pit_qq theoretical line HOT 1
- Error during installation of 1.10.0 HOT 6
- `mcmc_pairs()` works differently on an HPC cluster? HOT 1
- deprecated stat(density) HOT 1
- reporting a warning HOT 1
- Error in mcmc_areas "Error in element_line(...)" when using example code
- Warning message regards deprecated 'facets' argument when using mcmc_plot(..., type = "acf") HOT 2
- pp_check methods to support cmdstanr's CmdStanFit
- PPC plot for categorical outcomes HOT 2
- Update SVGs for visual tests after new ggplot2 release
- Extend ppc_pit_ecdf and ppc_pit_ecdf_grouped to handle discrete data HOT 2
- Add `bounds` argument to plots building on `geom_density` and `stats_density` HOT 1
- Support for handling censored data in PPC plots via imputation HOT 2
- pp_check for prior predictive checks HOT 4
- Add warning about using ppc_stat stat="mean"
- Facets argument of facet_grid() deprecated HOT 1
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 bayesplot.