NNS.meboot: NNS meboot

Description Usage Arguments Value References Examples

View source: R/NNS_meboot.R

Description

Adapted maximum entropy bootstrap routine from meboot https://cran.r-project.org/package=meboot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
NNS.meboot(
  x,
  reps = 999,
  rho = NULL,
  type = "spearman",
  drift = TRUE,
  trim = 0.1,
  xmin = NULL,
  xmax = NULL,
  reachbnd = TRUE,
  expand.sd = TRUE,
  force.clt = TRUE,
  scl.adjustment = FALSE,
  sym = FALSE,
  elaps = FALSE,
  colsubj,
  coldata,
  coltimes,
  ...
)

Arguments

x

vector of data.

reps

numeric; number of replicates to generate.

rho

numeric [0,1]; The default setting rho = NULL assumes that the user does not want to generate replicates that are perfectly dependent on original time series, rho=1 recovers the original meboot(...) settings. rho < 1 admits less perfect (more realistic for some purposes) dependence.

type

options("spearman", "pearson", "NNScor", "NNSdep"); type = "spearman"(default) dependence metric desired.

drift

logical; TRUE default preserves the drift of the original series.

trim

numeric [0,1]; The mean trimming proportion, defaults to trim=0.1.

xmin

numeric; the lower limit for the left tail.

xmax

numeric; the upper limit for the right tail.

reachbnd

logical; If TRUE potentially reached bounds (xmin = smallest value - trimmed mean and xmax = largest value + trimmed mean) are given when the random draw happens to be equal to 0 and 1, respectively.

expand.sd

logical; If TRUE the standard deviation in the ensemble is expanded. See expand.sd in meboot::meboot.

force.clt

logical; If TRUE the ensemble is forced to satisfy the central limit theorem. See force.clt in meboot::meboot.

scl.adjustment

logical; If TRUE scale adjustment is performed to ensure that the population variance of the transformed series equals the variance of the data.

sym

logical; If TRUE an adjustment is peformed to ensure that the ME density is symmetric.

elaps

logical; If TRUE elapsed time during computations is displayed.

colsubj

numeric; the column in x that contains the individual index. It is ignored if the input data x is not a pdata.frame object.

coldata

numeric; the column in x that contains the data of the variable to create the ensemble. It is ignored if the input data x is not a pdata.frame object.

coltimes

numeric; an optional argument indicating the column that contains the times at which the observations for each individual are observed. It is ignored if the input data x is not a pdata.frame object.

...

possible argument fiv to be passed to expand.sd.

Value

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# To generate an orthogonal rank correlated time-series to AirPassengers
boots <- NNS.meboot(AirPassengers, reps=100, rho = 0, xmin = 0)

# Verify correlation of replicates ensemble to original
cor(boots$ensemble, AirPassengers, method = "spearman")

# Plot all replicates
matplot(boots$replicates, type = 'l')

# Plot ensemble
lines(boots$ensemble, lwd = 3)

## End(Not run)

NNS documentation built on June 26, 2021, 1:07 a.m.