R/fitPoisGlm.R

Defines functions fitPoisGlm

Documented in fitPoisGlm

#' Fast fit Poisson regression
#'
#' @param Ny vector of counts
#' @param x regressor
#' @param degree degree of the polynomial
#' @param offset offset
#' @importFrom stats glm.fit poisson
#' @return see glm.fit
fitPoisGlm = function(Ny, x, degree, offset){
  desMat = buildXmat(x, degree+1)
  glm.fit(y = Ny, x = desMat, family = poisson(), offset = offset)
}
CenterForStatistics-UGent/SPsimSeq documentation built on April 23, 2024, 4:09 p.m.