glm.binomial | R Documentation |
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.
glm.binomial(y, weights = NULL, link = "logit")
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 |
weights |
Observation weight vector, with default |
link |
The link function type, with choice |
Binomial GLM object.
Trevor Hastie and James Yang
Maintainer: Trevor Hastie hastie@stanford.edu
glm.gaussian
, glm.binomial
, glm.poisson
, glm.multinomial
, glm.multigaussian
, glm.cox
.
n <- 100
y <- rbinom(n, 1, 0.5)
obj <- glm.binomial(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.