Forecasting using SAS Forecast Server, SAS/ETS, and more

Simulating Error Distribution with Proc Copula

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

Simulating Error Distribution with Proc Copula

Rookie here, I am trying to replicate the study in the following paper:

 

http://support.sas.com/resources/papers/proceedings16/SAS6364-2016.pdf

 

The process I followed is:

 

-Run Proc Varmax to model BVAR on log-ratio of (RealGDP, CPI and Unemployment Rate). Save residuals in a separate dataset.

-Call Proc Copula to find he joint distribution from the marginal distribution of the residuals. 

-Once I get that, I use the simulated errors with the forecast means from Varmax to create macroeconomic scenarios.

 

I have the following issue. My residuals do not follow normal dist. I am not sure how to transform them. Proc Copula does not seem to work with the assumptions. Any idea how I can fix this? Your help is much appreciated

 

I am using the following code.

 

PROC COPULA DATA = error_dist;
	VAR Res_RGDP Res_UMP Res_CPI;
	FIT Normal  / 
		MARGINALS = uniform METHOD = MLE;
	SIMULATE / 
		NDRAWS = 1000   SEED = 1 
		MARGINALS = UNIFORM    
		OUTUNIFORM = simulated_errors;
RUN;

The Error_Dist has values like these:

Res_RGDP Res_UMP Res_CPI

0.0398668592 0.0262994594 0.010727359
-0.029316863 0.1554613968 0.0061404736
-0.050879246 0.0763711127 -0.00331784
0.0068502877 0.1468297946 0.0019326859
0.0650468136 -0.018832064 0.0044021124
-0.008798372 0.1423033571 0.0029771118

 


Accepted Solutions
Highlighted
Solution
Tuesday
SAS Super FREQ
Posts: 3,618

Re: Simulating Error Distribution with Proc Copula

I don't fully understand your example, but I question whether you want to be using MARGINALS=UNIFORM. Try using MARGINALS=EMPIRICAL as the option to the SIMULATE statement. That will use the empirical CDF as the basis for the simulation of the copula. 

View solution in original post


All Replies
Highlighted
Solution
Tuesday
SAS Super FREQ
Posts: 3,618

Re: Simulating Error Distribution with Proc Copula

I don't fully understand your example, but I question whether you want to be using MARGINALS=UNIFORM. Try using MARGINALS=EMPIRICAL as the option to the SIMULATE statement. That will use the empirical CDF as the basis for the simulation of the copula. 

Occasional Contributor
Posts: 16

Re: Simulating Error Distribution with Proc Copula

Thanks! That was the problem.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 230 views
  • 1 like
  • 2 in conversation