BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pinkyloop
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
pinkyloop
Obsidian | Level 7

I used this


proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;

and it worked.

 

Thank you 

View solution in original post

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

You seem to point to the wrong table for the proc univariate.

Shouldn't you use Adjgpa?

 

pinkyloop
Obsidian | Level 7
Like this?

proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;
pinkyloop
Obsidian | Level 7

I used this


proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;

and it worked.

 

Thank you 

Amir
PROC Star

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.

pinkyloop
Obsidian | Level 7
Thanks

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2841 views
  • 2 likes
  • 3 in conversation