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.
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!
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.