normchi2post {LearnBayes} | R Documentation |
Computes the log of the posterior density of a mean M and a variance S2 when a sample is taken from a normal density and a standard noninformative prior is used.
normchi2post(theta,data)
theta |
matrix of parameter values where each row is a value of (M, S2) |
data |
vector containing the sample observations |
a vector of values of the log posterior where the values corresond to the rows in theta
Jim Albert
parameter1=c(20,5) parameter2=c(25,5) parameter=rbind(parameter1,parameter2) data=c(20, 32, 21, 43, 33, 21, 32) normchi2post(parameter,data)