gibbsNorm {bayesImageS}R Documentation

Fit a univariate normal (Gaussian) distribution to the observed data.

Description

Fit a univariate normal (Gaussian) distribution to the observed data.

Usage

gibbsNorm(y, niter = 1000, priors = NULL)

Arguments

y

A vector of observed pixel data.

niter

The number of iterations of the algorithm to perform.

priors

A list of priors for the parameters of the model.

Value

A list containing MCMC samples for the mean and standard deviation.

Examples

y <- rnorm(100,mean=5,sd=2)
res.norm <- gibbsNorm(y, priors=list(mu=0, mu.sd=1e6, sigma=1e-3, sigma.nu=1e-3))
summary(res.norm$mu[501:1000])
summary(res.norm$sigma[501:1000])

[Package bayesImageS version 0.6-1 Index]