HTMLsummary: Summarize the risk prediction plots.

Description Usage Arguments Author(s) References Examples

Description

Create an HTML page that summarizes all the plots that have been created to visualize the risk prediction. When a patient was given, a patient summary will be given as well. This function is only applicable for multinom objects.

Usage

1
HTMLsummary(fit, summaryfile, filename, title)

Arguments

fit

A multinom object or a character vector. In the latter case the vector consists of the names of the outcome levels.

summaryfile

Name of the resulting HTML file

filename

The filename that was given to the colplot, cchart or ccchart commands.

title

Title of the summary.

Author(s)

Vanya Van Belle

References

Van Belle V., Van Huffel S., Timmerman D., Froyman W., Bourne T. and Van Calster B., A color based nomogram for Multinomial Logistic Regression, Internal Report 16-28, ESAT-Stadius, KU Leuven (Leuven, Belgium), 2016

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# only applicable for multinom objects
library(nnet)
library(R2HTML)
library(VGAMdata)
data(xs.nz)
marital.nz <- xs.nz[,c("marital","sex","age","height","weight")]
mydata <- marital.nz[complete.cases(marital.nz),]
fit <- multinom(marital ~ sex + age + height + weight, data = mydata,model=TRUE)
# for multinimial logistic regression, a vector of risk labels needs to be made 
# and provided to the colplot function
outnames=colnames(fitted(fit))
labels=c(paste("Linear predictor for",outnames[-1]),paste
				("Predicted chance of being",outnames))
patient1=data.frame(sex="F",age=27,height=1.68,weight=58.6)
colplot(fit,coloroptions=3,risklabel=labels,filename="multinom")
# this generates a file mysummary.html containing all plots provided by the above 
# colplot statement. 
HTMLsummary(fit=fit, summaryfile="mysummary", filename="multinom",
		title="Global summary of a multinomial logistic regression model estimating 
				the risk on different marital statuses.")
# this generates a file mysummary1.html containing all plots provided by the below 
# colplot statement.  Since an observation is provided, a patient summary will also 
# be given.
colplot(fit,obs=patient1,coloroptions=3,risklabel=labels,filename="multinom")
HTMLsummary(fit=fit, summaryfile="mysummary1", filename="multinom",
		title="Global summary of a multinomial logistic regression model estimating 
				the risk on	different marital statuses.")

Example output

# weights:  24 (15 variable)
initial  value 14432.710594 
iter  10 value 8525.795542
iter  20 value 6910.609663
final  value 6874.318316 
converged
More than one figure will be created within the directory /work/tmp
Writing to file mysummary.html
Processing code chunks ...
file  mysummary.html is completed 
More than one figure will be created within the directory /work/tmp
Writing to file mysummary1.html
Processing code chunks ...
file  mysummary1.html is completed 

VRPM documentation built on May 1, 2019, 8:02 p.m.

Related to HTMLsummary in VRPM...