Documentation
¶
Overview ¶
Bayesian inference.
Index ¶
- func BFExch(theta float64, y, n []float64, k float64) float64
- func BetaBinExch(theta1, theta2 float64, y, n []float64) float64
- func BetaBinExch0(theta1, theta2 float64, y, n []float64) float64
- func BetaFromQtls(p1, x1, p2, x2 float64) (alpha, beta float64)
- func BetaHDI(α, β, credMass, tol float64) (lo, hi float64)
- func BinomPiCDFBPri(k, n int64, α, β float64) func(x float64) float64
- func BinomPiCDFBPriNext(k, n int64, α, β float64) float64
- func BinomPiCDFFPri(k, n int64) func(x float64) float64
- func BinomPiCDFHPri(k, n int64) func(x float64) float64
- func BinomPiCDFJPri(k, n int64) func(x float64) float64
- func BinomPiCrIBP(α, β, alpha float64, n, k int64) (low, upp float64)
- func BinomPiCrIBPriNApprox(α, β, alpha float64, n, k int64) (low, upp float64)
- func BinomPiDeviance(pi float64, n, k int64) float64
- func BinomPiDiffCrI(postdiffmu, postdiffsigma, alpha float64) (float64, float64)
- func BinomPiDiffMeanNApprox(a1, b1, a2, b2 float64, n1, n2, y1, y2 int64) float64
- func BinomPiDiffOneSidedP(postdiffmu, postdiffsigma float64) float64
- func BinomPiDiffVarNApprox(a1, b1, a2, b2 float64, n1, n2, y1, y2 int64) float64
- func BinomPiEqvSize(α, β float64) int64
- func BinomPiLike(pi float64, n, k int64) float64
- func BinomPiPDFBPri(k, n int64, α, β float64) func(x float64) float64
- func BinomPiPDFFPri(k, n int64) func(x float64) float64
- func BinomPiPDFHPri(k, n int64) func(x float64) float64
- func BinomPiPDFJPri(k, n int64) func(x float64) float64
- func BinomPiPMS(α, β float64, n, k, whichpi int64) float64
- func BinomPiPostMean(α, β float64, n, k int64) float64
- func BinomPiPostMedian(α, β float64, n, k int64) float64
- func BinomPiPostModus(α, β float64, n, k int64) float64
- func BinomPiPostVar(α, β float64, n, k int64) float64
- func BinomPiQtlBPri(k, n int64, α, β float64) func(p float64) float64
- func BinomPiQtlFPri(k, n int64) func(p float64) float64
- func BinomPiQtlHPri(k, n int64) func(p float64) float64
- func BinomPiQtlJPri(k, n int64) func(p float64) float64
- func CrI(α float64, qtl func(𝛩 float64) float64) (hi, lo float64)
- func DiscHPI(x, p []float64, probContent float64) (probExact float64, hpiSet []float64)
- func ECrI(𝛩 []float64, α float64) (lo, hi float64)
- func FactCTableIndep(y [][]float64, k float64, m int) (bf, nse float64)
- func FactCTableUnif(y, a [][]float64) float64
- func Gibbs(logpost func([]float64) float64, start []float64, m int, scale []float64) (vth [][]float64, arate []float64)
- func HistPrior(p, midpts, prob []float64) []float64
- func HowardPosteriorProb(y1, n1, y2, n2, alpha, beta, gamma, delta, sigma float64) float64
- func KnownVariancePosterior(Y, X, Sigma, M, Phi *mx.DenseMatrix) func() (A *mx.DenseMatrix)
- func LnHowardPrior(p1, p2, alpha, beta, gamma, delta, sigma float64) float64
- func LogCTablePost(s1, f1, s2, f2, theta1, theta2 float64) float64
- func LogPoissGamma(theta, y []float64, sh, rt float64) []float64
- func LogPoissNormal(theta, y []float64, mean, sd float64) []float64
- func LogisticPost(x, n, y []float64, beta0, beta1 float64) float64
- func MultinomPiNext(α, x []float64) []float64
- func MultinomPiPDFDirPri(α, x []float64) float64
- func NormMeanTestOneSided(m0, priMean, priSD, smpMean float64, smpSize int, popSd float64) (bf, priOdds, postOdds, postH float64)
- func NormMeanTestTwoSided(m0, prob float64, t []float64, smpMean float64, smpSize int, popSd float64) (bf, post []float64)
- func NormMuCrIFPriKnown(nObs int, ȳ, σ, α float64) (lo, hi float64)
- func NormMuCrINPriKnown(nObs int, ȳ, σ, μPri, σPri, α float64) (lo, hi float64)
- func NormMuPMFDPri(nObs int, ȳ, σ float64, μ []float64, μPri []float64) (post []float64)
- func NormMuPostMean(nObs int, ȳ, σ, μPri, σPri float64) float64
- func NormMuPostStd(nObs int, σ, μPri, σPri float64) float64
- func NormMuQtlFPri(nObs int, ȳ, σ, p float64) float64
- func NormMuQtlNPri(nObs int, ȳ, σ, μPri, σPri, p float64) float64
- func NormMuSinglePMFDPri(y, σ float64, μ []float64, μPri []float64) (post []float64)
- func NormMuSingleQtlFPri(y, σ, p float64) float64
- func NormMuSingleQtlNPri(y, σ, μPri, σPri, p float64) float64
- func NormPostInfPriorNext(data []float64, a, b, mu0, tau2 float64) (postMu, postS2 float64)
- func NormPostNoPriorNext(data []float64) (postMu, postS2 float64)
- func NormPostSim(data []float64, a, b, mu0, tau2 float64, m int) (postMu, postS2 []float64)
- func NormPostSimNoPrior(data []float64, m int) (postMu, postS2 []float64)
- func NormalMuDiffCDFNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(x float64) float64
- func NormalMuDiffCrIFPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, α float64) func(α float64) (lo, hi float64)
- func NormalMuDiffCrINPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, α float64) func(α float64) (lo, hi float64)
- func NormalMuDiffMomentsNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) (μ, σ float64)
- func NormalMuDiffPDFNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(x float64) float64
- func NormalMuDiffQtlNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(p float64) float64
- func NormalMuDiffQtlNPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, p float64) func(p float64) float64
- func NormalNormalMix(probs, priorMean, priorVar []float64, y, sigma2 float64) (postProbs, postMean, postVar []float64)
- func PNullSmpLowT(θ []float64, θ0 float64) float64
- func PNullSmpUppT(θ []float64, θ0 float64) float64
- func PoissGamExch(theta1, theta2, z0 float64, y, e []float64) float64
- func PoissonLambdaCDFFPri(sumK, n int64) func(p float64) float64
- func PoissonLambdaCDFGPri(sumK, n int64, r, v float64) func(p float64) float64
- func PoissonLambdaCDFJPri(sumK, n int64) func(p float64) float64
- func PoissonLambdaCrIGPri(sumK, n int64, r, v, α float64) (lo, hi float64)
- func PoissonLambdaEqvSize(v float64) float64
- func PoissonLambdaIQR(sumK, n int64, r, v float64) float64
- func PoissonLambdaLike(sumK, n int64, λ float64) float64
- func PoissonLambdaMSE(r, v, λ float64) float64
- func PoissonLambdaNextFPri(sumK, n int64) float64
- func PoissonLambdaNextGPri(sumK, n int64, r, v float64) float64
- func PoissonLambdaNextJPri(sumK, n int64) float64
- func PoissonLambdaOneSidedOdds(sumK, n int64, r, v, λ0 float64) float64
- func PoissonLambdaOneSidedTst(sumK, n int64, r, v, α, λ0 float64) bool
- func PoissonLambdaPDFFPri(sumK, n int64) func(p float64) float64
- func PoissonLambdaPDFGPri(sumK, n int64, r, v float64) func(p float64) float64
- func PoissonLambdaPDFJPri(sumK, n int64) func(p float64) float64
- func PoissonLambdaPostMean(sumK, n int64, r, v float64) float64
- func PoissonLambdaPostMeanBias(r, v, λ float64) float64
- func PoissonLambdaPostVar(r, v, λ float64) float64
- func PoissonLambdaQtlFPri(sumK, n int64) func(p float64) float64
- func PoissonLambdaQtlGPri(sumK, n int64, r, v float64) func(p float64) float64
- func PoissonLambdaQtlJPri(sumK, n int64) func(p float64) float64
- func PoissonLambdaTwoSidedTst(sumK, n int64, r, v, α, λ0 float64) bool
- func ProbBetaTest(p0, prob, a, b float64, succ, fail int) (bf, post float64)
- func PropDisc(p, prior []float64, succ, fail int) []float64
- type IndexSorter
- type KnownVarianceLRPosterior
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BFExch ¶
BFExch returns the logarithm of the integral of the Bayes factor for testing homogeneity. of a set of proportions.
func BetaBinExch ¶
BetaBinExch returns the log posterior density of logit mean and log precision for a Binomial/beta exchangeable model.
func BetaBinExch0 ¶
BetaBinExch0 returns the log posterior density of mean and precision for a Binomial/beta exchangeable model.
func BetaFromQtls ¶
BetaFromQtls finds the shape parameters of a beta density that matches knowledge of two quantiles of the distribution.
func BinomPiCDFBPri ¶
BinomPiCDFBPri returns posterior CDF of the Binomial proportion, general Beta prior.
func BinomPiCDFBPriNext ¶
Binomial proportion, Sampling from posterior, Beta prior
func BinomPiCDFFPri ¶
BinomPiCDFFPri returns posterior CDF of the Binomial proportion, Flat prior.
func BinomPiCDFHPri ¶
BinomPiCDFHPri returns posterior CDF of the Binomial proportion, Haldane prior. see Aitkin 2010: 143 for cautions
func BinomPiCDFJPri ¶
BinomPiCDFJPri returns posterior CDF of the Binomial proportion, Jeffreys prior. see Aitkin 2010: 143 for cautions
func BinomPiCrIBP ¶
Binomial proportion, credible interval, beta prior, equal tail area. Bolstad 2007 (2e): 153 untested ...
func BinomPiCrIBPriNApprox ¶
BinomPiCrIBPriNApprox returns boundaries of the credible interval of theBinomial proportion, beta prior, equal tail area, normal approximation, Bolstad 2007 (2e): 154-155, eq. 8.8 untested ...
func BinomPiDeviance ¶
BinomPiDeviance returns the Deviance of the Binomial proportion.
func BinomPiDiffCrI ¶
Credible interval for difference between binomial proportions, approximated by Normal distribution Bolstad 2007 (2e): 248, eq. 13.13 postdiffmu = binomdiffpropnormapproxmu() postdiffsigma = sqrt(binomdiffpropnormapproxvar()) untested ...
func BinomPiDiffMeanNApprox ¶
Mean of posterior distribution of unknown difference of binomial proportions, approximated by Normal distribution Bolstad 2007 (2e): 248. untested ...
func BinomPiDiffOneSidedP ¶
func BinomPiDiffVarNApprox ¶
Variance of posterior distribution of unknown difference of binomial proportions, approximated by Normal distribution Bolstad 2007 (2e): 248. untested ...
func BinomPiEqvSize ¶
BinomPiEqvSize returns the Equivalent sample size of the prior of the Binomial proportion.
func BinomPiPDFBPri ¶
BinomPiPDFBPri returns posterior PDF of the Binomial proportion, general Beta prior.
func BinomPiPDFFPri ¶
BinomPiPDFFPri returns posterior PDF of the Binomial proportion, Flat prior.
func BinomPiPDFHPri ¶
BinomPiPDFHPri returns posterior PDF of the Binomial proportion, Haldane prior. see Aitkin 2010: 143 for cautions
func BinomPiPDFJPri ¶
BinomPiPDFJPri returns posterior PDFof the Binomial proportion, Jeffreys prior. see Aitkin 2010: 143 for cautions
func BinomPiPMS ¶
BinomPiPMS returns Posterior mean square of p (Binomial proportion). Bolstad 2007 (2e): 152-153, eq. 8.7
func BinomPiPostMean ¶
BinomPiPostMean returns Posterior mean of the Binomial proportion.
func BinomPiPostMedian ¶
BinomPiPostMedian returns Posterior median of the Binomial proportion.
func BinomPiPostModus ¶
BinomPiPostModus returns Posterior modus of the Binomial proportion.
func BinomPiPostVar ¶
BinomPiPostVar returns Posterior variance of the Binomial proportion. Bolstad 2007 (2e): 151, eq. 8.5
func BinomPiQtlBPri ¶
BinomPiQtlBPri returns posterior quantile function forBinomial proportion, general Beta prior.
func BinomPiQtlFPri ¶
BinomPiQtlFPri returns posterior quantile function for Binomial proportion, Flat prior.
func BinomPiQtlHPri ¶
BinomPiQtlHPri returns posterior quantile function for Binomial proportion, Haldane prior. see Aitkin 2010: 143 for cautions
func BinomPiQtlJPri ¶
BinomPiQtlJPri returns posterior quantile function for Binomial proportion, Jeffreys prior. see Aitkin 2010: 143 for cautions
func FactCTableIndep ¶
FactCTableIndep returns a Bayes factor against independence for a two-way contingency table assuming a "close to independence" alternative model.
func FactCTableUnif ¶
FactCTableUnif returns the Bayes factor for testing independence in a contingency table.
func Gibbs ¶
func Gibbs(logpost func([]float64) float64, start []float64, m int, scale []float64) (vth [][]float64, arate []float64)
Metropolis within Gibbs sampling algorithm of a posterior distribution.
func HistPrior ¶
HistPrior returns the density of a probability distribution defined on a set of equal-width intervals.
func HowardPosteriorProb ¶
HowardPosteriorProb returns the posterior probability that p1 > p2.
func KnownVariancePosterior ¶
func KnownVariancePosterior(Y, X, Sigma, M, Phi *mx.DenseMatrix) func() (A *mx.DenseMatrix)
If Y ~ N(AX, Sigma, I) and A ~ N(M, Sigma, Phi) this returns a sampler for P(A|X,Y,Sigma,M,Phi)
func LnHowardPrior ¶
LnHowardPrior returns the logarithm of a dependent prior on two proportions proposed by Howard in a Statistical Science paper in 1998.
func LogCTablePost ¶
LogCTablePost returns the log posterior density for the difference and sum of logits in a 2x2 contingency table for independent binomial samples and uniform prior placed on the logits.
func LogPoissGamma ¶
LogPoissGamma returns the logarithm of the posterior density of a Poisson log mean with a gamma prior.
func LogPoissNormal ¶
LogPoissNormal returns the logarithm of the posterior density of a Poisson log mean with a normal prior.
func LogisticPost ¶
LogisticPost returns the log posterior density of (beta0, beta1) when yi are independent binomial(ni, pi) and logit(pi)=beta0+beta1*xi and a uniform prior is placed on (beta0, beta1).
func MultinomPiNext ¶
Sampling from posterior, Dirichlet prior Returns an array of sampled Multinomial Pi's
func MultinomPiPDFDirPri ¶
Posterior PDF, Dirichlet prior for Haldane improper prior, use α[i] = 0 Ericson 1969 recommends prior with sum(α[i]) small, of the order of 1, e.g., 1/len(α) Aitkin 2010: 96-107
func NormMeanTestOneSided ¶
func NormMeanTestOneSided(m0, priMean, priSD, smpMean float64, smpSize int, popSd float64) (bf, priOdds, postOdds, postH float64)
NormMeanTestOneSided does a Bayesian test of the hypothesis that a normal mean is less than or equal to a specified value.
func NormMeanTestTwoSided ¶
func NormMeanTestTwoSided(m0, prob float64, t []float64, smpMean float64, smpSize int, popSd float64) (bf, post []float64)
NormMeanTestTwoSided does a Bayesian test that a normal mean is equal to a specified value using a normal prior.
func NormMuCrIFPriKnown ¶
Credible interval for unknown Normal μ, with KNOWN σ, and flat prior Bolstad 2007 (2e): 212, eq. 11.7
func NormMuCrINPriKnown ¶
Credible interval for unknown Normal μ, with KNOWN σ, and Normal prior Bolstad 2007 (2e): 212, eq. 11.7
func NormMuPMFDPri ¶
PMF of the posterior distribution of unknown Normal μ, with KNOWN σ, and discrete prior, for sample Bolstad 2007 (2e): 203, eq. 11.2
func NormMuPostMean ¶
Posterior mean for unknown Normal μ, with KNOWN σ. Bolstad 2007 (2e): 209, eq. 11.6
func NormMuPostStd ¶
Posterior standard deviation for unknown Normal μ, with KNOWN σ. Bolstad 2007 (2e): 209, eq. 11.5
func NormMuQtlFPri ¶
Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and flat prior (Jeffrey's prior), for sample Bolstad 2007 (2e): 207
func NormMuQtlNPri ¶
Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and Normal prior, for sample Bolstad 2007 (2e): 209, eq. 11.5, 11.6
func NormMuSinglePMFDPri ¶
PMF of the posterior distribution of unknown Normal μ, with KNOWN σ, and discrete prior, for single observation. Bolstad 2007 (2e): 200-201.
func NormMuSingleQtlFPri ¶
Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and flat prior (Jeffrey's prior), for single observation Bolstad 2007 (2e): 206
func NormMuSingleQtlNPri ¶
Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and Normal prior, for single observation Bolstad 2007 (2e): 208, eq. 11.4
func NormPostInfPriorNext ¶
NormPostInfPriorNext returns a simulated tuple from the joint posterior distribution of the mean and variance for a normal sampling prior with a noninformative or informative prior. The prior assumes mu and sigma2 are independent with mu assigned a normal prior with mean mu0 and variance tau2, and sigma2 is assigned a inverse gamma prior with parameters a and b.
func NormPostNoPriorNext ¶
NormPostNoPriorNext returns a sampled tuple from the joint posterior distribution of the mean and variance for a normal sampling prior.
func NormPostSim ¶
NormPostSim returns a simulated sample from the joint posterior distribution of the mean and variance for a normal sampling prior with a noninformative or informative prior. The prior assumes mu and sigma2 are independent with mu assigned a normal prior with mean mu0 and variance tau2, and sigma2 is assigned a inverse gamma prior with parameters a and b.
func NormPostSimNoPrior ¶
NormPostSimNoPrior returns a simulated sample from the joint posterior distribution of the mean and variance for a normal sampling prior.
func NormalMuDiffCDFNPriKn ¶
func NormalMuDiffCDFNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(x float64) float64
Posterior CDF of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246
func NormalMuDiffCrIFPriUn ¶
func NormalMuDiffCrIFPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, α float64) func(α float64) (lo, hi float64)
Credible interval of the difference of two means (μ1-μ2) of Normal distributions with UNKNOWN variances (Behrens-Fisher problem), and FLAT priors Bolstad 2007:245-246 untested ...
func NormalMuDiffCrINPriUn ¶
func NormalMuDiffCrINPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, α float64) func(α float64) (lo, hi float64)
Credible interval of the difference of two means (μ1-μ2) of Normal distributions with UNKNOWN variances (Behrens-Fisher problem), and NORMAL priors Bolstad 2007:245-246 untested ...
func NormalMuDiffMomentsNPriKn ¶
func NormalMuDiffMomentsNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) (μ, σ float64)
Posterior moments of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246
func NormalMuDiffPDFNPriKn ¶
func NormalMuDiffPDFNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(x float64) float64
Posterior PDF of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246
func NormalMuDiffQtlNPriKn ¶
func NormalMuDiffQtlNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(p float64) float64
Posterior quantile of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246
func NormalMuDiffQtlNPriUn ¶
func NormalMuDiffQtlNPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, p float64) func(p float64) float64
Quantile of the difference of two means (μ1-μ2) of Normal distributions with UNKNOWN variances (Behrens-Fisher problem), and NORMAL priors Bolstad 2007:245-246 untested ...
func NormalNormalMix ¶
func NormalNormalMix(probs, priorMean, priorVar []float64, y, sigma2 float64) (postProbs, postMean, postVar []float64)
NormalNormalMix returns the parameters and mixing probabilities for a normal sampling problem, variance known, where the prior is a discrete mixture of normal densities.
func PNullSmpLowT ¶
PNullSmpLowT returns the lower tail probability of a one sided null hypothesis from a sample from a posterior density.
func PNullSmpUppT ¶
PNullSmpUppT returns the upper tail probability of a one sided null hypothesis from a sample from a posterior density.
func PoissGamExch ¶
PoissGamExch returns the log posterior density of log alpha and log mu for a Poisson/gamma exchangeable model.
func PoissonLambdaCDFFPri ¶
Poisson λ, posterior CDF, flat prior.
func PoissonLambdaCDFGPri ¶
Poisson λ, posterior CDF, gamma prior. Use r=m^2/s^2, and v=m/s^2, if you summarize your prior belief with mean == m, and std == s.
func PoissonLambdaCDFJPri ¶
Poisson λ, posterior CDF, Jeffreys' prior.
func PoissonLambdaCrIGPri ¶
Credible interval for unknown Poisson rate λ, and gamma prior, equal tail area Bolstad 2007 (2e): 192-193. untested ...
func PoissonLambdaEqvSize ¶
Equivalent sample size of the prior Bolstad 2007 (2e): Chapter 10, p. 187.
func PoissonLambdaIQR ¶
posterior interquartile range of λ Bolstad 2007 (2e): Chapter 10, p. 189.
func PoissonLambdaLike ¶
Likelihood of Poisson λ. Bolstad 2007 (2e): Chapter 10, p. 184.
func PoissonLambdaMSE ¶
Mean Squared Error of λ Bolstad 2007 (2e): Chapter 10, p. 191.
func PoissonLambdaNextFPri ¶
PoissonLambdaNextFPri returns random number drawn from the posterior, flat prior.
func PoissonLambdaNextGPri ¶
PoissonLambdaNextGPri returns random number drawn from the posterior, Gamma prior.
func PoissonLambdaNextJPri ¶
PoissonLambdaNextJPri returns random number drawn from the posterior, Jeffreys' prior.
func PoissonLambdaOneSidedOdds ¶
One-sided odds ratio for Poisson rate λ Bolstad 2007 (2e): 193. H0: λ <= λ0 vs H1: λ > λ0 Note: The alternative is in the direction we wish to detect.
func PoissonLambdaOneSidedTst ¶
One-sided test for Poisson rate λ Bolstad 2007 (2e): 193. H0: λ <= λ0 vs H1: λ > λ0 Note: The alternative is in the direction we wish to detect.
func PoissonLambdaPDFFPri ¶
Poisson λ, posterior PDF, flat prior.
func PoissonLambdaPDFGPri ¶
Poisson λ, posterior PDF, gamma prior. Use r=m^2/s^2, and v=m/s^2, if you summarize your prior belief with mean == m, and std == s.
func PoissonLambdaPDFJPri ¶
Poisson λ, posterior PDF, Jeffreys' prior.
func PoissonLambdaPostMean ¶
Posterior mean Bolstad 2007 (2e): Chapter 10, p. 190-191.
func PoissonLambdaPostMeanBias ¶
Posterior mean bias Bolstad 2007 (2e): Chapter 10, p. 191.
func PoissonLambdaPostVar ¶
Posterior variance Bolstad 2007 (2e): Chapter 10, p. 191.
func PoissonLambdaQtlFPri ¶
Poisson λ, posterior quantile function, flat prior.
func PoissonLambdaQtlGPri ¶
Poisson λ, posterior quantile function, gamma prior. Use r=m^2/s^2, and v=m/s^2, if you summarize your prior belief with mean == m, and std == s.
func PoissonLambdaQtlJPri ¶
Poisson λ, posterior quantile function, Jeffreys' prior.
func PoissonLambdaTwoSidedTst ¶
Two-sided test for Poisson rate λ Bolstad 2007 (2e): 194. H0: λ = λ0 vs H1: λ != λ0
func ProbBetaTest ¶
ProbBetaTest does a Bayesian test that a proportion is equal to a specified value using a beta prior.
Types ¶
type IndexSorter ¶
func NewSorter ¶
func NewSorter(t []float64) IndexSorter
func (IndexSorter) Len ¶
func (s IndexSorter) Len() int
func (IndexSorter) Less ¶
func (s IndexSorter) Less(i, j int) bool
func (IndexSorter) Swap ¶
func (s IndexSorter) Swap(i, j int)
type KnownVarianceLRPosterior ¶
type KnownVarianceLRPosterior struct {
Sigma, M, Phi *mx.DenseMatrix
XXt, YXt *mx.DenseMatrix
// contains filtered or unexported fields
}
func NewKnownVarianceLRPosterior ¶
func NewKnownVarianceLRPosterior(M, Sigma, Phi *mx.DenseMatrix) (this *KnownVarianceLRPosterior)
M is r x c, o x i Sigma is r x r, o x o Phi is c x c, i x i
Sigma matches Y o x 1 output dimension Phi matches X i x 1 input dimension
func (*KnownVarianceLRPosterior) GetSampler ¶
func (this *KnownVarianceLRPosterior) GetSampler() func() *mx.DenseMatrix
func (*KnownVarianceLRPosterior) Insert ¶
func (this *KnownVarianceLRPosterior) Insert(x, y *mx.DenseMatrix)
func (*KnownVarianceLRPosterior) Remove ¶
func (this *KnownVarianceLRPosterior) Remove(x, y *mx.DenseMatrix)
func (*KnownVarianceLRPosterior) Sample ¶
func (this *KnownVarianceLRPosterior) Sample() (A *mx.DenseMatrix)
Source Files
¶
- beta_hdi_qtl.go
- betabinexch.go
- betaselect.go
- bfexch.go
- binom_p.go
- binom_p_diff.go
- cri.go
- ctable.go
- ctable_indep.go
- deviance.go
- discint.go
- doc.go
- e_cdf.go
- e_qtl.go
- fmin.go
- fn.go
- gibbs.go
- hdi_qtl.go
- histprior.go
- howardprior.go
- lin_reg.go
- logctablepost.go
- logisticpost.go
- logpoissgamma.go
- logpoissnormal.go
- mnormt_onesided.go
- mnormt_twosided.go
- multinom_p.go
- normal_diff.go
- normal_mu.go
- normal_normal_mix.go
- normpostsim.go
- p_null_smp.go
- pbetat.go
- pdisc.go
- poissgamexch.go
- poisson.go
- util.go