BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Proc Reg requires all variables on the MODEL statement to be numeric. You show variable REPARTO on the model statement and it is obviously not numeric.

The viewtable image of Ora_Analizi and  ID_paziente appearing left justified likely means that they are character variables. ID numbers are very poor candidate variables in Proc Reg models even if numeric as likely the only thing I would expect is newer ID values are larger than older for any given source sequence.

 

I am going to guess that you are running code against a data set generated using PROC IMPORT.

Proc Import has to guess what type a variable is. Just because you think it should be a number does not mean that the guessing rules involved will match. Things like blank rows or how the data was entered in the file can affect how import treats the values.

 

Run Proc contents on the input data set and examine the variable types for all of the variables you are having issues with. I suspect they will appear as CHAR. At which point you will have to back to the source of the data and regenerate it so that the variable types are as expected.

 

Often when we see this the data started in a spreadsheet and insufficient attention was paid when the data was brought into SAS that variable types were correct.

View solution in original post

4 REPLIES 4
jklaverstijn
Rhodochrosite | Level 12

Oh, where to start! This is just not the way to ask for help. Could you make an effort and describe what you have, what you're expecting and put that in the form of a question? And make it text instead of image so others can copy/paste and add suggestions?

 

And how does your picture relate to issues with a software depot as the title suggests?

 

Cheers,

- Jan.

michshoot
Fluorite | Level 6

hello everyone in the topic below I put images, my problem that does not read the variables variables as numerical variables are those in red in the log.
thank you

ballardw
Super User

Proc Reg requires all variables on the MODEL statement to be numeric. You show variable REPARTO on the model statement and it is obviously not numeric.

The viewtable image of Ora_Analizi and  ID_paziente appearing left justified likely means that they are character variables. ID numbers are very poor candidate variables in Proc Reg models even if numeric as likely the only thing I would expect is newer ID values are larger than older for any given source sequence.

 

I am going to guess that you are running code against a data set generated using PROC IMPORT.

Proc Import has to guess what type a variable is. Just because you think it should be a number does not mean that the guessing rules involved will match. Things like blank rows or how the data was entered in the file can affect how import treats the values.

 

Run Proc contents on the input data set and examine the variable types for all of the variables you are having issues with. I suspect they will appear as CHAR. At which point you will have to back to the source of the data and regenerate it so that the variable types are as expected.

 

Often when we see this the data started in a spreadsheet and insufficient attention was paid when the data was brought into SAS that variable types were correct.

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1373 views
  • 0 likes
  • 4 in conversation