I am trying to summarise a data and was wondering if both "First Last" statement and Proc Summary would give the same result.
Is there any preference to either in certain special circumstances?
Thanks.
Akshay
It MIGHT give the same result depending on how you code each.
The first/last process is usually when you need to do something special involving the variable(s) involved. Such as select a record, reset a counter, calculate a number of things that may not involve other values of the by variables, or possible create additional records.
If there are many values that need to be kept with those records Summary may not be a good choice as it wants everything on either a Class, Var or ID statements and one or more of those may not be appropriate to get keep those other variables.
Summary and Means are designed to provide summaries not individual records.
Can it make a difference what procedure we use if there are blanks (dots) in the number field?
At this point examples of data and desired output might be needed if you are trying to solve a specific problem. Proc summary or means will not include any value in a summary statistic for missing except the NMISS. With first. and last. processing you could conditionally do something with a missing value.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.