R/marginal_calculator_hom.R

Defines functions .marginal_calculator_hom

.marginal_calculator_hom <- function(tempfit, N, b){
  tempSSResid <- sum(tempfit$residuals^2)
  tempP <- length(tempfit$coefficients)
  templogPY <- (-N*(1-b)/2)*log(pi) +
               ((N*b-1)/2)*log(b) +
               (lgamma((N-tempP)/2))-(lgamma((N*b-tempP)/2))+
               ((-N*(1-b)/2)*log(tempSSResid))
  return(templogPY)
}

Try the slgf package in your browser

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

slgf documentation built on Nov. 22, 2022, 1:09 a.m.