Sentry Page Protection
Summary
1. Sorting data sets is one of the most common data manipulation tasks in SAS. It can be done by using Proc Sort.
2. Options for Proc Sort:
3. You can identify extreme values using a special technique that involves Proc Sort, Data Step and, the BY statement.
4. There are two ways to combine data sets in SAS:
5. Use the SET statement to concatenate data set and MERGE statement to merge data sets.
6. When concatenating data sets, make sure matching variables have consistent name and length.
7. When merging data sets, make sure the input data sets are properly sorted prior to merging.
8. The unmatched observations can be identified by using the (IN=) option.
9. In general, Proc Transpose include the following options/statements:
10. When transposing a data set, make sure each ID groups has only 1 observation.
11. Reverse transposing a data set can be done by Proc Transpose without the ID statement.
12. The _n_ and _error_ variables are two automatic variables created in the data step. The _n_ variable identifies the observation number and the _error_ flags the observation with error.
13. The Retain statement retains the value from one observation to the next.
14. Combining the use of the Retain statement and the Sum function allows you to compute summation across observations.
15. There are 3 ways to assign initial values in the Retain statement:
16. The (+) expression presents a short cut in the calculation of cumulative summation.
1. Sorting data sets is one of the most common data manipulation tasks in SAS. It can be done by using Proc Sort.
2. Options for Proc Sort:
- DESCENDING option
To sort the data set in descending order. - OUT option
To create an output data set. - WHERE statement
To subset the output data set. - NODUPKEY option
To remove duplicate observations
3. You can identify extreme values using a special technique that involves Proc Sort, Data Step and, the BY statement.
4. There are two ways to combine data sets in SAS:
- Data set concatenation
- Data set merging
5. Use the SET statement to concatenate data set and MERGE statement to merge data sets.
6. When concatenating data sets, make sure matching variables have consistent name and length.
7. When merging data sets, make sure the input data sets are properly sorted prior to merging.
8. The unmatched observations can be identified by using the (IN=) option.
9. In general, Proc Transpose include the following options/statements:
- OUT option
- ID statement
- VAR statement
- BY statement (optional)
10. When transposing a data set, make sure each ID groups has only 1 observation.
11. Reverse transposing a data set can be done by Proc Transpose without the ID statement.
12. The _n_ and _error_ variables are two automatic variables created in the data step. The _n_ variable identifies the observation number and the _error_ flags the observation with error.
13. The Retain statement retains the value from one observation to the next.
14. Combining the use of the Retain statement and the Sum function allows you to compute summation across observations.
15. There are 3 ways to assign initial values in the Retain statement:
- Retain Var1 0
- Retain Var1 .
- Retain Var
16. The (+) expression presents a short cut in the calculation of cumulative summation.