Category: SAS

SAS Row Sum

SAS day 30: Row Sum In a statistical report, Total Columns and Total Rows are very useful to show the integrity of the data. This raises the question, how do we generate the Total Column or the Total Row? We know the SUM function (sum(., c1-cn)) or Proc SQL SUM are great ways to produce the Column Sum. Today we will…

Proc Lifetest 1- Kaplan Meier graph

SAS day 28: Proc Lifetest 1 What are the foundations for FDA or NDA to approve a new medication besides its safety concerns? Many of us would think about the efficacy of the drug. If we dig in the question a bit further, how do we evaluate the efficacy then?

SAS Proc Means

SAS Day 27: Proc Means We use Statistical summary to demonstrate the mean, median, max, min, Q1, Q3..  In SAS we can either use Proc Means or Proc Univariate to achieve the goals. Today we will introduce how to generate statistical summary using Proc Means. Basic Syntax: proc means data= dummy noprint; var age; /*Any continuous variable: age, weight, height*/…

SAS Column Output

SAS Day 26: Column Output Background: For table outputs, some times we want both the count and an overall percentage for each category rather than a simple number count. E.g. 75( 74): 75 count represents 74% of the total number in this group. In order to generate this output format, we need the variable count(c1,c2..) and group total (&n1, &n2..). 

SAS Macro Space

  SAS Day 25: Marco Space Trick Background: Last time, we did a little summary of the Space Function in SAS. Generally, it is enough, however, what if we want to manipulate the space inside a Macro? the general space function such as Trim, Compress, Compbl, Strip would NOT work sometime.   Problem:  We want to remove the extra empty…

SAS Space

SAS Day 24: Space Trick Background: My boss has a motto “Devil in the details“. I think all the Space- Related issues are the “Devil” in SAS. Today, we will go over the function and tricks I used to deal with Space. Remove Space: Compress, Compbl, Strip, Trim Concatenate with Remove Space: ||, CAT, CATS, CATX, CATT


SAS day 24:  Proc SQL Join   Review: Last time we went to over SAS Merge, it is a SAS Merge statement used for  1 – 1 mapping or One – Many mapping, What should we do for many to many mapping?

SAS Proc SQL Count

SAS Day 23: SQL Count   Background: In order to present the data to the audience in a nice way, we often generate tables, figures, and listings from the existing datasets.  There are many data processing steps, such as Merge, Transformation. Among them, One of the most commonly used technique is Summarize the Object Count using SQL.

SAS Merge

SAS Day 22: Merge    Background: Sometimes we need to obtain information from different datasets, how do we combine two or more datasets in SAS?  Most cases, we use the “Merge” statements, however,  depends on the data structures, we need to use SQL if it is many to many mapping. P.S. regardless of Merge or SQL, we need to have…

Social media & sharing icons powered by UltimatelySocial