BookmarkSubscribeRSS Feed
Benn
Calcite | Level 5

Hi Guys,

I am currently trying to compute the Newey West T-stats and Standard Errors for my regressions.

The following code is what I found on the net:

PROC MODEL DATA=A;

PARMS B0 B1 B2;

Y=B0+ B1*X1 + B2*X2;

FIT Y / GMM KERNEL = (BART,1,0);

INSTRUMENTS X1 X2;

TEST X1 X2;

RUN;

There are a couple of things I hope you guys can help with clarifying:

1) Fourth Line of the code (BART,1,0); can I change the numbers "1" and "0" to some other numbers? And if I can, what does it do?

2) Can this code be written such that it regresses within defined parameters; this is something that I have been doing with the regular regression code:

PROC REG

DATA=FF_VW_GROSS OUTEST=VW_ALPHA NOPRINT;

BY R_RET;

MODEL RET_RF=VWRETD_RF SMB HML UMD;

RUN;

So the by statement confines the regression to the Variable R_RET.  I am wondering if the PROC MODEL command can do something similar?

Thanks a lot guys! Any help is greatly appreciated!

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:
  My suggestions would be:
1) That you post this question in the Statistical Procedures forum (https://communities.sas.com/community/support-communities/sas_statistical_procedures) where more folks might work with PROC MODEL and
2) That you check out the PROC MODEL documentation, where there seems to be quite a section on the KERNEL= option and the estimation "math" behind the values you specify. Relevant links are:
 
http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_model_sect019....
where it starts the doc:
KERNEL=PARZEN | BART | QS
specifies the kernel to be used for GMM and ITGMM. PARZEN selects the Parzen kernel, BART selects the Bartlett kernel, and QS selects the quadratic spectral kernel. and are used to compute the bandwidth parameter. The default is KERNEL=(PARZEN, 1, 0.2). See the section Estimation Methods (http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_model_sect036....) for more details.)

The "math" is in the Estimation section of the doc and that is where it verifies that BART corresponds to the Newey-West: "The "Newey-West" kernel (Newey and West 1987) corresponds to the Bartlett kernel with bandwidth parameter." It seems to me that in order to understand what changing the numbers will do, you have to understand the estimation formula.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 5189 views
  • 3 likes
  • 2 in conversation