svinecop_pseudo_residuals {svines} | R Documentation |
Pseudo-residuals of S-vine copula models
Description
Pseudo-residuals are defined as the Rosenblatt transform of the data,
conditional on the past. Under a correctly specified model, they are
approximately iid uniform on [0, 1]^d
.
Usage
svinecop_pseudo_residuals(u, model, cores = 1)
Arguments
u |
the data; should have approximately uniform margins. |
model |
model inheriting from class svinecop_dist. |
cores |
number of cores to use; if larger than one, computations are
done in parallel on |
Value
Returns a multivariate time series of pseudo-residuals
Examples
# load data set
data(returns)
# convert to pseudo observations with empirical cdf for marginal distributions
u <- pseudo_obs(returns[1:100, 1:3])
# fit parametric S-vine copula model with Markov order 1
fit <- svinecop(u, p = 1, family_set = "parametric")
# compute pseudo-residuals
# (should be independent uniform across variables and time)
v <- svinecop_pseudo_residuals(u, fit)
pairs(cbind(v[-1, ], v[-nrow(v), ]))
[Package svines version 0.2.3 Index]