R/logPriorDensN.R

logPriorDensN = function(N, p, particles, priorList){
# xi = particles$xi
# p = ncol(xi)
 G = particles$G
#
 log.detSigma = numeric(N)
 for(iN in 1:N){
  G.iN = matrix(G[iN,], p, p)
  log.detSigma[iN] = as.numeric(determinant(G.iN, logarithm=T)$modulus)  # log(det(G.iN))
 }
 logPriorDens = # 0 +   			# xi or B
  (-(p+1)/2) * log.detSigma	# Sigma
 return(logPriorDens)
}

Try the mvst package in your browser

Any scripts or data that you put into this service are public.

mvst documentation built on May 2, 2019, 1:46 p.m.