Wednesday, 13 December 2017

SDTM Mapping Scenarios to Master

SDTM Mapping Scenarios to Master                  One of the most puzzling programming problems involves SDTM mapping: mapping datasets from a non-CDISC structure to CDISC SDTM structure.                   If CDISC standards haven’t been implemented from the beginning of the data collection process (an approach...
Read More »

Friday, 21 April 2017

Constructing Iterative Do Loops

To build an iterative DO loop, you need to begin with a DO command, then incorporate some action command, and then end with an END command. Here's what a simple iterative DO loop should look like: DO index-variable = start TO stop BY increment;         action statements; END; Here are brief explanation about each commands DO, index-variable, start,...
Read More »

Wednesday, 12 April 2017

SAS : Arrays

SAS Arrays : Introduction It provides a simple, appropriate way to process a group of variables in a SAS DATA step. Syntax Array array-name {number-of-elements} list-of-variables; Note: You can use [ ] or { } or ( ) for defining number of elements in the ARRAY statement. Examples 1.  ARRAY ABC[5] a b c d e;  In the example above, ABC is an array-name, 5 implies the...
Read More »

Friday, 7 April 2017

SAS : Cartesian Product

1) Cartesian Product A simplest join in proc sql where the final out is each row of first dataset combined with each row of the second. Its syntax is: Proc sql;       create table company as             select a.empid, b.name, b.salary             from employee as a , salary as b            ...
Read More »

Tuesday, 4 April 2017

SAS :Convert all Numeric Variables to Character using proc SQL

The task is to create a successor to a SAS data set, replacing each numeric variable in the original with a character variable. Here is a method which preserves variable order and variable attributes. First create a data set for the demonstration: proc sql; create table mixedtype as  select *   from sashelp.class; quit; Result:                   Age as          ...
Read More »