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!
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;
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;
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;
See the explanation and examples at "ODS OUTPUT: Store any statistic created by any SAS procedure."
Thanks to PaigeMiller and Rick_SAS! Both of your answers really helped and it didn't take me long to finish the task!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.