summary.flexrsurv: Summarizing Flexible Relative Survival Model Fits

summary.flexrsurvR Documentation

Summarizing Flexible Relative Survival Model Fits

Description

summary methods for class flexrsurv. Produces and prints summaries of the results of a fitted Relative Survival Model

Usage

## S3 method for class 'flexrsurv'
summary(object, correlation = FALSE, symbolic.cor = FALSE, ...)

## S3 method for class 'summary.flexrsurv'
print(x, digits = max(3L, getOption("digits") - 3L), 
      symbolic.cor = x$symbolic.cor,
      signif.stars = getOption("show.signif.stars"), ...)

Arguments

object

an object of class "flexrsurv", usually, a result of a call to flexrsurv.

x

an object of class "summary.flexrsurv", usually, a result of a call to summary.flexrsurv.

correlation

logical; if TRUE, the correlation matrix of the estimated parameters is returned and printed.

symbolic.cor

logical. If TRUE, print the correlations in a symbolic form (see symnum) rather than as numbers.

digits

the number of significant digits to use when printing.

signif.stars

logical. If TRUE,'significance stars' are printed for each coefficient.

...

further arguments passed to or from other methods.

Details

print.summary.glm tries to be smart about formatting the coefficients, standard errors, etc. and additionally gives ‘significance stars’ if signif.stars is TRUE.

Correlations are printed to two decimal places (or symbolically): to see the actual correlations print summary(object)$correlation directly.

The dispersion of a GLM is not used in the fitting process, but it is needed to find standard errors. If dispersion is not supplied or NULL, the dispersion is taken as 1 for the binomial and Poisson families, and otherwise estimated by the residual Chisquared statistic (calculated from cases with non-zero weights) divided by the residual degrees of freedom.

Value

The function summary.flexrsurv computes and returns a list of summary statistics of the fitted flexible relative survival model given in object. The returned value is an object of class "summary.flexrsurv", which a list with components:

call

the "call" component from object.

terms

the "terms" component from object.

coefficients

the matrix of coefficients, standard errors, z-values and p-values.

cov

the estimated covariance matrix of the estimated coefficients.

correlation

(only if correlation is true.) the estimated correlations of the estimated coefficients.

symbolic.cor

(only if correlation is true.) the value of the argument symbolic.cor.

loglik

the "loglik" component from object.

df.residual

the "df.residual" component from object.

See Also

summary, flexrsurv, flexrsurvclt.

Examples



if (requireNamespace("relsurv", quietly = TRUE)) {
	
	# data from package relsurv
	data(rdata, package="relsurv")
	# rate table from package relsurv
	data(slopop, package="relsurv")
	
	# get the death rate at event (or end of followup) from slopop for rdata
	rdata$iage <- findInterval(rdata$age*365.24+rdata$time, attr(slopop, "cutpoints")[[1]])
	rdata$iyear <- findInterval(rdata$year+rdata$time, attr(slopop, "cutpoints")[[2]])
	therate <- rep(-1, dim(rdata)[1])
	for( i in 1:dim(rdata)[1]){
	  therate[i] <- slopop[rdata$iage[i], rdata$iyear[i], rdata$sex[i]]
	}
	
	rdata$slorate <- therate
	
	
	# change sex coding
	rdata$sex01 <- rdata$sex -1
	
	# fit a relative survival model with a non linear effetc of age
	
	fit <- flexrsurv(Surv(time,cens)~sex01+NLL(age, Knots=60, Degree=3), 
	                 rate=slorate, data=rdata,
	                 knots.Bh=1850,  # one interior knot at 5 years
	                 degree.Bh=3,
	                 Spline = "b-spline",
	                 initbyglm=TRUE, 
	                 initbands=seq(from=0, to=5400, by=200),
	                 int_meth= "CAV_SIM",
	                 step=50
	                 )
	
	summary(fit)
}


flexrsurv documentation built on June 7, 2023, 5:09 p.m.