--- tags: ECON30025, solutions, SAS --- In-Tutorial Extensions (T1-4, W2-5) =============== > [Link to all tutorials](/aAU_CJOdSq2wQtIm9MdyWA) ### T1: Intro to SAS 1. What is a SAS library? How do we define a library? 2. Whats the difference between Explorer and Contents Only views? 3. How do we subset our datasets? - [SUBSETTING DATA IN SAS | SAS LEARNING MODULES](https://stats.idre.ucla.edu/sas/modules/ubsetting-data-in-sas/) 4. How can we use `PROC PRINT` to inspect parts of our datasets? > [color=#ff0000] see [OBS= Data Set Option](http://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/viewer.htm#p0h5nwbig8mobbn1u0dwtdo0c0a0.htm) ```SAS PROC PRINT (obs=10 , firstobs=20); where VARIABLE lt 30; run; ``` ### T2: Data Visualisations 1. How does SAS handle misspellings? * [See SAS: AUTOCORRECT System Option](https://documentation.sas.com/?docsetId=lesysoptsref&docsetTarget=p0mzulmnthqs2bn1cuqm5eqlvgi8.htm&docsetVersion=3.1&locale=en) 2. What does the `NOPRINT` option do? how do we remove it from `HISTOGRAM / normal()`? how to we add it to `PROC KDE`? * [See PROC UNIVARIATE > HISTOGRAM Statement](http://support.sas.com/documentation/cdl/en/procstat/66703/HTML/default/viewer.htm#procstat_univariate_syntax09.htm) * [See PROC KDE > UNIVAR statement](https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_kde_sect003.htm) 3. What does `NGRID` in `PROC KDE` control? How does this relate to the lecture notes on KDE? ### T3: PROC SQL 1. Rewrite Q2, 4, 7c in only `PROC SQL` or Base SAS `DATA/PROC` steps 2. What do the following statements do? - `count(*)` - `outobs=10` - `format=comma12.2` 3. What's the difference between`run;` and `quit;`? 4. Other Resources via Google: * [SQL joins](http://www.sql-join.com/sql-join-types) * [SQL style guide](https://www.sqlstyle.guide) ### T4: Linear Algebra 1. Try to generate 3x3 matrix using rule $a_{ij} = i - j$ 2. `PROC IML` vs `PROC REG`: Why might we use one over another?