rolling_test | R Documentation |
A generic function for applying a function to rolling margins of an array.
roll_normchisq(
obs,
prd,
unc = NULL,
width = NULL,
by.column = FALSE,
partial = TRUE,
fill = NA,
...
)
roll_rayleigh(
obs,
prd,
unc = NULL,
width = NULL,
by.column = FALSE,
partial = TRUE,
fill = NA,
...
)
roll_dispersion(
x,
y,
w = NULL,
w.y = NULL,
width = NULL,
by.column = FALSE,
partial = TRUE,
fill = NA,
...
)
roll_confidence(
x,
conf.level = 0.95,
w = NULL,
axial = TRUE,
width = NULL,
by.column = FALSE,
partial = TRUE,
fill = NA,
...
)
roll_dispersion_CI(
x,
y,
w = NULL,
w.y = NULL,
R,
conf.level = 0.95,
width = NULL,
by.column = FALSE,
partial = TRUE,
fill = NA,
...
)
roll_dispersion_sde(
x,
y,
w = NULL,
w.y = NULL,
R,
conf.level = 0.95,
width = NULL,
by.column = FALSE,
partial = TRUE,
fill = NA,
...
)
obs |
Numeric vector containing the observed azimuth of
|
prd |
Numeric vector containing the modeled azimuths of
|
unc |
Uncertainty of observed |
width |
integer specifying the window width (in numbers of observations)
which is aligned to the original sample according to the |
by.column |
logical. If |
partial |
logical or numeric. If |
fill |
a three-component vector or list (recycled otherwise) providing
filling values at the left/within/to the right of the data range. See the
fill argument of |
... |
optional arguments passed to |
x , y |
numeric. Directions in degrees |
w , w.y |
(optional) Weights of |
conf.level |
Level of confidence: |
axial |
logical. Whether the data are axial, i.e. pi-periodical
( |
R |
The number of bootstrap replicates. |
numeric vector with the test statistic of the rolling test.
roll_dispersion_CI
returns a 2-column matrix with the lower and the upper
confidence limits
If the rolling functions are applied to values that are a function of distance it is recommended to sort the values first.
data("plates")
plate_boundary <- subset(plates, plates$pair == "na-pa")
data("san_andreas")
PoR <- subset(nuvel1, nuvel1$plate.rot == "na")
distance <- distance_from_pb(
x = san_andreas,
PoR = PoR,
pb = plate_boundary,
tangential = TRUE
)
dat <- san_andreas[order(distance), ]
dat.PoR <- PoR_shmax(san_andreas, PoR, "right")
roll_normchisq(dat.PoR$azi.PoR, 135, dat$unc)
roll_rayleigh(dat.PoR$azi.PoR, prd = 135, unc = dat$unc)
roll_dispersion(dat.PoR$azi.PoR, y = 135, w = 1 / dat$unc)
roll_confidence(dat.PoR$azi.PoR, w = 1 / dat$unc)
roll_dispersion_CI(dat.PoR$azi.PoR, y = 135, w = 1 / dat$unc, R = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.