Skip to main content

All Questions

Tagged with
0 votes
0 answers
27 views

Can I use the Mean Squared Prediction Error to select the prior SD in a CausalImpact model?

I'm using the CausalImpact package (in R), and (as I expect is typical) the findings are very sensitive to the prior being used. I have an OK understanding, I think, of what the prior is doing in this ...
André CB's user avatar
0 votes
1 answer
72 views

Avoid singular fits in mixed models in R with blme - checking layman's priors

While fitting linear mixed models, I would like to avoid zero random-effects (ranef(model)) and cluster-level SD estimates (...
Imsa's user avatar
  • 43
0 votes
0 answers
24 views

How to sample from the prior predictive distribution with the BSTS R package?

Assuming I have to use the bsts package in R, I'm trying to understand the degree to which my prior distribution choices (implicit or otherwise) are consistent with ...
user3215964's user avatar
0 votes
1 answer
123 views

Correlation for priors in BLRM with EWOC in R package OncoBayes2

I'm trying to reproduce results in this protocol with OncoBayes2 package to learn BLRM with EWOC (Neuenschwander 2008) in dose finding studies. In section 14.2.2.1 (appendix 2) of the protocol it ...
MasaK's user avatar
  • 3
1 vote
0 answers
85 views

Bounded uniform prior in R

I have been fitting a bayesian GLM using brms. The code works well but when I loop this over several data and make it a bit more complex, R encounters a fatal error and crashes. This seems to be ...
blackandwhite's user avatar
0 votes
0 answers
74 views

Laplace approximation from a log-posterior in R

I would like to perform a Laplace approximation of a log-posterior. The evolution of a cancer cell at given time $t_j$, $j = 1,\cdots,n$ for an experiment $i$ follows the following Poisson ...
Mathieu Rousseau's user avatar
1 vote
0 answers
48 views

Power of Bernoulli likelihood in Jags (R2jags) [closed]

In a fixed power prior model, the model is set up as: $$ \pi(p_i \mid \alpha,\mathcal{D}_0) \propto L(p_i\mid \mathcal{D}_0)^{w} \pi(p_i) $$ Suppose that the event follows a Bernoulli distribution ...
Schnappiii's user avatar
1 vote
1 answer
139 views

Using a Generalized Beta Distribution of the Second Kind as a Prior in Stan Linear Regression

So I'm considering a simple linear regression model with $p = 1$ predictor $$y = \beta x + \epsilon$$ where $\epsilon \sim N(0,\sigma^2)$. I want to use a generalised beta distribution of the second ...
Pame's user avatar
  • 331
1 vote
1 answer
336 views

How can I find the posterior distribution for gammadistributed data and prior?

I am working on a project where I believe Bayesian statistics should be useful. However, my knowledge about Bayesian statistics are very scarce. Suppose I got data following a Gamma distribution with ...
alaj1716's user avatar
4 votes
2 answers
1k views

How can I sample from a shifted and scaled Student-t distribution with a specified mean and sd in R?

I'm currently building some Bayesian models with the brms package and the default intercept prior is student_t(3, 0, 6.3) and so ...
timnus's user avatar
  • 53
0 votes
0 answers
91 views

Is this Considered "Cheating" in Bayesian Modelling?

Suppose you have some data that corresponds to a single predictor variable and a single response variable. You are interested in fitting a regression model to this data : Y = B_0 + B_1 * X If you ...
stats_noob's user avatar
0 votes
0 answers
25 views

Data-informed grouping of covariates in Bayesian Hierarchical Modeling?

Is there a way to place a prior on the first stage's betas that allows the second stage groups to be determined from the data? I am working with co-exposures where I am not super confident in how they ...
pakalla's user avatar
  • 13
36 votes
2 answers
3k views

How are Bayesian Priors Decided in Real Life?

I always had the following question: How are Bayesian Priors decided in real life? I created the following scenario to pose my question: Suppose you are researcher and you are interested in studying ...
stats_noob's user avatar
1 vote
1 answer
226 views

In JAGS, how can I fix a parameter to a distribution, as opposed to just a constant?

The first code chunk below (model1) is a JAGS script designed to estimate a two-group Gaussian mixture model with unequal variances. I am looking for a way to fix one of the parameters (say $\mu_2$) ...
Preston Botter's user avatar
1 vote
1 answer
388 views

Reproduce results of bayesglm with stan_glm

As indicated in the title, I am trying to reproduce the results of the bayesglm function with the stan_glm. In principle, the ...
gavril's user avatar
  • 63

15 30 50 per page