glm.cox | 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.cox(
stop,
status,
start = -Inf,
weights = NULL,
tie_method = c("efron", "breslow")
)
stop |
Stop time vector. |
status |
Binary status vector of same length as |
start |
Start time vector. Default is a vector of |
weights |
Observation weights, with default |
tie_method |
The tie-breaking method - one of |
Cox GLM object.
James Yang, Trevor Hastie, and Balasubramanian Narasimhan
Maintainer: Trevor Hastie hastie@stanford.edu
glm.gaussian
, glm.binomial
, glm.poisson
, glm.multinomial
, glm.multigaussian
, glm.cox
.
n <- 100
start <- sample.int(20, size=n, replace=TRUE)
stop <- start + 1 + sample.int(5, size=n, replace=TRUE)
status <- rbinom(n, 1, 0.5)
obj <- glm.cox(start, stop, status)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.