Learn R Programming

metagen (version 1.0)

plotStudyQfuncPfunc: Example: Plotting the q- and p-function from the dissertation

Description

Example: Plotting the q- and p-function from the dissertation

Usage

plotStudyQfuncPfunc(y, d, x, n)

Arguments

y
a vector of responses.
d
a vector of heteroscedasticity.
x
a design matrix.
n
number of points to interpolate along.

Value

A list of objects created by ggplot2.

Examples

Run this code
bcg   <- bcgVaccineData()
bcg_y <- bcg$logrisk
bcg_d <- bcg$sdiv
bcg_s <- bcg$size
bcg_x <- cbind(1,bcg$x)
p <- plotStudyQfuncPfunc(y=bcg_y, d=bcg_d, x=bcg_x, n=500)
p[1] # plot of the q-function
p[2] # plot of the p-funciton

Run the code above in your browser using DataLab