Hi Brandy, my name is Ravi. First of all I would like to thank you very much for posting the SAS videos. They are very educational and helpful Brandy. Even though, I am new to SAS but feeling ease when I see your videos and practice them. I have couple of questions in this video Brandy, when you used proc print for one of the options, where you used gender=1 using where statement, the output is showing with obs which are not in the numerical order then what option we have to use in case if we want to print for only those obs in numerical order. My second question is when you are choosing noobs option, you did not put the option in parenthesis, I have this confusion since I started learning SAS, when to use PARANTHESIS and not to. I will be very thankful if you help me in learning SAS more easily and logically. Thanks, Ravi
@brandyparker1710
9 жыл бұрын
Thank you for the kind words, Ravi! Regarding your question about the numeric order with filtering: I misspoke in the video when I talked about using a filtering option with proc print. When I used gender=1, the output is actually showing the observations in numeric order, based on how the data are currently sorted in your dataset. What I should have said was that though the observations are in order, you'll notice that some are skipped, because they do not have gender = 1. The order is 2, 3, 4, 8, 11... which is in numeric order, but those that are skipped had gender = 0. If you want your data to be displayed in a particular order based on an ID or other variable, you will need to sort it before you use proc print. (I haven't made a video on that, but I hope to soon.) Regarding your question about the use of parentheses with options: I also have some confusion about when options should go in parentheses and when they aren't needed. It seems like options that require and "=" are usually in parentheses, but that's not always the case; I tend to look them up when I'm not sure. I haven't yet found a clear rule, but if I do, I will make a video for it.
Пікірлер: 2