a method for class 'mdr' to plot case/control counts for each factor combination of a previously fit MDR model
Usage
## S3 method for class 'mdr'
plot(x, data, main="", xlab="", ylab="Count", table=FALSE,...)
Arguments
x
an object of class 'mdr', a result of a call to either mdr.cv or mdr.3WS
data
data set used to fit object
main
title for the plot; default is no title
xlab
Label for the x-axis; default is no label
ylab
Label for the y-axis; default is "Count"
table
logical for whether a summary table of case/control counts should be produced; default is FALSE
...
additional arguments
Details
A call to plot produces a trellis-style bar chart of case and control counts for each factor combination from object. Cases are plotted in black and controls are plotted in white. Factor combinations considered 'high-risk' are shaded gray, as seen in the legend.
Note
Requires the package lattice. For models of size 3 or greater, stretch the plot window for better viewing.
Author(s)
Stacey Winham
See Also
mdr.cv, mdr.3WS, predict.mdr, summary.mdr
Examples
#load data
data(mdr1)
#fit mdr model to a subset of the sample data
fit<-mdr.cv(data=mdr1[,1:11], K=2, cv=5)
plot(fit, data=mdr1)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MDR)
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MDR/plot.mdr.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.mdr
> ### Title: Plotting the results of an MDR model
> ### Aliases: plot.mdr
>
> ### ** Examples
>
> #load data
> data(mdr1)
>
> #fit mdr model to a subset of the sample data
> fit<-mdr.cv(data=mdr1[,1:11], K=2, cv=5)
>
> plot(fit, data=mdr1)
>
>
>
>
>
>
> dev.off()
null device
1
>