confint.zyp

Share:

Description

Computes a confidence interval on a result from zyp.sen.

Usage

1
2
## S3 method for class 'zyp'
confint(object, parm, level = 0.95, ...)

Arguments

object

an object of class zyp, returned by zyp.sen.

parm

unused; for compatibility with confint.

level

the confidence level to compute a confidence interval at.

...

additional unused arguments.

Details

This routine computes a confidence interval on the slope and intercept of the result returned by zyp.sen. The confidence interval on the slope is calculated using the method defined in (Sen, 1968).

The confidence interval on the intercept is computed by taking the standard deviation of the intercepts (sd.i), the z statistic for the given confidence level (z), and the mean (m). The confidence level is then:

c(m - z * sd.i, m + z * sd.i)

Value

A matrix containing the upper and lower bounds of the intersect and slope, respectively.

See Also

zyp.trend.vector, zyp-package.

Examples

1
2
3
4
x <- c(0, 1, 2, 4, 5)
y <- c(6, 4, 1, 8, 7)
slope <- zyp.sen(y~x)
ci <- confint.zyp(slope)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.