Monday, April 27, 2009

A Fwd that I enjoyed reading...


A Priest, a Doctor and a CRO employee die and go to heaven,
they hear God's voice and it says:

“My dear sons I am really very sorry but the heaven is full and I can accommodate only one of you, so to choose the right person, one by one tell me what you have done in your lifetime.”

The Priest goes up first and says:

"Well God I'm a priest, I am your humble servant and have spent all my life working to spread your message."

The Doctor goes up next and says:

"Well I'm a doctor and I have helped thousands of people recover from their illnesses"

The CRO employee goes up says:

"Well I worked in ***** Clinical Research India Pvt Ltd and........", Before the CRO employee could say anything further, the heaven's gate opened and God came with tears in his eyes and said to the CRO employee… Say no more my son come with me, you have already been through HELL...

Wednesday, April 8, 2009

How to read variable names?


The system dataset SASHELP.VCOLUMN is a SAS view. This view is where the attributes (like: variable names, labels and formats) of a dataset are stored as the records of a dataset. This is like an output dataset from the CONTENTS procedure.

For example, in the code below: If the DM dataset is executed, the corresponding attributes of this dataset gets saved in a view called sashelp.vcolumn (which can later be set for analysis).

*** RUN DM DATASET ***;

data dm;
set dm;
run;

*** SET SASHELP.VCOLUMN TO READ VARIABLE NAMES ***;

data test;
set sashelp.vcolumn(where=(libname="WORK" and memname in ("DM"))) end=last;
if find (label, "Date"); *capture date variables;
run;

Saturday, April 4, 2009

Checklists for validation


1) Log Check:
  • Is the program log clean (with no errors, warnings, uninitialized values, character to numeric conversions and vice versa?)
2) Cosmetic Check:
  • Does the output match mock up?
  • Are all words spelled correctly?
  • Does the number [1] in header match footnote number?
  • Does each footnote end with a period except reference?
  • Does the footnote refer to corresponding listing? (For Tables)
  • Are all variables aligned: Numeric – Right & decimal aligned, Character – Left aligned?
  • Is there any truncation for character variables?
  • Are ordering / display of subtitle consistent across all listings?
  • Does 5 subjects in QC program (a random pick) match output?
3) Logic Check:
  • Are the TLFs subset for right population?
  • Does the number of records displayed match with QC program?
  • Does the output content in each column relate to the annotated specification?
  • Does the output make logical sense for the given data?
  • Is there any duplicates in the given data?

Use of #BYVAL(variable-name)


How to customize our title display??? How do we insert a text in the title???

This option #byval helps the user insert text at the position it is placed in the title statement.

For example in the code below:

The use of #byval option with the variable TRTGRP in the BY statement (within a proc step) makes its dynamic value get displayed in the title. As result of which we get different treatment groups displayed in the title part.

title1 "Listing of Patient Population";
title2 "Treatment Group=#byval(trtgrp)";
proc report data=dummy nowd headline headskip spacing=1 missing;
by trtgrp;
column(subj rand saft ittp eval);

define subj/ order_ width = 20 left spacing = 0 "Subject" ;
define rand/ order_ width = 20 center "Randomized";
define saft/ display width = 20 center "Safety" ;
define ittp/ display width = 20 center "ITT";
define eval/ display width = 20 center "Evaluable";

break after subj / skip;
run;