R/studentpdf.R

studentpdf <-
function(x, mu, var, nu) {
  c <- exp(lgamma(nu/2 + 0.5) - lgamma(nu/2)) / sqrt(nu * pi * var)
  
  return( c * (1 + (1/(nu * var)) * t(x - t(mu))^2)^(-(nu + 1)/2) )
}

Try the onlineCPD package in your browser

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

onlineCPD documentation built on Jan. 15, 2017, 7:22 p.m.