BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
eemrun
Obsidian | Level 7

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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. 

eemrun
Obsidian | Level 7
Thanks! That was the problem.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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