MCMC runs of posterior distribution of data with Normal(mu,1/tau) density, where tau is the inverse of variance.
normalp(data, int=1000)
Arguments
data: data vector
int: number of iteractions selected in MCMC. The program selects 1 in each 10 iteraction, then thin=10. The first thin*int/3 iteractions is used as burn-in. After that, is runned thin*int iteraction, in which 1 of thin is selected for the final MCMC chain, resulting the number of int iteractions
Returns
An object of class gumbelp that gives a list containing the points of posterior distributions of mu and tau of the normal distribution, the data, mean posterior, median posterior and the credibility interval of the parameters.
Note
The non-informative prior distribution of these parameters are Normal(0,10000000)
for the parameter mu and Gamma(0.001,0.001) for the parameter tau . During the MCMC runs, screen shows the proportion of iteractions made.
See Also
plot.normalp
Examples
# Obtaining posterior distribution of a vector of simulated pointsx=rnorm(300,2,sqrt(10))# Obtaning 1000 points of posterior distributionajuste=normalp(x,200)# Posterior distribution of river Nile dataset## Not run: data(Nile)## Not run: postnile=normalp(Nile,1000)