zyp.sen: zyp.sen

Description Usage Arguments Details Value See Also Examples

Description

Computes a Thiel-Sen estimate of slope for a vector of data.

Usage

1
zyp.sen(formula, dataframe)

Arguments

formula

a formula of the form y~x.

dataframe

an optional data frame to use with the formula.

Details

This routine computes Sen's estimate of slope for a vector of data.

The formula specified is of the form y~x, where y is the data and x is the accompanying dates of observation.

If a data frame is specified, the formula selects columns within that data frame; otherwise, the formula uses the specified variables.

Value

A vector containing the coefficients and associated data.

coefficients

the estimated intercept and slope.

slopes

the list of slopes (used for confidence intervals).

intercepts

the list of intercepts (used for confidence intervals.

rank

the rank of the relation (2).

residuals

the residuals of the fitted slope.

x

the original x axis data.

y

the original y axis data.

See Also

zyp.trend.vector, zyp-package, confint.zyp.

Examples

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


Search within the zyp package
Search all R packages, documentation and source code

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

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

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