Hello,
I am running a proc reg, with options: outest = data_set tableout
I am having a weird problem.
In my data-table "Data_set"
I have a column "_TYPE_", and it has repeated values for each regression model I run.
I only want to keep the coefficient estimates and t-stats in my table, but whenever I try:
DATA clean_data; SET data_set; if _TYPE_ = PARMS; if _TYPE_ = T; RUN;
I am getting an error:
NOTE: Variable PARMS is uninitialized
Which doesn't make any sense to me, given that PARMS isn't a variable, it's a value that
_TYPE_ takes on.
Why does sas think i'm referring to a variable here?
I only want to retain the values in my table that have a row corresponding to PARMS (parameter estimates) and T (t-statistic from my regression), for the variable _TYPE_.
Any ideas?
Then you need to use the quotes as below with in operator
DATA clean_data;
SET data_set;
if _TYPE_ in ('T' 'PARMS' );
RUN;
Then you need to use the quotes as below with in operator
DATA clean_data;
SET data_set;
if _TYPE_ in ('T' 'PARMS' );
RUN;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.