BAYESAB测试正常分布

问题描述 投票:0回答:1

在BAYESAB包中,提供了以下示例:

A_norm <- rnorm(100, 6, 1.5)
B_norm <- rnorm(100, 5, 2.5)

AB2 <- bayesTest(A_norm, B_norm,
             priors = c('mu' = 5, 'lambda' = 1, 'alpha' = 3, 'beta' = 1),
             distribution = 'normal')'

从两个分布A_norm和dB_norm - 如何生成mu,lambda,alpha和beta的值?

非常感谢。

r bayesian
1个回答
0
投票

来自?bayesTest(大胆的矿井)

• Normal: If your data is well modeled by the normal  
          distribution, with parameters mu, sigma^2 controlling mean  
          and variance of the underlying distribution  

            • Data _can_ be negative if it makes sense for your
              experiment

            • Uses a conjugate ‘NormalInverseGamma’ distribution for
              the parameters *mu* and *sigma^2* in the Normal
              Distribution.

            • ‘mu’, ‘lambda’, ‘alpha’, and ‘beta’ must be set for prior
              distributions over *mu, sigma^2* in accordance with the
              parameters of the conjugate prior distributions:

                • mu, sigma^2 ~ NormalInverseGamma(mu, lambda, alpha,
                  beta)

            • This is a bivariate distribution (commonly used to model
              mean and variance of the normal distribution).  You may
              want to experiment with both this distribution and the
              ‘plotNormal’ and ‘plotInvGamma’ outputs separately before
              arriving at a suitable set of priors for the Normal and
              LogNormal ‘bayesTest’

总而言之,mulambdaalphabeta表示正常分布(musigma^2)上的先验(超)参数。如何为您的先验选择参数是一个非常广泛的问题,通常需要特定领域的知识。选择哪些先验(以及哪些参数值)是贝叶斯推理中的一个关键问题,你可以找到大量关于这一点的文献。

在这种情况下,你假设一个Normal-inverse-gamma distribution,其中mu是位置参数,lambda是缩放参数,alphabeta是定义inverse Gamma distribution上的先验的sigma^2的参数。通过了解先验(s)的基本概率分布并考虑您/任何先验知识,您可以根据是否要在参数musigma^2上考虑信息性或非信息性(弱)先验来选择参数。你的正常分布。

© www.soinside.com 2019 - 2024. All rights reserved.