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)
}

Try the SPsimSeq package in your browser

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

SPsimSeq documentation built on Nov. 8, 2020, 5:09 p.m.