- outcome
the binomial response: either a numeric vector, a factor in
which the first level denotes failure and all others success, or a
two-column matrix with the columns giving the numbers of successes and
failures.
- player1
either an ID factor specifying the first player in each
contest, or a data.frame containing such a factor and possibly other
contest-level variables that are specific to the first player. If given in a
data.frame, the ID factor must have the name given in the id
argument. If a factor is specified it will be used to create such a
data.frame.
- player2
an object corresponding to that given in player1
for
the second player in each contest, with identical structure -- in particular
factors must have identical levels.
- formula
a formula with no left-hand-side, specifying the model for
player ability. See details for more information.
- id
the name of the ID factor.
- separate.ability
(if formula
does not include the ID factor as
a separate term) a character vector giving the names of players whose
abilities are to be modelled individually rather than using the
specification given by formula
.
- refcat
(if formula
includes the ID factor as a separate term)
a character specifying which player to use as a reference, with the first
level of the ID factor as the default. Overrides any other contrast
specification for the ID factor.
- family
a description of the error distribution and link function to
be used in the model. Only the binomial family is implemented, with
either"logit"
, "probit"
, or "cauchit"
link. (See
stats::family()
for details of family functions.)
- data
an optional object providing data required by the model. This
may be a single data frame of contest-level data or a list of data frames.
Names of data frames are ignored unless they refer to data frames specified
by player1
and player2
. The rows of data frames that do not
contain contest-level data must correspond to the levels of a factor used
for indexing, i.e. row 1 corresponds to level 1, etc. Note any rownames are
ignored. Objects are searched for first in the data
object if
provided, then in the environment of formula
. If data
is a
list, the data frames are searched in the order given.
- weights
an optional numeric vector of ‘prior weights’.
- subset
an optional logical or numeric vector specifying a subset of
observations to be used in the fitting process.
- na.action
a function which indicates what should happen when any
contest-level variables contain NA
s. The default is the
na.action
setting of options
. See details for the handling of
missing values in other variables.
- start
a vector of starting values for the fixed effects.
- etastart
a vector of starting values for the linear predictor.
- mustart
a vector of starting values for the vector of means.
- offset
an optional offset term in the model. A vector of length equal
to the number of contests.
- br
logical. If TRUE
fitting will be by penalized maximum
likelihood as in Firth (1992, 1993), using brglm::brglm()
,
rather than maximum likelihood using glm()
, when abilities are
modelled exactly or when the abilities are modelled by covariates and the
variance of the random effects is estimated as zero.
- model
logical: whether or not to return the model frame.
- x
logical: whether or not to return the design matrix for the fixed
effects.
- contrasts
an optional list specifying contrasts for the factors in
formula
. See the contrasts.arg
of model.matrix()
.
- ...
other arguments for fitting function (currently either
glm()
, brglm::brglm()
, or glmmPQL()
)