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