Learn R Programming

FRESA.CAD (version 2.2.0)

summaryReport: Report the univariate analysis, the cross-validation analysis and the correlation analysis

Description

This function takes the variables of the cross-validation analysis and extracts the results from the univariate and correlation analyses. Then, it prints the cross-validation results, the univariate analysis results, and the correlated variables. As output, it returns a list of each one of these results.

Usage

summaryReport(univariateObject, summaryBootstrap, listOfCorrelatedVariables = NULL, digits = 2)

Arguments

univariateObject
A data frame that contains the results of the univariateRankVariables function
summaryBootstrap
A list that contains the results of the summary.bootstrapValidation_Bin function
listOfCorrelatedVariables
A matrix that contains the correlated.variables value from the results obtained with the listTopCorrelatedVariables function
digits
The number of significant digits to be used in the print function

Value

performance.table
A matrix with the tabulated results of the blind test accuracy, sensitivity, specificities, and area under the ROC curve
coefStats
A data frame that lists all the model features along with its univariate statistics and bootstrapped coefficients
cor.varibles
A matrix that lists all the features that are correlated to the model variables

See Also

summary.bootstrapValidation_Bin

Examples

Run this code
	## Not run: 
# 	# Start the graphics device driver to save all plots in a pdf format
# 	pdf(file = "Example.pdf")
# 	# Get the stage C prostate cancer data from the rpart package
# 	library(rpart)
# 	data(stagec)
# 	# Split the stages into several columns
# 	dataCancer <- cbind(stagec[,c(1:3,5:6)],
# 	                    gleason4 = 1*(stagec[,7] == 4),
# 	                    gleason5 = 1*(stagec[,7] == 5),
# 	                    gleason6 = 1*(stagec[,7] == 6),
# 	                    gleason7 = 1*(stagec[,7] == 7),
# 	                    gleason8 = 1*(stagec[,7] == 8),
# 	                    gleason910 = 1*(stagec[,7] >= 9),
# 	                    eet = 1*(stagec[,4] == 2),
# 	                    diploid = 1*(stagec[,8] == "diploid"),
# 	                    tetraploid = 1*(stagec[,8] == "tetraploid"),
# 	                    notAneuploid = 1-1*(stagec[,8] == "aneuploid"))
# 	# Remove the incomplete cases
# 	dataCancer <- dataCancer[complete.cases(dataCancer),]
# 	# Load a pre-stablished data frame with the names and descriptions of all variables
# 	data(cancerVarNames)
# 	# Perform a univariate analysis
# 	rankedDataCancer <- univariateRankVariables(variableList = cancerVarNames,
# 	                                           formula = "Surv(pgtime, pgstat) ~ 1",
# 	                                           Outcome = "pgstat",
# 	                                           data = dataCancer, 
# 	                                           categorizationType = "Raw", 
# 	                                           type = "COX", 
# 	                                           rankingTest = "zIDI",
# 	                                           description = "Description")
# 	# Get the variables that have a correlation coefficient 
# 	# larger than 0.65 at a p-value of 0.05
# 	cor <- listTopCorrelatedVariables(variableList = cancerVarNames,
# 	                                  data = dataCancer,
# 	                                  pvalue = 0.05,
# 	                                  corthreshold = 0.65,
# 	                                  method = "pearson")
# 	# Get a Cox proportional hazards model using:
# 	# - 10 bootstrap loops
# 	# - Age as a covariate
# 	# - zIDI as the feature inclusion criterion
# 	cancerModel <- ForwardSelection.Model.Bin(loops = 10,
# 	                                           covariates = "1 + age",
# 	                                           Outcome = "pgstat",
# 	                                           variableList = cancerVarNames,
# 	                                           data = dataCancer,
# 	                                           type = "COX",
# 	                                           timeOutcome = "pgtime",
# 	                                           selectionType = "zIDI")
# 	# Validate the previous model:
# 	# - Using 50 bootstrap loops
# 	bootCancerModel <- bootstrapValidation_Bin(loops = 50,
# 	                                       model.formula = cancerModel$formula,
# 	                                       Outcome = "pgstat",
# 	                                       data = dataCancer,
# 	                                       type = "COX")
# 	# Get the summary of the bootstrapped model
# 	sumBootCancerModel <- summary.bootstrapValidation_Bin(object = bootCancerModel)
# 	# Get the summary report
# 	sumReport <- summaryReport(univariateObject = rankedDataCancer,
# 	                           summaryBootstrap = sumBootCancerModel,
# 	                           listOfCorrelatedVariables = cor$correlated.variables)
# 	# Shut down the graphics device driver
# 	dev.off()## End(Not run)

Run the code above in your browser using DataLab