Hello, I'm having trouble with making a new variable that will count the 'correct' answers in the first 17 questions on a survey. Whenever I use this code: Data HW4set;
If 1 = p1p then Correct=correct+1;
If 1 = p2p then Correct=correct+1;
Run; It just deletes all the data from the set. It turns the set from this: to this: Which I don't understand, it hasn't worked with various attempts, and it won't even make a variable that is constant such as: DATA HW4set;
Always6=6;
Run; It just erases the data set again, even though I got it straight from an example. There are no errors displayed either, it only says that p1p and p2p are uninitialized.
... View more