glm.binomial: Creates a Binomial GLM family object.
Description
A GLM family object specifies the type of model fit, provides the appropriate response object and makes sure it is represented in the right form for the model family, and allows for optional parameters such as a weight vector.
Usage
glm.binomial(y, weights = NULL, link = "logit")
Value
Binomial GLM object.
Arguments
y
Binary response vector, with values 0 or 1, or a logical vector. Alternatively, if data are represented by a two-column matrix of proportions (with row-sums = 1), then one can provide one of the columns as the response. This is useful for grouped binomial data, where each observation represents the result of m[i] successes out of n[i] trials. Then the response is provided as y[i] = m[i]/n[i] and the corresponding element of the weight vector as w[i]=n[i]. Alternatively can use glm.multinomial() instead.
weights
Observation weight vector, with default NULL, which results in weight 1/n for each observation.
link
The link function type, with choice "logit" (default) or "probit").