fd_mfdfa | R Documentation |
Multi-fractal Detrended Fluctuation Analysis
fd_mfdfa(
y,
fs = NULL,
removeTrend = c("no", "poly", "adaptive", "bridge")[2],
polyOrder = 1,
standardise = c("none", "mean.sd", "median.mad")[1],
adjustSumOrder = FALSE,
removeTrendSegment = c("no", "poly", "adaptive", "bridge")[2],
polyOrderSegment = 1,
scaleMin = 16,
scaleMax = stats::nextn(floor(NROW(y)/4), factors = 2),
scaleResolution = round(log2(scaleMax - scaleMin)),
dataMin = NA,
scaleS = NA,
overlap = NA,
qq = seq(-5, 5, length.out = 101),
doPlot = FALSE,
returnPlot = FALSE,
returnInfo = FALSE,
silent = FALSE
)
y |
A numeric vector or time series object. |
fs |
Sample rate |
removeTrend |
Method to use for global detrending (default = |
polyOrder |
Order of global polynomial trend to remove if |
standardise |
Standardise the series using |
adjustSumOrder |
Adjust the time series (summation or difference), based on the global scaling exponent, see e.g. Ihlen (2012) (default = |
removeTrendSegment |
Method to use for detrending in the bins (default = |
polyOrderSegment |
The DFA order, the order of polynomial trend to remove from the bin if |
scaleMin |
Minimum scale (in data points) to use for log-log regression (default = |
scaleMax |
Maximum scale (in data points) to use for log-log regression. This value will be ignored if |
scaleResolution |
The scales at which detrended fluctuation will be evaluated are calculated as: |
scaleS |
If not |
overlap |
A number in |
qq |
A vector containing a range of values for the order of fluctuation |
doPlot |
Output the log-log scale versus fluctuation plot with linear fit by calling function |
returnPlot |
Return ggplot2 object (default = |
returnInfo |
Return all the data used in SDA (default = |
silent |
Silent-ish mode (default = |
A dataframe with values of q
,H(q)
, t(q)
, h(q)
, 'D(q)“
Other Fluctuation Analyses:
fd_RR()
,
fd_allan()
,
fd_dfa()
,
fd_psd()
,
fd_sda()
,
fd_sev()
set.seed(33)
# White noise
fd_mfdfa(rnorm(4096), doPlot = TRUE)
# Pink noise
fd_mfdfa(noise_powerlaw(N=4096), doPlot = TRUE)
# 'multi' fractal
N <- 2048
y <- rowSums(data.frame(elascer(noise_powerlaw(N=N, alpha = -2)), elascer(noise_powerlaw(N=N, alpha = -.5))*c(rep(.2,512),rep(.5,512),rep(.7,512),rep(1,512))))
fd_mfdfa(y=y, doPlot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.