ci | R Documentation |
Given a parameter estimate and its standard error,
calculate the corresponding 1-sigma, 2-sigma or
100(1-\alpha)\%
confidence interval, in absolute or
relative units.
ci(x = 0, sx, oerr = 3, df = NULL, absolute = FALSE)
x |
scalar estimate |
sx |
scalar or vector with the standard error of x without and
(optionally) with |
oerr |
indicates if the confidence intervals should be reported as:
|
df |
(optional) number of degrees of freedom. Only used if
|
absolute |
logical. Returns absolute uncertainties even if
|
Several of IsoplotR
's plotting functions (including
isochron
, weightedmean
,
concordia
, radialplot
and
helioplot
) return lists of parameters and their
standard errors. For ‘model-1’ fits, if the data pass a
Chi-square test of homogeneity, then just one estimate for the
standard error is reported. This estimate can be converted to
a confidence interval by multiplication with the appropriate
quantile of a Normal distribution. Datasets that fail the
Chi-square test are said to be ‘overdispersed’ with respect to
the analytical uncertainties. The simplest way (‘model-1’) to
deal with overdispersion is to inflate the standard error with
a \sqrt{MSWD}
premultiplier. In this case,
IsoplotR
returns two estimates of the standard error.
To convert the second estimate to a confidence interval
requires multiplication with the desired quantile of a
t-distribution with the appropriate degrees of freedom.
A scalar or vector of the same size as sx
.
attach(examples)
fit <- isochron(PbPb,plot=FALSE,exterr=FALSE)
err <- ci(x=fit$age[1],sx=fit$age[-1],oerr=5,df=fit$df)
message('age=',signif(fit$age[1],4),'Ma, ',
'2se=',signif(err[1],2),'%, ',
'2se(with dispersion)=',signif(err[2],2),'%')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.