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 uninitializedWhich 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;
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.