pseu {funkcije} R Documentation

Hazard regression models diagnostics

Description

A function for graphical and formal testing of the Cox and additive model assumptions

Usage

pseu(formula, data,type=c("surv","cox","add"),resid,test,nt,pl,ylim,col,bins,linpred)

Arguments

formula a formula object, with the response (a Surv object) on the left of a ~ operator, and the terms on the right. The terms consist of predictor variables separated by the + operator. The first predictor variable on the right hand side is the covariate of interest - this is the covariate that will be plotted on the x-axis (unless the linpred option is set to TRUE.)
data a data.frame in which to interpret the variables named in the formula.
type type surv gives a nonparametric estimate of S(t|z), types "cox" and "add" give plots on the scale of the linear predictor of the chosen model. If the option resid=TRUE, the option type defines the model used for calculating the predicted survival used in the calculation of residuals.
resid logical, default is FALSE. If set to TRUE, the diagnostics are performed using the residuals.
test logical, default is FALSE. If set to TRUE test stastistics will be calculated.
nt the number of chosen time points, the default is 3.
pl logical, if TRUE (default) graphical diagnostics will be performed
ylim allows changing the y axis limits for the plots.
col vector of colors for the subsequent curves representing the different time points. Should be of the same length as nt.
bins logical, if TRUE(default) the distribution of the covariate is sketched on the bottom of the figure.
linpred logical, default is FALSE. If set to TRUE the graphs are plotted against the linear predictor instead of just one covariate.

Value

ps a matrix giving the values of the curves at each time point. Each curve is stored in one column. The number of the columns equals the number of the chosen time points
time the time points chosen
z the values of the covariate or the linear predictor
test the test results, if the option test was set to TRUE.

Examples

library(survival)
data(pbc)
pseuu(Surv(timet,status)~bili,data=pbc,type="cox")
pseuu(Surv(timet,status)~bili,data=pbc,type="add")
pseuu(Surv(timet,status)~bili,data=pbc,type="cox",resid=T,ylim=c(-2,2))
pseuu(Surv(timet,status)~bili,data=pbc,type="add",resid=T,ylim=c(-2,2))

[Package funkcije version 1.0 Index]

X

OPOZORILO : Pregledujete staro stran IBMI

Vsebine na strani so zastarele in se ne posodabljajo več. Stara stran zajema določene članke in vsebine, ki pa morajo biti še vedno dostopne.

Za nove, posodobljene vsebine se obrnite na http://ibmi.mf.uni-lj.si/