Hi,
I am trying to build regression model but I am getting an error "Variable not found" whereas variable is present in the dataset?
This is the code I am writing
PROC REG data=Smoking;
MODEL Pressure = Smoker;
RUN;
QUIT;
Thanks,
Rashmi.
Hi,
Please share your log and a sample data. This will help community members to respond accordingly.
Hi,
This is the log:
Problem seems to be with smoker variable which is a character type. proc reg requires numeric predictors.
Please check the names and types of your variables in your dataset.Do not confuse the name and the label of variables. If SMOKER is character, you will need to switch to proc GLM and declare SMOKER in a CLASS statement.
Thank you.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.