hi community, need some help with this problem and how to solve it, create a new variable lettergrade that reports an a if the GPA is 3.5 or higher, a B is the GPA is greater than equal to 2.5 but less than 3.5, a C iuf GPA us greater than or equal to 1.5 but less than 2.5, a D if it is greater than or equal 0.5 but less than 1.5 and an F if the GPA is below 0.5. how can i code this as i have tried several options here data exam.studentsnew; set exam.students /* working from here on finish the variable list from studentsnew*/ keep AveGPA ID sex $ GPA if GPA > 3.5 then Lettergrade="A"; *else if GPA>=2.5 and GPA<3.5 then Lettergrade="B"; *else if GPA>=1.5 and if GPA<2.5 then Lettergrade="C"; *else if GPA>=0.5 and if GPA<1.5 then Lettergrade="D"; *else Lettergrade = "F"; run; this does not work and i am stuck. please help.
... View more