getFit: Fit Infectivity Results with Binomial GLM Model

View source: R/getFit.R

getFitR Documentation

Fit Infectivity Results with Binomial GLM Model

Description

Fit the results in a data.frame produced by either tally or score.

Usage

getFit(obj, by = c("sequential", "column", "row"))

Arguments

obj

A data.frame produced by tally or by score.

by

A character string indicating the organization of the results (see details.)

Details

This function will fit a GLM binomial model using a two-column response where the fit is weighted by the total numbers of cases. Data are fit by the glm function using a complementary log-log model. The data can be organized as a single, sequential series of values or by rows or columns. If the argument by is "sequential", all the data are assumed to represent a single assay. If by is either "row" or "column", fits will be generated for data partitioned by row or column, respectively.

The argument obj must be produced either by tally or by score. If a variable named "positive" is present, the data are assumed to have been produced by score and the function tally will be called before proceeding. If variables named "pos" and "neg" are present, the data are assumed to be the product of tally. In the case of a data frame produced by score, the data must have a variable named "moi" or "x" representing the multiplicity of infection. Data produced by tally will always have a variable named "x" representing the multiplicity.

Value

A fitted glm model or list of models. Each fitted model has the unit of measure attached as an attribute with the text value from unit.


ornelles/virustiter documentation built on March 15, 2024, 9:28 a.m.