BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
somebody
Lapis Lazuli | Level 10

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

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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.

http://documentation.sas.com/?docsetId=proc&docsetTarget=p16vqq5oedlmkin1373cqyalhpo6.htm&docsetVers...

View solution in original post

1 REPLY 1
Reeza
Super User

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.

http://documentation.sas.com/?docsetId=proc&docsetTarget=p16vqq5oedlmkin1373cqyalhpo6.htm&docsetVers...

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
  • 1 reply
  • 3756 views
  • 0 likes
  • 2 in conversation