Last data update: 2014.03.03
|
R: zyp.sen
zyp.sen
Description
Computes a Thiel-Sen estimate of slope for a vector of data.
Usage
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
x <- c(0, 1, 2, 4, 5)
y <- c(6, 4, 1, 8, 7)
slope <- zyp.sen(y~x)
Results
|