top of page
Search

Daily Entry #2- 6/9/2024

  • Writer: Varun Vuppaladadiyam
    Varun Vuppaladadiyam
  • Jun 9, 2024
  • 2 min read

Today, I've learned more SAS


On SAS, I've learned more about macros and how to create them. You set a string equal to the macro you're setting and you can continue to use them as you wish throughout the code. It's interesting as it's only a string, so you can't skip out on syntax. You can define the macro like this:


%let <variable_name/column_name> ="<string/specific column value>"


I also learned more about the proc freq command, and about the table function, as you can just type:

table <variable> <optional second variable that will create the second table>


which happens right after the initial proc freq command. I also learned about the where function, which is used to filter for specific values, not to be confused with the var step, which filters for specific variables. The where function is defined in these ways:


where <variable> like '<string>' (must be double quotes if using macro)

where <variable> = <numeric value>

where <variable> is missing (which just gives you missing values)


These are only small examples of what you can do as you can do more inequalities with numeric values and there are more options for filtering for missing/null values. I also learned more about proc sort. Proc sort (capitalized proc as I wanted this to look more grammatically correct but it really doesn't matter, right?) works like other proc procedures, but you can add nodupkey and dupout to show tables of duplicated values, and can also apply where functions here to ensure that the sorting function sorts in a way that is to your preference. You can also keep certain values by doing as such:


proc sort data=<file path>(keep= variables you want to keep) out=<tablename> nodupkey dupout <tablename>;

by descending <variables you want to sort by>


A fun fact is that SAS automatically does ascending values so you must specify descending to get descending values.

For SAS, I feel like I'm making good progress and have gotten to work on cleaning some datasets. I want to continue to do more learning from the website as well as continue slight project work here. Overall, a good day for learning SAS for me.


I didn't get enough time to look through Kaggle nor did I get much time to look through the statistical textbook. Tomorrow I'll have to work more on learning ML and I'll need to start and finish the statistical textbook's second chapter's problems. I'll read through the second and third chapter of the Bowles ML book, but will have to go back tomorrow to make sure that I understand the content on a level that I'm comfortable with.


 
 
 

Recent Posts

See All
Weekly Update 7/9-7/16

This week was unproductive as I was busy with my family. A lot of work on that front which didn't let me spend too much time on my goals....

 
 
 
Weekly Update from 7/2-7/9

Howdy! This week, I didn't do too much. I spent a lot of my time attending to personal matters and wasn't able to do as much as I wanted,...

 
 
 
Weekly Update from 6/25-7/1

This week, I got the following done. Learned more about development and about economies like Ethiopia and South Korea Something that's...

 
 
 

Comments


bottom of page