Nothing
dpostb <- function(y, x, z, betas, gammas, gl, bpri, Bpri) {
if(is.null(x)|is.null(z)){
stop("There is no data")
}
if(nrow(x)!=nrow(z)){
stop("The mean and precision data have a different size")
}
if(!is.vector(bpri)){
stop("the initial parameters for beta must be a vector")
}
if(ncol(Bpri)!=nrow(Bpri)){
stop("The initial covariance matrix for beta is not square")
}
mu <- x%*%betas
sigma2 <- as.vector(exp(z%*%gammas))
gl <- gl
n <- nrow(y)
vero <- (gamma((gl+1)/2)/(gamma(1/2)*gamma(gl/2)*(gl*sigma2)^0.5))*(1+(y-mu)^2/(sigma2*gl))^(-(gl+1)/2)
L <- prod(vero)
P <- dmvnorm(t(betas), bpri, Bpri) # priori
value <- L*P
value
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.