Description Usage Arguments Author(s) Examples
For plotting raindrops
1 2 3 |
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? |
Nick Barrowman <nbarrowman@cheo.on.ca>
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.