I am running regressions in a Macro, and after each regression, the estimates are appended to a dataset (COEFF). So, the length of the first variable (name of the parameter) is set after the first regression. This gives an issue where if parameters' names of later regressions are longer, they will be cut down, giving this WARNING message :
Variable Parameter has different lengths on BASE and DATA files (BASE 13 DATA 18).
I use the following code to append datasets after each regression:
PROC datasets nolist; append base=coeff data=temp force; RUN;
where coeff does not exist before running any regression, temp is the parameter estimates of the current regression
In the regression use the NAMELEN option on the PROC statement to set the length so that its not truncated. You can also examine the PARMLABEL option to see the formatted label.
And you cannot change the length via PROC DATASETS
You cannot change the length of a variable using the LENGTH statement or the LENGTH= option in an ATTRIB statement.
In the regression use the NAMELEN option on the PROC statement to set the length so that its not truncated. You can also examine the PARMLABEL option to see the formatted label.
And you cannot change the length via PROC DATASETS
You cannot change the length of a variable using the LENGTH statement or the LENGTH= option in an ATTRIB statement.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.