Posts

Showing posts with the label SAS

Advanced (Intro) to SAS Macro Programming (Part 3)

Image
The First part and the Second part of this introduction talked about some basic things every beginner  needs to know when using SAS Macro Language. In this part we will talk about : Dynamically storing a value into a macro variable Iterative statements in macro language (Next part) Conditional statements in macro language  (Next part) 1-Dynamically storing a value into a macro variable /* Calculating an average value and storing it in a macro variable*/ Proc Means Data = SASHELP.heart noprint; Var height; Output out = test mean= avg_height; Run ;

Intro to SAS Macro Programming (Part 2)

Image
We've seen a first introduction,  in part 1 of introduction to SAS macro programming . In this part we will try to see how to write a complete macro statement and how to use multiple variables in a single macro statement. Adding parameters to a SAS macro statement: Syntaxe: % Macro_name (Value_1,……., Value_n ); Example 1: In the example bellow, we will add a single parameter to our SAS macro that calculates basic descriptive statistics using proc means: In this case, the parameter will be the table name: %Macro AVG (Table); Proc means data =&table; run; %mend ; And now we will see the result of our macro:   %AVG (SASHELP.Shoes); This is the output we get from the macro we've just created and executed :

Intro to SAS Macro Programming (Part 1)

Image
Trying different statistical languages and being confortable with them is a big advantage for today's statisticians and data scientists. This is why I wanted to do this series of posts that will include (besides R and Python) SAS, SAS Macro , Julia..etc What is SAS? I will try to be as unbiased as possible here. According to its Wikipedia page , SAS  is a software suite that can mine, alter, manage and retrieve data from a variety of sources and perform statistical analysis on it. SAS has a multitude of procedures specialized in statistical analysis, data manipulation and visualisation. SAS programming consists on writing the code composed by SAS Data Steps and SAS Procedures, and Executing it. The concepts of parameters and variables is included in the SAS Macros.

The hard thing about hard things: Teaching experience Feedback

Image
Today was the last day of my Statistical Analysis Software course I gave at the Higher School of Statistics and Data Analysis of Tunis. The only thing that's left is the final exam, so the work is not over...Yet! It is important to mention that teaching is a -very- hard thing to do, especially if you are a "caring" person and you do CARE about perfection and small details. I have tried to be as reachable as possible to all my students, especially at the beginning of the class, when they were new and haven't had any significant statistical of computing background. A Summary of the points I have given in the class this semester Making everybody happy and all the course material easy is not the goal here. The most important thing is to make sure that all the details are delivered to all students and that all the questions they ask about the course are answered.