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

Hi! I'm doing a proc autoreg statement and I want to access the T-Value of my first variable. I'm performing the Regression on every month in the dataset (hpid is the id of the first month). Using the outest statement I can get my variable log_hv_iv_diff for every month into one dataset, but I cant figure out how to access the associated T-Value. It would be the best if I could write teh T-Value into the same dataset. Can anyone help? Thanks!

Screenshot (26).png

Code:

proc sort data=vola_deciles out=pre_processed_data;
by hpid cp_flag;
run;

proc autoreg data=pre_processed_data plots=none outest=results_reg NOPRINT;
model &return=log_hv_iv_diff / covest=neweywest;
by hpid cp_flag;
run;

proc delete data=pre_processed_data;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
ods trace on;
proc autoreg data=pre_processed_data plots=none outest=results_reg NOPRINT;
model &return=log_hv_iv_diff / covest=neweywest;
by hpid cp_flag;
run;
ods trace off;

This will write to your LOG the actual name of the output you want. (If I could read German, I could probably figure it out from the SAS documentation).

 

Once you have that actual name, you can then do the following

 

proc autoreg data=pre_processed_data plots=none outest=results_reg NOPRINT;
ods output actualname = somedatasetname;
model &return=log_hv_iv_diff / covest=neweywest;
by hpid cp_flag;
run;
--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26
ods trace on;
proc autoreg data=pre_processed_data plots=none outest=results_reg NOPRINT;
model &return=log_hv_iv_diff / covest=neweywest;
by hpid cp_flag;
run;
ods trace off;

This will write to your LOG the actual name of the output you want. (If I could read German, I could probably figure it out from the SAS documentation).

 

Once you have that actual name, you can then do the following

 

proc autoreg data=pre_processed_data plots=none outest=results_reg NOPRINT;
ods output actualname = somedatasetname;
model &return=log_hv_iv_diff / covest=neweywest;
by hpid cp_flag;
run;
--
Paige Miller
russell23
Calcite | Level 5

Thanks to PaigeMiller and Rick_SAS! Both of your answers really helped and it didn't take me long to finish the task!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1033 views
  • 2 likes
  • 3 in conversation