york_plot: Regression confidence intervals

Description Usage Arguments Details Value Contributors References Examples

View source: R/york.R

Description

york_plot() calculates and optionally plots the confidence intervals of an (error-considering) linear regression.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
york_plot(
  x,
  slope,
  slope_se,
  intercept,
  intercept_se,
  cl = 0.95,
  weights = -1,
  add = FALSE,
  col = "black"
)

Arguments

x

x values of the data points.

slope

regression slope.

slope_se

Standard error of the slope.

intercept

regression intercept.

intercept_se

Standard error of the intercept.

cl

Confidence level. Default: 0.95.

weights

Weights of the data points. If given, mean & SD of x are computed with the weights. Has to be same the length as x. Optional.

add

Add graphics to an already existing plot? Default: FALSE.

col

Graphical parameter. Optional.

Details

The algorithm is described in the appendix of Wacker et al. (2014).

Value

A list with regression parameters:

Contributors

Julian Tödter

References

Wacker, U., Fiebig, J., Tödter, J., Schöne, B. R., Bahr, A., Friedrich, O., et al. (2014). Empirical calibration of the clumped isotope paleothermometer using calcites of various origins. Geochimica et Cosmochimica Acta, 141, 127-144. doi: 10.1016/j.gca.2014.06.004

Examples

1
2
3
4
5
6
7
york_plot(
  x = c(1, 2, 3),
  slope = 1.06,
  slope_se = 1.60,
  intercept = -0.05,
  intercept_se = 0.34,
  cl = 0.98)

isogeochem documentation built on Nov. 7, 2021, 5:08 p.m.