View source: R/predict.aalen.model.R
predict.aalen.model | R Documentation |
A function that returns subject-specific predictions from a survaalen or rsaalen object.
## S3 method for class 'aalen.model'
predict(object, newdata, type = "Haz", ...)
object |
A survaalen or rsaalen object |
newdata |
A data.frame with one row (add covariate values in columns) |
type |
By default ('Haz') returns cumulative hazards. If 'prob' it calculates CDF/CIFs. If 'both' a list is returned with Haz and prob. |
... |
Not used for now |
A data.frame containing the times and survival (or excess/population) estimates.
Damjan Manevski damjan.manevski@mf.uni-lj.si
data(rdata)
mod <- survaalen(Surv(time, cens)~sex+age, data=rdata)
predict(mod, data.frame(age=68, sex=2))
mod <- rsaalen(Surv(time, cens)~sex+age, data=rdata, ratetable=slopop,
rmap=list(age=age*365.241))
predict(mod, data.frame(age=68, sex=2, year=as.Date('1982-06-24')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.