TABLE OF CONTENTS
S3Methods/printcurvesummary [ Functions ]
NAME
printcurvesummary --- summarize a curve for summary.splinesurv
FUNCTION
Routine called by summary.splinesurv to print a nice summary of a curve structure including mean number of knots, boundaries, parametric/spline components and weights, etc.
SYNOPSIS
3720 printcurvesummary <- function(curve, w = NULL, param.par = NULL)
INPUTS
curve an RCurve structure, possibly with portions missing w weight of splines component param.par parametric component parameters to use
OUTPUTS
none, screen output only
SOURCE
3723 { 3724 haspar <- curve$type == "both" || curve$type == "parametric" 3725 hasspline <- curve$type == "both" || curve$type == "spline" 3726 # print spline component 3727 if(hasspline) { 3728 cat("\n\tSpline") 3729 if(haspar) cat(" ( weight =", format(w, digits = 3), "):") else cat(":") 3730 cat("\n\t\tOrder:", curve$spline.ord) 3731 cat("\n\t\tMean Interior knots:", format(curve$spline.nknots, digits = 2)) 3732 if(curve$name == "frailty") cat("\n\t\tVariance: ", format(curve$spline.fvar, 3733 digits = 3)) 3734 } 3735 # print parametric component 3736 if(haspar){ 3737 cat("\n\tParametric") 3738 if(hasspline) cat(" ( weight =", format(1 - w, digits = 3), "):") else cat(":") 3739 dist <- curve$param.dist 3740 cat("\n\t\tDistribution:", curve$param.dist) 3741 if(curve$name == "hazard" & dist == "exponential"){ 3742 cat("\n\t\tRate:", format(exp(param.par), digits = 3)) 3743 } 3744 if(curve$name == "hazard" & dist == "weibull"){ 3745 cat("\n\t\tRate:", format(exp(param.par[1]), digits = 3)) 3746 cat("\n\t\tScale:", format(exp(param.par[2]), digits = 3)) 3747 } 3748 if(curve$name == "frailty" & (dist == "gamma" | dist == "lognormal")){ 3749 cat("\n\t\tVariance:", format(exp(param.par), digits = 3)) 3750 } 3751 3752 } 3753 }