york_plot {isogeochem} | R Documentation |
Regression confidence intervals
Description
york_plot()
calculates and optionally plots the confidence intervals of
an (error-considering) linear regression.
Usage
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: |
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: |
col |
Graphical parameter. Optional. |
Details
The algorithm is described in the appendix of Wacker et al. (2014).
Value
A list with regression parameters:
slope and its standard error
intercept and its standard error
weights of the points (normalized to 1)
residual standard error (sigma)
R2
p-value (two-tailed t-test).
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
york_plot(
x = c(1, 2, 3),
slope = 1.06,
slope_se = 1.60,
intercept = -0.05,
intercept_se = 0.34,
cl = 0.98)