R/calculate_mu.R

Defines functions calculate_mu

calculate_mu <- function(Beta, model_matrix, offset_matrix){
  make_offset_hdf5_mat <- is(offset_matrix, "DelayedMatrix") && is(DelayedArray::seed(offset_matrix), "HDF5ArraySeed")
  if(! make_offset_hdf5_mat){
    exp(Beta %*% t(model_matrix) + offset_matrix)
  }else{
    mu <- exp(delayed_matrix_multiply(DelayedArray::DelayedArray(Beta),
                                      DelayedArray::DelayedArray(t(model_matrix))) + offset_matrix)
    mu <- HDF5Array::writeHDF5Array(mu)
    mu
  }
}

Try the glmGamPoi package in your browser

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

glmGamPoi documentation built on Nov. 8, 2020, 7:14 p.m.