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

Hi everybody

How can I get the adj R squared within this code when I make a FMB Regression? I tried it with the option ods output FitStatistics = fitstats, but it did not work correctly. Thanks for the help.

ods listing close;

output parameterestimates=pe;

proc reg data=test;

by year;

model y= x; run;

quit;

ods listing;

proc means data=pe mean std t probt;

var estimate; class variable;

run;

proc sort data=pe; by variable; run;

%let lags=3;

ods output parameterestimates=nw;

ods listing close;

proc model data=pe;

by variable;

instruments / intonly;

estimate=a;

fit estimate / gmm kernel=(bart,%eval(&lags+1),0) vardef=n; run;

quit;

ods listing;

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Are you looking for the standard adj r from proc reg or proc model (which I know nothing about)? Or another type of calculation?

View solution in original post

4 REPLIES 4
SteveDenham
Jade | Level 19

I really don't have an answer, but I would bet that someone on the Forecasting and Econometrics forum would be able to help with the PROC MODEL part.  You should consider reposting this in that forum.

Steve Denham

AncaTilea
Pyrite | Level 9

Hi.

if you do a quick google search on your request you will see that there is some sort of code (that looks similar to yours) from Jie Cao:

http://ihome.cuhk.edu.hk/~b121456/tools/FF_reg.txt

Maybe it will help?

Anca

Reeza
Super User

Are you looking for the standard adj r from proc reg or proc model (which I know nothing about)? Or another type of calculation?

HHZ
Calcite | Level 5 HHZ
Calcite | Level 5

*add one option like the following will give you adjusted R-sq in the dataset "adjrsq" together with other default statistics;

*i use it by myself, and it works;


ods listing close;

output parameterestimates=pe  fitstatistics=adjrsq;

proc reg data=test;

by year;

model y= x; run;

quit;

ods listing;

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 4043 views
  • 6 likes
  • 5 in conversation