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!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 402 views
  • 2 likes
  • 3 in conversation