display.pcurve: A Wrapper Function for Plotting P-Curves

Description Usage Arguments Value References Examples

View source: R/plot.R

Description

A wrapper for plotting P-curves using confidence objects returned by *.conf() functions from clp.

Usage

1
2
3
4
5
6
7
8
9
display.pcurve(
  obj,
  conf.level = 0.95,
  xlim = NULL,
  xlab = NULL,
  log = "",
  col = "black",
  n.points = 2001
)

Arguments

obj

a list of confidence functions returned by a *.conf() function

conf.level

the confidence level for the confidence interval indicated on the P-curve

xlim

the horizontal limits for the plot. If NULL, taken as the larger of a conf.level confidence interval or a 1 - (1 - conf.level)/2 confidence interval.

xlab

the label for the horizontal axis

log

switch for plotting the horizontal ('x') or vertical ('x') or both ('xy') axes with a log-scaling

col

the color to plot the confidence curve

n.points

the number of points to plot for the confidence curve

Value

a plot of the P-curve from obj

References

Tore Schweder and Nils Lid Hjort. Confidence, likelihood, probability. Vol. 41. Cambridge University Press, 2016.

Examples

1
2
3
4
5
6
7
data(dietstudy)

x <- dietstudy$weightchange[dietstudy$diet == 'Low Carb']

out <- t_test.conf(x, plot = FALSE)

display.pcurve(out, conf.level = 0.999, xlab = 'Average Weight Loss in Low Carb Group (lbs)')

ddarmon/clp documentation built on Jan. 25, 2021, 6:22 p.m.