getFit | R Documentation |
Fit the results in a data.frame
produced by either tally
or
score
.
getFit(obj, by = c("sequential", "column", "row"))
obj |
A |
by |
A character string indicating the organization of the results (see 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.
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
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.