rs.br {relsurv} | R Documentation |
Test the proportional hazards assumption for relative survival models (rsadd
, rsmul
or rstrans
)
by forming a Brownian Bridge.
rs.br(fit,sc,rho=0,test="max",global=TRUE)
fit |
the result of fitting a relative survival model, using the
rsadd , rsmul or rstrans function.
|
sc |
partial residuals calculated by the resid function. This is used to save time if several tests
are to be calculated on these residuals and can otherwise be omitted.
|
rho |
a number controlling the weigths of residuals. The weights are the number of individuals at
risk at each event time to the power rho . The default is rho=0 , which sets all
weigths to 1.
|
test |
a character string specifying the test to be performed on Brownian bridge.
Possible values are "max" (default), which tests the maximum absolute value of the
bridge, and cvm , which calculates the Cramer Von Mises statistic.
|
global |
should a global Brownian bridge test be performed, in addition to the per-variable tests |
an object of class rs.br
. This function would usually be followed by both a
print and a plot of the result. The plot gives a Brownian bridge for each of the variables.
The horizontal lines are the 95
of the Brownian bridge
Stare J., Pohar M., Henderson R. "Goodness of fit for relative survival models." Statistics in Medicine 24 3911-3925, 2005.
data(slopop) data(rdata) fit <- rsadd(Surv(time,cens)~sex+ratetable(age=age*365,sex=sex,year=year), ratetable=slopop,data=rdata,int=5) rsbr <- rs.br(fit) print(rsbr) plot(rsbr)