% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gof-phreg.R
\name{gof.phreg}
\alias{gof.phreg}
\title{GOF for Cox PH regression}
\usage{
\method{gof}{phreg}(object, n.sim = 1000, silent = 1, robust = NULL, ...)
}
\arguments{
\item{object}{is phreg object}

\item{n.sim}{number of simulations for score processes}

\item{silent}{to show timing estimate will be produced for longer jobs}

\item{robust}{to control wether robust dM_i(t) or dN_i  are used for simulations}

\item{...}{Additional arguments to lower level funtions}
}
\description{
Cumulative score process residuals for Cox PH regression
p-values based on Lin, Wei, Ying resampling.
}
\examples{
library(mets)
data(sTRACE)

m1 <- phreg(Surv(time,status==9)~vf+chf+diabetes,data=sTRACE) 
gg <- gof(m1)
gg
par(mfrow=c(1,3))
plot(gg)

m1 <- phreg(Surv(time,status==9)~strata(vf)+chf+diabetes,data=sTRACE) 
## to get Martingale ~ dN based simulations
gg <- gof(m1)
gg

## to get Martingale robust simulations, specify cluster in  call 
sTRACE$id <- 1:500
m1 <- phreg(Surv(time,status==9)~vf+chf+diabetes+cluster(id),data=sTRACE) 
gg <- gof(m1)
gg

m1 <- phreg(Surv(time,status==9)~strata(vf)+chf+diabetes+cluster(id),data=sTRACE) 
gg <- gof(m1)
gg
}
\author{
Thomas Scheike and Klaus K. Holst
}
