ORplot {moonBook}R Documentation

Plot for odds ratios for a S3 object of glm

Description

Plot for odds ratios for a S3 object of glm

Usage

ORplot(
  x,
  type = 1,
  xlab = "",
  ylab = "",
  show.OR = TRUE,
  show.CI = FALSE,
  sig.level = 1,
  cex = 1.2,
  lwd = 2,
  pch = 18,
  col = NULL,
  ...
)

Arguments

x

A S3 object of glm

type

an integer defining the shape of plots; default value is 1

xlab

label for the horizontal-axis; defaults to "Odds Ratios"

ylab

label for the vertical axis; defaults to "".

show.OR

A logical value; Whether or not show p values on plot

show.CI

A logical value; Whether or not show 95% CI values on plot

sig.level

A numeric value of upper limit of p value of showing variables

cex

A numerical value giving the amount by which plotting OR/HR symbols should be magnified relative to the default, defaulting 1.2.

lwd

The line width, a positive number, defaulting to 2.

pch

Either an integer specifying a symbol or a single character to be used as the default in plotting OR/HR points.

col

A specification for the default plotting color.

...

arguments to be passed to plot

Value

This function return NULL invisibly and draw graphs

Examples

require(survival)
data(colon)
out1=glm(status~sex+age+rx+obstruct+node4,data=colon)
out2=glm(status~rx+node4,data=colon)
ORplot(out1,type=2,show.CI=TRUE,xlab="This is xlab",main="Main Title")
ORplot(out2,type=1,main="Main Title")
ORplot(out1,type=2,show.CI=TRUE,main="Main Title")
ORplot(out1,type=3,show.CI=TRUE,main="Main Title",sig.level=0.05)
ORplot(out1,type=3,show.CI=TRUE,main="Main Title",sig.level=0.05,
       pch=1,cex=2,lwd=4,col=c("red","blue"))

[Package moonBook version 0.3.1 Index]