Learn R Programming

metamisc (version 0.1.9)

plot.fat: Display results from the funnel plot asymmetry test

Description

Generates a funnel plot for a fitted fat object.

Usage

# S3 method for fat
plot(x, ref, confint = TRUE, confint.level = 0.1,
  confint.col = "skyblue", confint.density = NULL, xlab = "Effect size",
  ...)

Arguments

x

An object of class fat

ref

A numeric value indicating the fixed or random effects summary estimate. If no value is provided then it will be retrieved from a fixed effects meta-analysis (if possible).

confint

A logical indicator. If TRUE, a confidence interval will be displayed for the estimated regression model (based on a Student-T distribution)

confint.level

Significance level for constructing the confidence interval.

confint.col

The color for filling the confidence interval. Choose NA to leave polygons unfilled. If confint.density is specified with a positive value this gives the color of the shading lines.

confint.density

The density of shading lines, in lines per inch. The default value of NULL means that no shading lines are drawn. A zero value of density means no shading nor filling whereas negative values and NA suppress shading (and so allow color filling).

xlab

A title for the x axis

...

Additional arguments for plot.

Examples

Run this code
# NOT RUN {
data(Fibrinogen)
b <- log(Fibrinogen$HR)
b.se <- ((log(Fibrinogen$HR.975) - log(Fibrinogen$HR.025))/(2*qnorm(0.975)))
n.total <- Fibrinogen$N.total

# A very simple funnel plot
plot(fat(b=b, b.se=b.se))

# Add custom tickmarks for the X-axis
plot(fat(b=b, b.se=b.se, n.total=n.total, method="M-FIV"), xlab="Hazard ratio", xaxt="n")
axis(1, at=c(log(0.5), log(1), log(1.5), log(2), log(3)), labels=c(0.5, 1, 1.5, 2,3))

# }

Run the code above in your browser using DataLab