quasibinase: Helper function to fit quasibinomial model while handling...

View source: R/quasibinase.R

quasibinaseR Documentation

Helper function to fit quasibinomial model while handling common warnings/errors

Description

This function fits a quasibinomial model from the package aod and wraps it so that warnings and/or errors are output.

Usage

quasibinase(y, total, mod.mat = NULL)

Arguments

y

vector of counts to be modeled

total

vector of total counts

mod.mat

optional model matrix that contains the design matrix of interest. Used for adding the thin plate regression spline basis functions in the 'spase' function and for adding cell type as a covariate. Note that we assume there is an intercept column in mod.mat.

Details

Just wraps glm to return either the fit or warning description. Warnings and errors occur when the model doesn't converge. These will be flagged for removing downstream.

Value

A list the result, warnings, and errors


lulizou/spASE documentation built on May 22, 2024, 5:24 a.m.