Hi all,
i need help with this.
i created a variable Adjgpa with is code
proc means data=merged mean;
var GPA;
run;
data Adjgpa;
set Merged;
adjgpa=(GPA-3.18);
run;
proc print data=Adjgpa (obs=10);
run;
proc contents data=adjgpa;
run;
then i tried to run this code
proc univariate data =merged noprint;
var adjgpa;
histogram ;
run;
and it gives me this error:Variable Adjgpa not found.
what am i doing wrong please
I used this
proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;
and it worked.
Thank you
You seem to point to the wrong table for the proc univariate.
Shouldn't you use Adjgpa?
I used this
proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;
and it worked.
Thank you
Hi @pinkyloop, nicely asked question, showing code and error message (not everyone does), followed by a quick response from @ChrisNZ.
To round it off, it would also be good to mark the response from @ChrisNZ as the solution, which highlights the question as solved for the benefit of others and gives @ChrisNZ further recognition.
Thanks & regards,
Amir.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.