File: RFhurst.Rd

package info (click to toggle)
r-cran-randomfields 3.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,916 kB
  • sloc: cpp: 52,159; ansic: 3,015; makefile: 2; sh: 1
file content (179 lines) | stat: -rw-r--r-- 6,308 bytes parent folder | download | duplicates (2)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
\name{RFhurst}
\alias{RFhurst}
%\alias{Hurst}
%\alias{long memory dependence}
\title{Hurst coefficient}
\description{
The function estimates the Hurst coefficient of a process
}
\usage{
RFhurst(x, y = NULL, z = NULL, data, sort = TRUE,
 block.sequ = unique(round(exp(seq(log(min(3000, dimen[1]/5)),
 log(dimen[1]),
 len = min(100, dimen[1]))))),
 fft.m = c(1, min(1000, (fft.len - 1)/10)),
 fft.max.length = Inf, method = c("dfa", "fft", "var"),
 mode = if (interactive ()) c("plot", "interactive") else "nographics", %ok
 pch = 16, cex = 0.2, cex.main = 0.85,
 printlevel = RFoptions()$basic$printlevel, height = 3.5,
 ...)
}
\arguments{
 \item{x}{\argX}
 \item{y,z}{\argYz}
 \item{data}{the data}
% \item{grid}{logical; determines whether the vectors \code{x},
% \code{y}, and \code{z} should be
% interpreted as a grid definition, see Details. \code{grid}
% does not apply for \code{T}.}
 \item{sort}{logical. If \code{TRUE} then the coordinates are permuted
 such that the largest grid length is in \code{x}-direction; this is
 of interest for algorithms that slice higher dimensional fields
 into one-dimensional sections.
 }
 \item{block.sequ}{ascending sequences of block lengths for which the
 detrended fluctuation analysis and the variance method are
 performed.}
 \item{fft.m}{vector of 2 integers; lower and upper endpoint of
 indices for the frequency which are used in the calculation of the
 regression line for the periodogram near the origin.}
 \item{fft.max.length}{if the number of points in \code{x}-direction is
 larger than \code{fft.max.length} then the segments of length
 \code{fft.max.length} are considered, shifted by
 \code{fft.max.length/2} (WOSA-estimator).}
 \item{method}{list of implemented methods to calculate the Hurst parameter; see Details}
 \item{mode}{character. A vector with components
 \code{'nographics'}, \code{'plot'} or \code{'interactive'}: %; see the Details.
 \describe{
 \item{\code{'nographics'}}{no graphical output}
 \item{\code{'plot'}}{the regression line is plotted}
 \item{\code{'interactive'}}{the regression domain can be chosen
 interactively}
 }
 Usually only one mode is given. Two modes may make sense
 in the combination c("plot", "interactive") in which case all the
 results are plotted first, and then the interactive mode is called. 
 In the interactive mode, the regression domain is chosen by
 two mouse clicks with the left
 mouse; a right mouse click leaves the plot.
 }
 \item{pch}{vector or scalar; sign by which data are plotted.}
 \item{cex}{vector or scalar; size of \code{pch}.}
 \item{cex.main}{font size for title in regression plot;
 only used if mode includes \code{'plot'}
 or \code{'interactive'}}
 \item{printlevel}{integer. If \code{printlevel} is 0 or 1
 nothing is printed. 
 If \code{printlevel=2} warnings and the regression results
 are given. If \code{printlevel>2} tracing information is given.
 }
 \item{height}{height of the graphics window}
 \item{...}{graphical arguments}
}
\details{
 The function is still in development. Several functionalities do
 not exist - see the code itself for the current stage.

 The function calculates the Hurst coefficient by various methods:
 \itemize{
 \item detrended fluctuation analysis (dfa)
 \item aggregated variation (var)
 \item periodogram or WOSA estimator (fft)
 }
}
\value{
 The function returns a list with elements
 \code{dfa}, \code{varmeth}, \code{fft} corresponding to
 the three methods given in the Details.
 
 Each of the elements is itself a list that contains the
 following elements.
 
 \item{x}{the x-coordinates used for the regression fit}
 
 \item{y}{the y-coordinates used for the regression fit}
 
 \item{regr}{the coefficients of the \command{\link[stats]{lm}}.}
 
 \item{sm}{smoothed curve through the (x,y) points}
 
 \item{x.u}{\code{NULL} or the restricted x-coordinates given
 by the user in the interactive plot}

 \item{y.u}{\code{NULL} or y-coordinates according to \code{x.u}}

 \item{regr.u}{\code{NULL} or the coefficients of 
 \command{\link[stats]{lm}} for \code{x.u} and \code{y.u}}

 \item{H}{the Hurst coefficient}

 \item{H.u}{\code{NULL} or the Hurst coefficient corresponding to the
 user's regression line}
}
\references{
% Overviews:
% \itemize{
% \item 
% }

 detrended fluctuation analysis
 \itemize{
 \item Peng, C.K., Buldyrev, S.V., Havlin, S., Simons, M., Stanley,
 H.E. and Goldberger, A.L. (1994)
 Mosaic organization of DNA nucleotides
 \emph{Phys. Rev. E} \bold{49}, 1685-1689
 }

 aggregated variation
 \itemize{
 \item Taqqu, M.S. and Teverovsky, V. (1998)
 On estimating the intensity of long range dependence in finite and
 infinite variance time series. In: Adler, R.J., Feldman, R.E., and
 Taqqu, M.S. \emph{A Practical Guide to Heavy Tails, Statistical
 Techniques an Applications.} Boston: Birkhaeuser

 \item
 Taqqu, M.S. and Teverovsky, V. and Willinger, W. (1995)
 Estimators for long-range dependence: an empirical study.
 \emph{Fractals} \bold{3}, 785-798
 }

 periodogram
 \itemize{
 \item Percival, D.B. and Walden, A.T. (1993)
 \emph{Spectral Analysis for Physical Applications: Multitaper and
 Conventional Univariate Techniques}, Cambridge: Cambridge
 University Press.
 
 \item Welch, P.D. (1967) The use of {F}ast {F}ourier {T}ransform for
 the estimation of power spectra: a method based on time averaging
 over short, modified periodograms \emph{IEEE Trans. Audio
	Electroacoustics} \bold{15}, 70-73. 
 }
}
\me
\seealso{
 \command{\link{RMmodel}}, \command{\link{RFfractaldim}}
}

\keyword{ spatial }%-- one or more ...


\examples{\dontshow{StartExample(reduced=50)}
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

\dontshow{.randomfields.options = options()$warn; options(warn=0)}
x <- runif(1000)
h <- RFhurst(1:length(x), data=x)
\dontshow{options(warn = .randomfields.options)}

\dontshow{FinalizeExample()}}





% LocalWords: hurst gridtriple sequ exp len fft Inf dfa var pch cex WOSA regr
% LocalWords: printlevel RFoptions periodogram nographics itemize varmeth
% LocalWords: lm sm Schlather url ealso RMmodel