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.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.