Questions tagged [bayesian]

Bayesian (after Thomas Bayes) refers to methods in probability and statistics that involve quantifying uncertainty about parameter or latent variable estimates by incorporating both prior and observed information. Bayesian modeling, inference, optimization, and model comparison techniques are on topic. A programming element is expected; theoretical/methodological questions should go to https://stats.stackexchange.com.

Overview

Bayesian inference is a method of statistical inference which uses Bayes' theorem - named after Thomas Bayes (1702-1761) - to quantify the uncertainty of parameters or latent variables. The statement of Bayes' theorem in Bayesian inference is

enter image description here

Here θ represents the parameters to be inferred and d the data. P(θ|d) is the posterior probability and P(d|θ) is the likelihood function. P(θ) is the prior: a function encoding previous beliefs about θ within a model appropriate for the data. P(d) is a normalization factor.

The formula is used as an updating procedure: as more data become available, the posterior can be updated successively. In the first instance, the prior must be specified by the user. In later updates, the prior is usually chosen to be the posterior from a previous updating procedure.

References

The following threads contain lists of references:

The following journals are dedicated to research in Bayesian statistics:

Tag usage

Questions on tag should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

1808 questions
5
votes
1 answer

Length normalization in a naive Bayes classifier for documents

I'm trying to implement a naive Bayes classifier to classify documents that are essentially sets (as opposed to bags) of features, i.e. each feature contains a set of unique features, each of which can appear at most once in the document. For…
pmc255
  • 1,499
  • 2
  • 19
  • 31
5
votes
1 answer

How to input matrix data into brms formula?

I am trying to input matrix data into the brm() function to run a signal regression. brm is from the brms package, which provides an interface to fit Bayesian models using Stan. Signal regression is when you model one covariate using another within…
Xia Zhu
  • 53
  • 4
5
votes
0 answers

Bayesian Network Meta-Analysis (gemtc) - Specifying the order of comparisons

I'm working on a Bayesian Network Meta-Analysis using the gemtc package on a dataset similar to the following: df <- data.frame(study = c("A", "A", "B", "B", "C", "C", "D", "D", "E", "E", "F", "F", "G", "G", "H", "H",…
mkpcr
  • 431
  • 1
  • 3
  • 13
5
votes
0 answers

Incremental Bayesian updates with multi-dimensional parameters

I am trying to use PYMC3 for a Bayesian model where I would like to repeatedly train my model on new unseen data. I am thinking I would need to update the priors with the posterior of the previously trained model every time I see the data, similar…
SinByCos
  • 613
  • 1
  • 10
  • 22
5
votes
1 answer

Blackbox likelihood example

I'm trying to understand how to use a black box likelihood function in pymc. Basically, this is explained here. I have tried implementing this on my own with a very simple Python model (a double logistic function), and no gradient. In addition to…
Jose
  • 2,089
  • 2
  • 23
  • 29
5
votes
1 answer

Bayesian Multinomial Regression using rjags package

I am trying to fit a multinomial logistic regression model using rjags for the outcome is a categorical (nominal) variable (Outcome) with 3 levels, and the explanatory variables are Age (continuous) and Group (categorical with 3 levels). In doing…
Minh Chau
  • 83
  • 4
5
votes
1 answer

Understading hyperopt's TPE algorithm

I am illustrating hyperopt's TPE algorithm for my master project and cant seem to get the algorithm to converge. From what i understand from the original paper and youtube lecture the TPE algorithm works in the following steps: (in the following,…
Søren Jensen
  • 153
  • 1
  • 12
5
votes
0 answers

Dimension mismatch when initalizing an array (JAGS)

Wondering if any of you know why JAGS would tell me there was a dimension mismatch with my initial values here. I am attempting to fit a spatially explicit capture-recapture model in which I estimate a fish location (x,y) at each time step. There…
5
votes
1 answer

pymc3 : Dirichlet with multidimensional concentration factor

I am struggling with implementing a model where the concentration factor of the Dirichlet variable is dependent on another variable. The situation is the following: A system fails due to faulty components (there are three components, only one fails…
Hugo
  • 53
  • 4
5
votes
2 answers

Is there a Bayesian filter library for .NET

Is there a Bayesian filter library for .NET? I would like to setup a group of folders and have emails automatically moved to those folders based on what has been previously moved to the folder. If you are familiar with FogBugz auto-sort, that's…
Brian Boatright
  • 36,294
  • 34
  • 81
  • 102
5
votes
2 answers

How do I extract random effects from MCMCglmm?

I am looking for a command similar to ranef() used in nlme, lme4, and brms that will allow me to extract the individual random effects in my MCMCglmm model. In my dataset, I have 40 providers and I would like to extract the random effects for each…
b222
  • 966
  • 1
  • 9
  • 19
5
votes
2 answers

Data type error with bn.fit() in R: variable is not supported in bnlearn (type: integer)

Based on a given network structure, I created a data frame of 100 instances for six binary variables(x1 to x6). So it's a 100 x 6 data frame of 0/1 values stored in a variable 'input_params'. Created an empty graph using statements: …
Vash
  • 1,767
  • 2
  • 12
  • 19
5
votes
3 answers

Any framework for real-time correlation/analysis of event-stream (aka CEP) in Erlang?

Would like to analyze a stream of events, sharing certain characteristics (s.a. a common source), and within a given time-window, ultimately to correlate those multiple events and draw some inference from same, and finally launch some action. My…
bdutta74
  • 2,798
  • 3
  • 31
  • 54
5
votes
3 answers

Determining High Density Region for a distribution in R

Background: Normally, R gives quantiles for well-known distributions. Out of these quantiles, the lower 2.5% up to the upper 97.5% covers 95% of the area under these distributions. Question: Suppose I have a F distribution (df1 = 10, df2 = 90). In…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72
5
votes
2 answers

linear model diagnostics for Bayesian models using rstan

I'm looking for an efficient method to identify data points that have an outsize effect on the parameters of a linear model. This is straight-forward with ordinary linear models, but I'm not sure how to do it with Bayesian linear models. Here's one…
Ben
  • 41,615
  • 18
  • 132
  • 227