confint.zyp: confint.zyp

Description Usage Arguments Details Value See Also Examples

View source: R/zyp.R

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)


zyp documentation built on May 19, 2017, 8:03 p.m.
Search within the zyp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.