plotraindrops: plotraindrops: plot a list of raindrops

Description Usage Arguments Author(s) Examples

View source: R/raindrop.R

Description

For plotting raindrops

Usage

1
2
3
plotraindrops(logliks, theta, cutoff = -2, type = "loglik",
  tfactor = 1, col = 2, lwd = 1, xlim = range(theta),
  K = length(logliks), ylim = c(1, 3 * K + 2), xaxis = TRUE)

Arguments

logliks

Log likelihoods

theta

Corresponding parameter values.

cutoff

decrease from maximum in the log likelihood

type

type of curve

tfactor

not sure

col

fill color

lwd

line width

xlim

x-limits for plot

K

number of log likelihoods (not necessary to specify)

ylim

y-limits for plot

xaxis

draw the x-axis?

Author(s)

Nick Barrowman <nbarrowman@cheo.on.ca>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
studies <- data.frame(trial=c(1,1),x=c(1,15),n=c(11,25),rx=c(1,0))
theta <- seq(-8,1,length=200)
# create quadratic log likelihood
study1fit <- glm(cbind(x,n-x)~rx,family=binomial,data=studies[studies$trial==1,])
table <- summary(study1fit)$coef
mlelogOR <- table["rx","Estimate"] 
ASElogOR <- table["rx","Std. Error"]
quadloglik <- -0.5*(theta-mlelogOR)^2/ASElogOR^2
# create conditional log likelihood
condloglik <- log(clik(theta,1,10,15,10))
maxcondloglik <- max(condloglik)
plotraindrops(list("Wald"=quadloglik,"Conditional"=condloglik),theta)

nbarrowman/raindrop documentation built on May 7, 2019, 6:58 p.m.