10-02-2011 02:52 PM
save i have the following data:
as you can see, column y is not complete. BUT, all rows in column y should take the same value:
First, I want to know how I can do that on SAS.
Next, I need want to keep observations such that x>=y. How can I do that?
10-02-2011 05:29 PM
Just a couple of shortcuts. The rename statement changes the name of variable y, when the file is set, so that it will be seen to be variable _y; I did it that way so that the later missing values of y wouldn't override the desired value from the first record.
The drop statement, then, just uses the semicolon as a wild card. It says, in essence, to drop any variable that starts with an underscore (i.e., variable _y).
The semi colon has lots of under used useage in SAS as stated, nicely, in:
Need further help from the community? Please ask a new question.