interALL: Function to use multiple estimators simultaneously

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/interALL.R

Description

To give a first insight of the default time series, this function combines multiple estimator functions and visualize the results.

Usage

1
2
interALL(d1,n1,d2,n2,rho1,rho2, B=NA, DB=NA, JC=FALSE, CI_Boot=NA, plot=FALSE, 
type="bca",Estimator=c("Copula","Cov","JDP","MLE"),show_progress=FALSE)

Arguments

d1

a vector, containing the default time series of sector 1.

n1

a vector, containing the number of obligors at the beginning of the period in sector 1.

d2

a vector, containing the default time series of sector 2.

n2

a vector, containing the number of obligors at the beginning of the period in sector 2.

rho1

estimated intra correlation of sector 1.

rho2

estimated intra correlation of sector 2.

B

an integer, indicating how many bootstrap repetitions should be used for the single bootstrap corrected estimate.

DB

a combined vector, indicating how many bootstrap repetitions should be used for the inner (first entry) and outer loop (second entry) to correct the bias using the double bootstrap.

JC

a logical variable, indicating if the jackknife corrected estimate should be calculated.

CI_Boot

a number, indicating the desired confidence interval if the single bootstrap correction is specified. By default, the interval is calculated as the bootstrap corrected and accelerated confidence interval (Bca). Furthermore, the analytical confidence intervals are provided, using the same value as CI_Boot.

plot

a logical variable, indicating whether a plot of the default time series and the estimates should be generated using the multiplot function of \insertCiteteetor2011r;textualAssetCorr.

type

a string, indicating the desired method to calculate the bootstrap confidence intervals. For more details see boot.ci. Studendized confidence intervals are not supported.

Estimator

a combined string, indicating which estimators should be used. All estimators are set as default.

show_progress

a logical variable, indicating whether a progress bar should be displayed.

Details

To give an first insight, the function provides an overview of the default time series and estimates using different estimators simultaneously. If DB is specified, the single bootstrap corrected estimate will be calculated by using the bootstrap values of the outer loop.

Value

The returned value is a data frame, containing the following columns:

Estimator

Name of the applied estimator

Estimate

Value of the calculated estimate

Type

String, which indicating corrected/non-corrected estimates

correction

Name of the correction method

B

Number of single bootstrap repetitions

DB

Number of the double bootstrap repetitions

CI_Boot

Selected two-sided bootstrap confidence interval

CI

A string, indicating if the corresponding value is the upper or lower bound

Author(s)

Kevin Jakob

References

\insertRef

chang2015doubleAssetCorr

\insertRef

de2002defaultAssetCorr

\insertRef

dullmann2004systematicAssetCorr

\insertRef

efron1994introductionAssetCorr

\insertRef

frei2017momentAssetCorr

\insertRef

gordy2000comparativeAssetCorr

\insertRef

gordy2010smallAssetCorr

\insertRef

kalkbrener2010validatingAssetCorr

\insertRef

lucas1995defaultAssetCorr

\insertRef

meyer2009estimationAssetCorr

\insertRef

teetor2011rAssetCorr

See Also

intraAMM, intraFMM, intraJDP2 intraMLE, intraJDP1, intraCMM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set.seed(111)
Psi=rmvnorm(20,sigma=matrix(c(1,0.5,0.5,1),2))
PDcond1=pnorm((qnorm(0.01)-sqrt(0.05)*Psi[,1])/sqrt(1-0.05))
PDcond2=pnorm((qnorm(0.01)-sqrt(0.2)*Psi[,2])/sqrt(1-0.2))

D1=rbinom(20,1000,PDcond1)
D2=rbinom(20,1000,PDcond2)

N1=N2=rep(1000,20)

DTS=cbind(D1,D2)
N=cbind(N1,N2)

rho1=intraMLE(D1,N1)$Original
rho2=intraMLE(D2,N2)$Original

#Point Estimates
interALL(D1,N1,D2,N2,rho1,rho2, plot=TRUE)

#Bootstrap corrected estimates of all available estimators:
InterCorr=interALL(D1,N1,D2,N2,rho1,rho2, B=500, CI_Boot=0.95 , plot=TRUE, show_progress=TRUE)


#Jackknife correction
InterCorr=interALL(D1,N1,D2,N2,rho1,rho2, JC=TRUE, plot=TRUE)

#Double Bootstrap correction with 10 repetitions in the inner loop and 50 in the outer loop
InterCorr=interALL(D1,N1,D2,N2,rho1,rho2, DB=c(10,50), plot=TRUE)

AssetCorr documentation built on May 5, 2021, 5:07 p.m.