ADF(x, dtype = c("ADF", "CADF", "RPADF", "DeltaADF", "ACF"), lag.max = floor(10 * log10(length(x))), alpha = 0.05, num.clas, B = 99, bandwidth, delta = "Delta_1", fres = ".Perm", fdenest = ".denest", fdiv, argacf, R = 1:lag.max, p.adjust.method = p.adjust.methods, plot = TRUE, ...)
"print"(x, digits=3, ...)
"ADF"
object or a univariate numeric time series object or a numeric vector.
"ADF"
(default; see Bagnato, Punzo, Nicolis, 2012)
"CADF"
(see Bagnato, Punzo, Nicolis, 2012)
"RPADF"
(see Bagnato, De Capitani, Punzo, 2014)
"DeltaADF"
(see Bagnato, De Capitani, Punzo, 2013)
"ACF"
10*log10(n)
where n
is the length of the series .
dtype="ADF"
or "CADF"
or "RPADF"
, it sets the number of equifrequency classes for each of the two marginal distributions of the contingency table. If not specified, it is determined internally
using a rule of thumb described in Bagnato, Punzo, Nicolis (2012).
dtype="DeltaADF"
, it sets the number of permutations used. Default value is 99 (see Bagnato, De Capitani, Punzo, 2013a,b).
dtype="DeltaADF"
, it sets the bandwidth used for the Gaussian kernel density estimator. Default value is computed with likelihood cross-validation (see Bagnato, De Capitani, Punzo, 2013a,b).
dtype="DeltaADF"
, it specifies the type of divergence measure used (see Bagnato, De Capitani, Punzo, 2013b);
for each element in delta
a different plot is produced. Possible values are:
"Delta_1"
(default)
"Delta_0.5"
"Delta_2"
"Delta_3"
"Delta_4"
"Delta_SD"
"Delta_L1"
"Delta_ST"
"Delta_fdiv"
; in this case, the external function named fdiv
is used to compute divergence.
dtype="DeltaADF"
, the name of the external function(x,B)
specifying the resampling method from the raw series, where x
is a time series and B
the number of resamples; the function should return a matrix with B
rows and length(x)
columns. If not specified, permutations are randomly generated.
dtype="DeltaADF"
, the name of the external function(x,m,ngrid,bandwidth)
to use for univariate and bivariate density estimation, where x
is the time series, m
is the lag considered, ngrid
is the number of
points in the grid, and bandwidth
is the bandwidth; the function should return:
fi
, a matrix of dimension ngrid
x ngrid
containing conjoint density estimates for lag m
gi
, a matrix of dimension ngrid
x ngrid
containing conjoint density estimates in case of independence, for lag m
ngi
, is equal to ngrid
.
fdenest
is not specified, the Gaussian kernel density estimation is used (see Bagnato, De Capitani, Punzo, 2013a,b).
dtype="DeltaADF"
and delta="Delta_fdiv"
, the name of the external function(fi,gi,ngi)
to use to compute divergence; its arguments are defined as in fdenest
; the function should return a scalar.
TRUE
(default), the specified ADF is displayed.
dtype="ACF"
, it is a list with optional arguments for function acf()
.
1:lag.max
p.adjust.methods
.
plot.SDD
method, such as graphical parameters.
SDD
object which is a list with the following components:
dtype
, it may contain:
lag
, a numeric vector containing the lags at which the bars of the diagrams are computed
vbar
, height of the bars of the diagram
pvalue
, p-values associated to the bars of the diagram
pstar
, transformed p-values associated to the bars of the diagram. If dtype="DeltaADF"
transformed p-values are vbar
n
, vector of length lag.max
, containing the effective number of pairs considered for each lag
crit.val
, vector, of length lag.max, with the critical values
xmin
vector of length lag.max
, containing the non-centrality parameters for each bar of the RP-ADF
type="DeltaADF"
, the type divergence measure used.dtype
is one of: "ADF", "RPADF",
or "CADF"
.x
.
p.adjust.methods
.
Bagnato L, De Capitani L, Punzo A (2013a). Improving the autodependogram using the Kulback-Leibler divergence. arXiv:1306.5006 [stat.ME], URL: http://arxiv.org/pdf/1306.5006v1.pdf
Bagnato L, De Capitani L, Punzo A (2013b). Testing Serial Independence via Density-Based Measures of Divergence. Methodology and Computing in Applied Probability, 16(3), 627-641.
Bagnato L, De Capitani L, Punzo A (2014). Detecting Serial Dependencies with the Reproducibility Probability Autodependogram. Advances in Statistical Analysis, 98(1), 35-61.
Bagnato L, Punzo A (2010). On the Use of $\chi^2$ Test to Check Serial Independence. Statistica & Applicazioni, VIII(1), 57-74.
Bagnato L, Punzo A (2012). Checking Serial Independence of Residuals from a Nonlinear Model. In W Gaul, A Geyer-Shulz, L Schmidt-Thieme, J Kunze (eds.), Challenges at the Interface of Data Analysis, Computer Science, and Optimization, volume XIV of Studies in Classification, Data Analysis and Knowledge Organization, pp. 203-211. Springer-Verlag, Berlin Heidelberg.
Bagnato L, Punzo A, Nicolis O (2012). The autodependogram: a graphical device to investigate serial dependencies. Journal of Time Series Analysis, 33(2), 233-254.
Bagnato L, Punzo A (2013). Using the Autodependogram in Model Diagnostic Checking. In N Torelli, F Pesarin, A Bar-Hen (eds.), Advances in Theoretical and Applied Statistics, volume XIX of Studies in Theoretical and Applied Statistics, pp. 129-139. Springer-Verlag, Berlin Heidelberg.
SDD-package
, plot.SDD
, SMI
, acf
# Dependence Diagrams on raw data
data("SMI")
ADF(SMI^2, dtype="ACF", main="")
ADF(SMI, main="")
ADF(SMI, dtype="RPADF", main="")
# Dependence Diagrams on residuals from a fitted model
library("tseries")
residuals <- garch(SMI, order=c(1,1))$residuals[-1]
ADF(residuals^2, dtype="ACF", main="")
ADF(residuals, dtype="RPADF", main="")
Run the code above in your browser using DataLab