Learn R Programming

zyp (version 0.11-1)

confint.zyp: confint.zyp

Description

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

Usage

# S3 method for zyp
confint(object, parm, level = 0.95, ...)

Value

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

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)

See Also

zyp.trend.vector, zyp-package.

Examples

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

Run the code above in your browser using DataLab