zyp.sen | R Documentation |
Computes a Thiel-Sen estimate of slope for a vector of data.
zyp.sen(formula, dataframe)
formula |
a formula of the form y~x. |
dataframe |
an optional data frame to use with the formula. |
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.
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. |
zyp.trend.vector
, zyp-package, confint.zyp.
x <- c(0, 1, 2, 4, 5)
y <- c(6, 4, 1, 8, 7)
slope <- zyp.sen(y~x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.