File: smoothness.Rd

package info (click to toggle)
r-cran-datawizard 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,300 kB
  • sloc: sh: 13; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smoothness.R
\name{smoothness}
\alias{smoothness}
\title{Quantify the smoothness of a vector}
\usage{
smoothness(x, method = "cor", lag = 1, iterations = NULL, ...)
}
\arguments{
\item{x}{Numeric vector (similar to a time series).}

\item{method}{Can be \code{"diff"} (the standard deviation of the standardized
differences) or \code{"cor"} (default, lag-one autocorrelation).}

\item{lag}{An integer indicating which lag to use. If less than \code{1}, will be
interpreted as expressed in percentage of the length of the vector.}

\item{iterations}{The number of bootstrap replicates for computing standard
errors. If \code{NULL} (default), parametric standard errors are computed.}

\item{...}{Arguments passed to or from other methods.}
}
\value{
Value of smoothness.
}
\description{
Quantify the smoothness of a vector
}
\examples{
x <- (-10:10)^3 + rnorm(21, 0, 100)
plot(x)
smoothness(x, method = "cor")
smoothness(x, method = "diff")
}
\references{
https://stats.stackexchange.com/questions/24607/how-to-measure-smoothness-of-a-time-series-in-r
}