My codes are:
DATA Ch2_14; INPUT ratio $ viscosity; CARDS; 1.0 0.45 0.9 0.20 0.8 0.34 0.7 0.58 0.6 0.70 0.5 0.57 0.4 0.55 0.3 0.44 ; RUN; proc Reg data = CH2_14; model ratio = viscosity; run;
ERROR: Variable ratio in list does not match type prescribed for this list.
How to fix my code?
Ratio is a character variable, as seen by the $ when you INPUT ratio. You can't perform a linear regression on character variables.
Remove the $ and try your code again.
View solution in original post
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Submit your idea!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.