SAS techniques you should learn

http://studysas.blogspot.com/2008/08/sas-tips-and-tricks-part1-httpwww4.html

Advanced SAS Programming Techniques

Contents:

1 Introduction 3

2 The DATA Step 4
2.1 The DATA STEP process : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4
2.1.1 An implicit loop : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4
2.1.2 RETURN, DELETE, and OUTPUT : : : : : : : : : : : : : : : : : : 5
2.1.3 Compound Statements : : : : : : : : : : : : : : : : : : : : : : : : : : 7
2.1.4 Data Set Options : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8
2.1.5 DROP, KEEP, and RETAIN : : : : : : : : : : : : : : : : : : : : : : 10
2.2 Input/Output : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10
2.2.1 List Input : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10
2.2.2 Column Input : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 13
2.2.3 Pointer Control and Formatted Input : : : : : : : : : : : : : : : : : 14
2.2.4 The PUT Statement : : : : : : : : : : : : : : : : : : : : : : : : : : : 18
2.2.5 SAS Formats and Informats : : : : : : : : : : : : : : : : : : : : : : : 19
2.3 SAS Functions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 21
2.3.1 Mathematical Functions : : : : : : : : : : : : : : : : : : : : : : : : : 21
2.3.2 Random Number Generators : : : : : : : : : : : : : : : : : : : : : : 22
2.3.3 String Functions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 23
2.3.4 Date and Time Functions : : : : : : : : : : : : : : : : : : : : : : : : 24
2.3.5 PUT and INPUT Functions : : : : : : : : : : : : : : : : : : : : : : : 25
2.4 Looping and Arrays : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 26
2.4.1 Univariate and Multivariate Data Views : : : : : : : : : : : : : : : : 27

1
CONTENTS 2
2.4.2 Indeterminant DO Loops : : : : : : : : : : : : : : : : : : : : : : : : 32
2.5 The NULL Data Set : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 33
2.6 Data Step Examples : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 35
2.6.1 Simple Random Sampling Without Replacement : : : : : : : : : : : 35
2.6.2 Data Recoding : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 36

3 Working With Files 38
3.1 External Files : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38
3.1.1 FTP Access : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 44
3.1.2 WWW Access : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 45
3.2 Including External SAS Code : : : : : : : : : : : : : : : : : : : : : : : : : : 45
3.3 The SAS Data Library : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 45
3.3.1 The LIBNAME Statement : : : : : : : : : : : : : : : : : : : : : : : : 46
3.3.2 Library Procedures : : : : : : : : : : : : : : : : : : : : : : : : : : : : 47
3.4 File Import/Export/Transport : : : : : : : : : : : : : : : : : : : : : : : : : 51
3.4.1 Import/Export : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 51
3.4.2 Transport : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 53
3.5 The X Files : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 55

4 The Macro Language 57
4.1 Macro Variables : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 57
4.2 Macro Procedures : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 59
4.3 Bootstrap Example : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 62
4.4 Cluster Dendrogram : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 66

5 SAS Special Files 70
5.1 Autoexec.sas : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 70
5.2 Con g.sas : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 72
5.3 Pro le.sct : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 75

6 SAS Internet Tools 76
6.1 Capturing OUTPUT for the Web : : : : : : : : : : : : : : : : : : : : : : : : 76

Clinical Trails


Clinical Trials
A clinical trial is a research study designed to answer specific questions about new drugs, medical devices, or new ways of using known treatments. Clinical trials are used to determine whether the new drug or treatment is safe, and whether it works.

Clinical trials consist of four phases:

Phase I tests a new treatment on a small group, and concentrates on safety;

Phase II deals with safety and efficacy, and expands the study to a larger group of people (several hundred);

Phase III expands the study to an even larger group of people (thousands), and is designed to determine conclusively whether or not the treatment is effective;

Phase IV takes place after the drug has been licensed, to monitor the drug for long-term effects.
What are the phases of a clinical trial?

The randomized, double-blind, placebo-controlled (or active-comparator-controlled) trial offers the strongest evidence that a treatment is effective. The number of participants also considerably effects how reliably the trial can determine the effects of a treatment.
Clinical trials must be consistent with good clinical practice (GCP), a rigorous set of guidelines designed to protect the participants’ safety and the integrity of the trial data. The FDA requires pharmaceutical companies and contract research organizations to conduct rigorous clinical trials verifying the safety and efficacy of the new drugs before granting approval for marketing.

The trial objectives and design are usually documented in clinical trial protocols. Once the objectives are determined, case report forms must be carefully designed to gather complete, unambiguous data from the trial.

During the trial, the data management team must continually monitor and verify the data to ensure that they are accurate and consistent. Any missing or inconsistent data must be investigated and corrected.

Base SAS Certification Exam Model Questions:






Base SAS 1 Base SAS 2 Base SAS 3 Base SAS 4 Base SAS 5 Base SAS 6 Base SAS 7 Base SAS 8
Base SAS 9 Base SAS 10 Base SAS 11 Base SAS 12 Base SAS 13 Base SAS 14 Base SAS 15
Base SAS 16 Base SAS 17 Base SAS 18 Base SAS 19 Base SAS 20 Base SAS 21 Base SAS 22
Base SAS 23 Base SAS 24 Base SAS 25 Base SAS 27 Base SAS 28 Base SAS 29 Base SAS 30
Base SAS 31 Base SAS 32 Base SAS 33 Base SAS 34 Base SAS 35 Base SAS 36 Base SAS 37
Base SAS 38 Base SAS 39 Base SAS 40 Base SAS 41 Base SAS 42 Base SAS 43 Base SAS 44
Base SAS 45 Base SAS 46 Base SAS 47 Base SAS 48 Base SAS 49 Base SAS 50 Base SAS 51
Base SAS 52 Base SAS 53 Base SAS 54 Base SAS 55 Base SAS 56 Base SAS 57 Base SAS 58
Base SAS 59 Base SAS 60 Base SAS 61 Base SAS 62 Base SAS 63 Base SAS 64 Base SAS 65
Base SAS 66 Base SAS 67 Base SAS 68 Base SAS 69 Base SAS 70 Base SAS 71 Base SAS 72
Base SAS 73 Base SAS 74 Base SAS 75 Base SAS 76 Base SAS 77 Base SAS 78 Base SAS 79
Base SAS 80 Base SAS 81 Base SAS 82 Base SAS 83 Base SAS 84 Base SAS 85 Base SAS 86
Base SAS 87 Base SAS 88 Base SAS 89 Base SAS 90 Base SAS 91 Base SAS 92 Base SAS 93
Base SAS 94 Base SAS 95 Base SAS 96 Base SAS 97 Base SAS 98 Base SAS 99 Base SAS 100
Base SAS 101 Base SAS 102 Base sas 103 Base SAS 104 Base SAS 105 Base SAS 106



Trial eCRF Pages

Adverse Event:
http://www.sapmaker.com/EDC/eCRF_AE.aspx

Study Medication Exposure (EX)
http://www.sapmaker.com/EDC/eCRF_EX.aspx

Demographics (DM)
http://www.sapmaker.com/EDC/eCRF_DM.aspx

Concomitant Medication (CM)
http://www.sapmaker.com/EDC/eCRF_CM.aspx

Disposition (DS)
http://www.sapmaker.com/EDC/eCRF_DS.aspx

Vital Signs (VS)
http://www.sapmaker.com/EDC/eCRF_VS.aspx

Medical History (MH)
http://www.sapmaker.com/EDC/eCRF_MH.aspx

Disease Status at Baseline
http://www.sapmaker.com/EDC/eCRF_BASECAT.aspx

Change from Baseline Disease Status
http://www.sapmaker.com/EDC/eCRF_CFBCAT.aspx

CDISC Metadata of ClinTrialStat eCRF Builder Created ODM Domains
http://www.sapmaker.com/EDC/eCRF%20SDTM.xml

Everything we should know about ICH, GCP and their Guidelines


Brief Introduction to the ICH Guidelines



Frequently asked questions about ICH and its guidelines:
http://www.ich.org/cache/compo/276-254-1.html

Guideline for Industry
Structure and Content of Clinical
Study Reports
http://www.fda.gov/cder/guidance/iche3.pdf

Guidance for Industry
E6 Good Clinical Practice:
Consolidated Guidance
http://www.fda.gov/CDER/guidance/959fnl.pdf

ICH Guidelines:

ICH HARMONISED TRIPARTITE GUIDELINE
GUIDELINE FOR GOOD CLINICAL PRACTICE
E6(R1)

Pharmaceutical Research And Manufacturer’s Industry Perspective of about ICH GCP:

SAS® and the CDISC (Clinical Data Interchange Standards Consortium)






CDISC
Consortium of Data Interchange Standards Committee (CDISC) is primarily concerned withdeveloping standards that aid in the exchange of information between companies in the BioPharmaecosystems.

These include the following models:
• Operational Data Model (ODM) —operational support of data collection
• Study Data Tabulation Model (SDTM) —data tabulation data sets
• Case Report Tabulation Data Definition Specification (CRTDDS - aka define.xml)
• Laboratory Data Model (Lab)• Standard for Exchange of Non-clinical Data (SEND)
• BRIDG—Protocol Representation• Analysis Data Model (ADaM) —analysis data structures
• And others… (For example, LAB, SEND)Taken together, these standards and guidelines represent challenges of supporting the clinical researchprocess.

The importance of data standards Data standards are a critical component in the quest to improve global public health. Inefficiencies in the collection, processing and analysis of patient and health-related information drive up the cost of research and development for life sciences companies as well as negatively impact the cost and quality of healthcare delivery for patients and consumers.

SAS software support for CDISC standards In addition to helping define CDISC standards, SAS is making certain that our products and solutions support the implementation of CDISC data standards. SAS®9 includes a component called PROC CDISC that enables organizations running SAS programs to work with CDISC structured data. PROC CDISC supports bi-directional conversion of data content contained in a CDISC ODM XML document to and from SAS-accessible data sources. The current version of PROC CDISC also supports content validation of SAS-accessible data sources to the CDISC SDTM data domain definitions. See http://www.cdisc.org/ for details on individual format descriptions.


CDISC standards such as SDTM, ODM, LAB and ADaM can be effectively implemented in solutions like SAS Drug Development and SAS DI Studio, and we're currently exploring additional ways that these standard processes and data structures can be utilized within our software.

The SAS XML Libname Engine has been enhanced in SAS 9.1.3 to natively read and write CDISC ODM file content. Using the SAS XML Libname Engine, any data content accessible to SAS may be converted to a CDISC ODM XML document, or conversely, any content in a CDISC ODM XML document may be converted to a SAS dataset or other SAS-accessible data source.
SAS CDISC implementation services In addition to providing CDISC support within our software, SAS consultants are ready to help your organization implement CDISC standards to drive efficiencies in your clinical development processes.

Glossary
AdaM: Analysis Dataset Model
CDISC: Clinical Data Interchange Standards Consortium
CRT-DDS: Case Report Tabulation Data Definition Specification
LAB: Laboratory Data Model
ODM: Operational Data Model
SDS: Submission Data Standards
SDTM: Study Data Tabulation Model
XML: eXtensible Markup Language

to learn more about CDISC: http://www.lexjansen.com/pharmasug/2003/fdacompliance/fda055.pdf

SAS Model resumes and SAS Tips and Tricks

http://studysas.blogspot.com/2008/08/learn-sas-online.html

SAS UNIX Commands:

http://studysas.blogspot.com/2008/09/sas-unix-commands.html

SAS Projects

Here's a list and brief description of the available projects.
Everyone should do the first 4 projects.

Project 1 An introduction to the SAS operating environment.
Project 2 The basic SAS data step with input of data directly through the cards statement; use of labels, the sort procedure and print procedure; the means procedure.
Project 3 Reading data from ASCII files; computing new variables in the data step; the means procedure.
Project 4 Modifying existing SAS data sets using set; using loops in the data step; the ttest procedure.
Project 5 Column-wise input; analysis of categorical data using chi-square tests.
Project 6 Updating existing SAS data sets with new data.
Project 7 Basics of presentation quality graphics with proc gplot and proc g3d.
Project 8 Basic one factor analysis of variance using proc GLM.
Project 9 Advanced analysis of variance, custom hypothesis tests, and other features of proc GLM.
Project 10 Basic Box-Jenkins modeling of univariate time series analysis using proc arima (time domain).
Project 12
Some aspects of frequency domain analysis of time series using proc spectra.
Project 13
Discriminant analysis with proc discrim.
Project 14
Reading data from dBase and DIF files; using dBase and DIF files instead of actual SAS datasets.
Project 15
Using arrays, first and last, and processing dates. Repeated measures analysis.
source: http://javeeh.net/sasintro/intro134.html

What to think and what to learn about SAS interview


Assessing SAS® Skill Level during the Interviewing Processhttp://www2.sas.com/proceedings/sugi29/133-29.pdf


Interviewing and assessing SAS Programmers http://ssc.utexas.edu/docs/sashelp/sugi/24/Training/p307-24.pdf


SAS® Interview or “How to Get a Second Date”http://www.nesug.info/Proceedings/nesug06/as/as10.pdf

Tips for Effectively Interviewing SAS Programming Candidateshttp://www.lexjansen.com/pharmasug/2007/ma/ma05.pdf

HIRE Power in the Pharmaceutical Industryhttp://www.lexjansen.com/pharmasug/2006/management/ma08.pdf

SAS statements,Procedures and Functions


SAS Statements, Procedures, and Functions SAS documentation can be overwhelming. The software is split into modules (such as BASE, STAT, GRAPH). The online documentation is split into versions and modules, a variety of guides (each organized in a different fashion) and the documentation has undergone several revisions. This guide provides an alphabetical listing of commonly used SAS statements, SAS functions, and SAS procedures. It points to vendor supplied online descriptions of each key word mentioned. No distinction is made between the modules. Most statements and the use of SAS functions must be placed within a data step (i.e. Between a line that begins with data ...; and after other lines... a run; statement.) A data step defines data that can be analyzed by other procedure (or PROC) steps. This guide is an introductory reference. It is not meant to be read as a tutorial. For a well rounded introductory knowledge of SAS the user should be familiar with the following:
Contents[hide]
1 SAS Statements
2 SAS Procedures
3 SAS Functions
4 For more information
5 Resources/References
if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); }
[edit]
SAS Statements
all SAS statements, alphabetically
Data Step Assignment (for creating new variables, must be done within a data step)
Data Step BY
Data Step CARDS
Data Step DATALINES
Data Step DELETE
Data Step DO; ... END;
Data Step subsetting IF
Data Step IF-THEN-ELSE
Data Step INFILE
Data Step INPUT
Data Step MERGE
Data Step SELECT
Data Step SET (rarely missing from a data step)
Data Step WHERE
FILENAME
LIBNAME
OPTIONS
Several SAS statements (or syntactic constructs) help to improve the readability of your SAS program.
These are:
Comments (text meant to be read by humans, using * ...; or /* ... */)
RUN;
TITLE
[edit]
SAS Procedures
PROC CORR
PROC FREQ
PROC MEANS (similar to PROC SUMMARY)
PROC PLOT (similar to PROC GPLOT)
PROC PRINT
PROC REG
PROC SORT (should be accompanied by a BY statement)
PROC TTEST
[edit]
SAS Functions
SAS Functions ABS
SAS Functions LENGTH (to work with text (strings) instead of numbers)
SAS Functions MAX
SAS Functions MEAN
SAS Functions MIN
SAS Functions ROUND
SAS Functions SUBSTR (to work with text (strings) instead of numbers)
all SAS Functions (alphabetically) (by categories)
[edit]
For more information
Saving your work - see 12 Ways to save SAS data
Making your output look nicer - Use ODS (the output delivery system), Titles, Footnote, Labels, Formats. See SAS Eye Candy (a wanted wiki page)
Where are the statistics described? Specific statistical procedures that are not found in the Procedures guide are probably in the SAS/ETS guide (since Time Series are ...?). While somewhat statistical in nature PROC CORR, MEANS, SUMMARY, and FREQ are part of the SAS/BASE module.
Common statistical prcedures not listed here are LOGISTIC, PROBIT, GLM (for General linear models). A more extended statistical discussion and more elaborate statistical analyses are listed at the start of the [SAS/STAT Guide].
[edit]
Resources/References
All of the above are found at http://v9doc.sas.com/ ... looking at the SAS 9.1.3 (9.1 TS1M3) , SAS OnlineDoc 9.1.3 for the Web
Everything referenced in this guide is found in the Online SAS documentation sections:
SAS Procedures Guide
SAS Language Users Guide
SAS/STAT Volumes 1 and 2
SAS Dictionary of Statements (statements and functions)
Retrieved from "http://wiki.binghamton.edu/index.php/Concise_Glossary_for_SAS"


Resources from where you can learn SAS online:

SAS interview Q & A: PROC SQl and SAS GRAPH and ODS

http://studysas.blogspot.com/2008/09/sas-interview-q-proc-sql-and-sas-graph.html

Staying Up-to-date with SAS®9 Software and Documentation

http://sausag.sasusers.net/presentations/0611_Staying_Up-to-date_SAS9_SW_Doc.pdf


Efficient way to learn SAS with virtually no cost
http://www.prochelp.com/costfree.pdf

A different approach to learn SAS Software
http://analytics.ncsu.edu/sesug/2004/SY14-Mirjana.pdf

SAS study groups
comp.soft-sys.sas
http://www.listserv.uga.edu/archives/sas-l.html

For more SAS® software information, please visit the following websites:
Bay Area SAS Users Group
ComplementSoft
LA SAS User Group
ODS Sugi Papers
ProcHelp
San Diego SAS Users Group
SAS Consulting User Group
SAS Enterprise Guide User Group
SAS List Server
SAS Institute
SAS Technical Support
SAS User
Seven of Nine Systems
Western Users of SAS Software

List of University Web Pages for First-Time SAS Users

SAS Tutorial at University of New Mexico:
http://its.unm.edu/introductions/Sas_tutorial/

SAS at MIT:
http://web.mit.edu/sas/www/

UCLA Academic Technology Services:
http://www.ats.ucla.edu/stat/sas/
http://www.ats.ucla.edu/stat/sas/modules/default.htm

Introduction to Using SAS at Penn State:
http://gears.aset.psu.edu/hpc/education/tutorials/sas/

SAS Help at Penn State Population Research Institute:
http://help.pop.psu.edu/help-by-software-package/sas

SAS Errors at University of Idaho:
http://www.uidaho.edu/ag/statprog/sas/errors.htm

source:http://www.globalstatements.com/sas/u/u.html

http://www.sas.com/apps/elearning/elearning_courses.jsp?cat=Free%20Tutorials

http://spikeware.com/tutorials.html

http://gears.aset.psu.edu/hpc/education/tutorials/sas/sasstart/

Resources for learning SAS

Three of the best tools to learn SAS include:
* Training: Books by Users and SAS training manuals are abundant (see below)
* SAS-L: questions and answers to many common problems
* Mentors: study programs developed by experienced users

SAS Resources on the Internet
Internet sites with good examples or even short courses on SAS are easily
found. Go to a search engine (e.g., yahoo, google, altavista, etc.) and
search for SAS, statistics, or some other keyword related to the topic of
interest. The following URLs are only a small selection of what you may
find:

http://statsoft.nih.gov/training/crsnotes/html/FSPClass.htm

http://www.ats.ucla.edu/stat/sas/modules/

An online tutorial for learning SAS for Windows (version 8.2) can be found
at:
http://www.utexas.edu/cc/stat/tutorials/sas8/sas8.html

You can find answers to frequently asked questions at a SAS site:
http://support.sas.com/techsup/faq/products.html

The following site has comprehensive list of many websites about SAS:
http://www.prochelp.com

An on-line document that is continually updated with new information
called SAS PROGRAMMING AND USAGE HINTS consists of several chapters with
sub-sections on various topics of the SAS System are found at:
http://www.uoregon.edu/~robinh/sas.html

Proceedings in pdf format from the annual SAS User Group International
(SUGI) conferences (Nos. 22-29 held in the years 1997-2004) may be viewed
through your browser (requires Acrobat 5.0) are available at:
http://support.sas.com/usergroups/sugi/proceedings/index.html

Papers on specific topics presented at SUGI meetings can be researched at:
http://www.lexjansen.com/sugi/

This page allows you to type in keywords to search for relevant articles.
Several region SAS user groups have web sites for proceedings from past
conferences; for one try the NESUG (2004):
http://www.nesug.org/html/Proceedings/nesug04.pdf

SAS Manuals and Documentation
The following link from the SAS Institute to bookmark is:
http://support.sas.com/documentation/onlinedoc/index.html

which directs you to SAS documentation on SAS 8.2, SAS 9.1, SAS 9.1.2, SAS
9.1.3, a host of "What's new in this version" notes, supplemental
documentation on SAS products installation documentation, and more.
Specifically, you can find documentation for Version 9.1.3 at two SAS web
sites.

Another site to add to your browser's "Favorites" is user-friendly in the
sense that it allows you to search the table of contents for specific
topics and then select links for further information.
http://support.sas.com/onlinedoc/913/docMainpage.jsp

The following site provides the actual contents of various SAS manuals in
PDF format which you can browse or print as needed.
http://support.sas.com/documentation/onlinedoc/91pdf/index_913.html

You must have Adobe Acrobat Reader 6.0 or later to view or print these
documents. Please note, the entire contents of each manual are place in
one document -- some of them have 1000's of pages (e.g., the STAT manual
alone has over 5000!) so be judicious and print only the pages you need.
These manuals are also available for purchase.
The individual manuals (the "white" books for Version 6 and "blue" books
for version 8) took up most of the available space on a moderate size
bookcase shelf, plus they were heavy and laborious to find a topic of
interest. To alleviate the need to read through large books, SAS Version
8.2 documentation continues to be available to University of Oregon users
at:
http://sas.uoregon.edu/sashtml/main.htm

The SAS Institute also has documentation available online for Version 8
which can be found at:
http://v8doc.sas.com/sashtml/

You may add any of these pages to your "Favorites" in a web browser for
fast and easy reference. A master index is available on the University
site so you can locate just about any topic, procedure, or keyword
quickly.
A few of the most helpful manuals for all versions of SAS include:
Introductory Guide - Assumes you're a beginner, but that you have basic
knowledge about using a computer on which SAS runs (UNIX, VMS, or
WINDOWS).
* SAS Introductory Guide (Version 6)
Usage - Assumes you have at least introductory knowledge of SAS. It
contains many excellent examples and descriptions of techniques. Usage
manuals are difficult to use effectively until you gain familiarity with
the system.
* SAS Language Reference, Vols. 1 and 2 (Version 8)
* SAS Procedures Guide, Vols. 1 and 2 (Version 8)
* SAS Language and Procedures (Version 6)
Statistics and Econometrics. It assumes working knowledge of the DATA step
and of the statistical procedure to be applied to your data.
* SAS Stat User's Guide, Vols. 1, 2, and 3 (Version 8)
* ETS User's Guide, Second Ed. (Version 6)
Many more manuals on specialized topics are available from the SAS
Institute (also in the Computing Center's documents room) depending on
specific tools you need including:
* SAS System for Regression
* SAS System for Linear Models, 4th Ed. - Littel
* A Step-by-Step Approach to using Univariate and Multivariate
Statistics - Hutchinson
* Categorical Data Analysis, 2nd Ed, - Stokes, Davis, and Koch
* SAS System for Mixed Models, 2nd Ed. - Littel, Milliken, Stroup, Wolfinger
* SAS Guide to Problem Solving and Error Messages
The companion for the platform you're using (e.g. Windows, Unix, VMS) is
also quite helpful, as are the guides to SQL, Macro, REPORT, TABULATE, and
other products describing STAT or GRAPH procedures.

The home page for SAS publications is:
http://www.sas.com/apps/pubscat/welcome.jsp

From this site you can easily locate SAS manuals and books on many topics
written by users (Books By Users) with the search feature. "SAS Course
Notes" are good resources to know and are interspersed in the following
list (among others):

http://www.sas.com/apps/pubscat/booklist.jsp?attr=product&val=Base+SAS

Books: SAS Learning Resources
The following resources are good "getting started" guides and
introductions to SAS:

Lora D. Delviche and Susan J. Slaughter. "The Little SAS Book: A Primer".
(3rd edition). [Note: It has important new material related to version 9.1
and is an excellent introduction to get you up and running with SAS.]

Cody, R. P. and Smith, J. K., Applied Statistics and the SAS Programming
Language, Fourth Edition, Prentice-Hall, New York, 1997.

Aster, Rick and Seidman, Rhena, Professional SAS Programming Secrets,
Windcrest, 1991. [Note: It is practically the only one treating SAS as a
general programming language.]

Frank C. DiIorio. "SAS Applications Programming: A Gentle Introduction"
SAS-L Newsgroup
The SAS-L newsgroup list is a great resource to share knowledge of SAS
applications with other users. To subscribe to SAS-L, send the following
message to the listserv at: LISTSERV@UGA.CC.UGA.EDU with the text of the
message:

Subscribe SAS-L
Be aware that you will probably receive 50-75 messages a day if you add
your address to their list so your INBOX is likely to fill up rapidly. You
can also read the messages posted each day from the news groups servers on
oregon, darkwing, or gladstone by adding: comp.soft-sys.sas

You can also check the SAS list archives and search for topics:
http://www.listserv.uga.edu/archives/sas-l.html

Other URLs for learning SAS
http://www.sas.com/techsup/intro.html [SAS technical support]

http://www.sconsig.com/ [Charles Patridge's SAS site]

http://www.pwcons.com/Tips/index.html [PW Consulting's SAS Tips]

http://www.yorku.ca/dept/psych/lab/sas/ [SAS Information Guides]

How to Reference SAS in Reports and other Documents
http://www.sas.com/presscenter/guidelines.html

The proper citations for SAS publications can be found on the copyright
page of the individual work.

source:http://www.uoregon.edu/~robinh/018learn.txt

Proc Report and Proc Tabulate

SAS® Reporting 101: REPORT, TABULATE, ODS, and Microsoft Office
Here is a pdf with clear instructions and uses of both.

Battle of the Titans: REPORT vs TABULATE
http://www2.sas.com/proceedings/sugi27/p133-27.pdf

www.laurenhaworth.com/publications/Reporting101.PPT

http://www.laurenhaworth.com/publications/ODSforPRT.pdf


Difference between Proc Report and Proc tabulate:

Proc Tabulate is a possibility to report statistical relations between variables in up to three dimensions (rows, columns, pages). You don't have too many possibilities to influence single cells, rows, columns, pages and not too much on the layout. The things you influence are alsways related to whole dimensions. If you want to have something like calculated columns, e.g. one is the difference of the 3 left of it, not possible. If you want to do it anyway, it's getting difficult. The main goal is to present summarized data-values in cells.

Proc report mainly is a listing procedure. Very strong features to influence the layout, also with ordering and grouping. The simplest form of a REPORT output is not a table, but a list, where the results of statistics is presenten in SUMMARY lines while the other lines contain the details. In addition, you HAVE influence on singel cells, rows, columns. You CAN relate columns and have calculated columns of them which are left of the new one. Cou can have influence on all rows with a DATA-step like programming language and you can influence single cells with that. E.g. a "traffic-lighting" dependant on certain limits is possible.


Proc Tabulate:

http://ssc.utexas.edu/docs/sashelp/sugi/24/Begtutor/p62-24.pdf
http://www2.sas.com/proceedings/sugi27/p060-27.pdf
http://www.albany.edu/~msz03/epi514/papers/anyone.pdf
http://www.laurenhaworth.com/publications/ODSforPRT.pdf
http://www2.sas.com/proceedings/sugi31/113-31.pdf



Proc Report:

http://www2.sas.com/proceedings/sugi31/052-31.pdf
http://www2.sas.com/proceedings/sugi31/116-31.pdf
http://www2.sas.com/proceedings/sugi31/235-31.pdf
http://www2.sas.com/proceedings/sugi30/244-30.pdf
http://www2.sas.com/proceedings/sugi29/088-29.pdf
http://www2.sas.com/proceedings/sugi29/242-29.pdf
http://www2.sas.com/proceedings/sugi28/015-28.pdf

SAS interview questions:Macros

http://studysas.blogspot.com/2008/09/sas-interview-questionsmacros.html

SAS interview questions:General

http://studysas.blogspot.com/2008/08/sas-interview-questions-generalpart-2.html

SAS Interview Questions:Base SAS

http://studysas.blogspot.com/2008/09/sas-interview-questionsbase-sas.html

SAS Interview Q&A:Clinical trials

I am transfering all the information which I put in this blog to the new one. Visit www.studysas.blogspot.com . Visitors please visit my new blog for all the SAS needs.



http://studysas.blogspot.com/2008/09/sas-interview-questions-answersclinical.html

Behavioral Type Interview Questions

http://studysas.blogspot.com/2008/08/sas-interview-questions-and.html

Some SAS useful Tips

Number of Obs in a Dataset
Using PROC SUMMARY for Descriptive and Frequency Statistics
Last Date of Month
SAS to CSV
Does a Dataset Exist
Reordering Variables
Additional Codes to an Existing Format
Concatenating Datasets
Deleting SAS Datasets based on a Date
Reading Variable Length Record Files
Changing the Height of a HEADLINE in PROC REPORT when using ODS RTF
How Quantiles are Calculated
Variance Calculation Differences
Getting the Comment text of an Excel Cell
Getting the Background Color of a Cell in Excel
A DOS .BAT File for Backing Up a File with Date A Stamp
Calculating the Distance Between Two Points on the Earth's Surface

Your Questions and Our Answers

1) Hi I have read in one book regarding demographic table i.e. summary stats were calculated for AGE variable and n% was calculated for gender and race variables.

Why it has been calculated like that.P- value was calculated for the above 3 variables for-byAGE-NPAR1WAY(wilcoxon signed scores)gender-Chi-square testRace-- Fishers Exact TestY it has been calculated by 3 diff methods.
Plz explain the concept behind demog? By Sai......

Ans)P-value can be calculated by many different SAS Procedures. Here in this case, there are three different SAS procedures that contributed to P-Values.Three types of variables are regularly treated in statistical analysis for clinical trials: categorical, quantitative, and survival. Categorical variables are characterized as having a limited number of discrete values that can be nominal, ordinal, or interval. Quantitative, or continuous, variables are defined as those that can be put into an infinite number of continuous values.

Survival variables are used to measure the duration of time for the occurrence of a specific event. In the eg. that you have provided, categorical variables are Race and Gender whereas Age is the quantitative variable.Before the statistician goes into defining the analysis methods, he/she needs to make certain assumptions about the distribution of the population (eg. normal distribution, poisson distribution, etc).

In the example, for the key variable Age, it was better to calculate the P-value without considering any such strict distributional assumptions. That means, it was a case where statistical tests with nonparametric approach yield the best result. And the nonparametric SAS procedure for calculating P-value for a quantitative (or continuous ) variable is PROC NPAR1WAY.Coming to Gender, the population distribution was considered for the analysis. Parametric SAS procedure for calculating P-value for a categorical variable is chi-square test through Proc freq.Coming to Race, population distribution was not taken into consideration and hence it involved a nonparametric approach.

The nonparametric approach for calculating P-value for a categorical variable is Fisher's exact test through Prof Freq.So the fact in a nutsell is, the test you use to get p-value depends on whether the variable of interest is categorical/continuous /survival, and also how the population is distributed for the particular variable of interest and when it comes to your other question, why summary stats were caculated for AGE variable and n% was calculated for gender and race variables".That is because Age is a continuous variable and for continuous variables, getting the descriptive statistics provide useful information. Descriptive statistics is obtained by using proc means/proc univariate/proc summary etc.Gender and Race are categorical variables. Frequency distributions work best with such variables whose values are best summarized by counts rather than averages. .........by cathy.


2) Rajini
Creating reports?Can anyone tell how to create ad hoc reports,data validation,edit checks.if interviewer asks about it what shoulld we tell him?

ans)
a) creating ad hoc reports is nothing but little programming according to the queries that can be requested by FDA or IDMB or whoever. they can be like for Ex: i need the report of top 10 AE's that were reported in IIT population etc..my best suggestion would be like imagine some programming situation for some kind of report or listing or some specific graph like distribution of lab values across the populations etc...and explain them in detail how u can do it.

b) data validation: we can validate the analysis data sets, or created reports, listing or graphs. say that, u had done programming on the already created report or whatever based on the same specs the other programmer had done to prepare that report and checked the results with Proc Compare, and found the discrepancies or redundancy and documented it.generally they use Version Control softwares to make sure the change features of the programs that aid them in validation.if u r workin in an UNIX environment, Please tell them about RCS - revision control system (u can find plenty of material how to use RCS in UNIX , please go though it and u will understand it more clearly, its very easy to understand )

c) Edit checks are some thing that will check whether the data we have in the datasets is appropriate or not, i mean whether all the categorical and continuous variables fall into same limitations what they are supposed to be in.generally in the pharma companies there will be around 75 - 100 edit check macros that are already created, so u can just run them on ur data to make sure data u have is OK or not...u might have known about oracle clinical, those CDM guys will run the edit checks to make sure the data they are goin to send to a SAS programmer is clean, so there would be no problems in future to avoid data problems once u start workin on the data................ by Sreekanth Sharma.....

3) Srikanth Sharma :My experience:......interview questionsthese were some of questions asked by the biggest Pharma company in US..hope this will help some folks.
1) how many analysis datasets did you create?
2) how many of them are safety analysis datasets? how many efficacy analysis datasets?
3) name all the efficacy datasets u created?
4) tell me from scratch how you create a efficacy dataset, all the parent datasets, derived variables? derivation criteria?
5) how frequently u create analysis datasets in your project? how frequently u do reporting...
6) how many studies did u integrate in ISS n ISE? explain about those studies? how many protocols did u follow?
7) tell me the syntax for PROC LOGISTIC, GLM, MIXED, LIFETEST, PHREG, PROC CORR.
8) u said ur study was double blinded study? so u had a chance for unblinding the study? if no, who will unblind it? at what stage u have to unblind? u know which subjects got which trt? so how can u say, its a double blinded study?

ans)

1) how many analysis datasets did you create?datasets?ans: 7 .......safety, remaining effiacy..actually it differs for each study.

3) name all the efficacy datasets u created?ans: CHFB, CHFHDL, CHFBIDL, i said some..

4) tell me from scratch how you create a efficacy dataset, all the parent datasets, derived variables? derivation criteria?ans: it was a long answer detailing each and every variable, and the derivation for each variable.

5) how frequently u create analysis datasets in your project? how frequently u do reporting...ans: analysis datasets in the begining of the project for perticular study, for each diifft study in the beginning we create analysis datasets, and reporting we do it in drafts, like draft I, draft II, 3, 4 like that..

6) how many studies did u integrate in ISS n ISE? explain about those studies? how many protocols did u follow?i said 5 studies were int, protocols - 2

7)tell me the syntax for PROC LOGISTIC, GLM, MIXED, LIFETEST, PHREG, PROC CORR.ans: i wrote the whole syntax and explained the logic, told in detail what we have to keep in class and model statement, and what kind of P value, and where that P value is in each output dataset.

8) u said ur study was double blinded study? so u had a chance for unblinding the study? if no, who will unblind it? at what stage u have to unblind? u know which subjects got which trt? so how can u say, its a double blinded study?ans: i read the article called "INDEPENDENT DATA REVIEWS" from http://www.lexjansen.com/ by Ananth Kumar of Gilead sciences..and told the same thing .

4) temple NEED INFO Hi ,.Can any body give me a link to find a brief description or more info about Clinical Development Analysis and Reporting System(CDARS).

ans) CDARS provides user-friendly tools to facilitate easy retrieval and collation of patient and clinical information which forms the core component for further clinical research or audit studies. It helps us to create reports and also extract patient lists with specific criteria or outcome and track on all episodes related to respective patient, from a clinical data management system like OC.Pfizer is a company that uses this type of tool....... by Cathy.....

5) Sai reg phase III data I am preparing for interviews and have some doubts

1.From where the raw data will be extracted (Phase III trial data)
2.Cant we get the phase III data of any trial in PC files(excel sheets) in real time scenarios or else we have to fetch it only from OC database.
3.wht r the analysis datasets.
4.how r they created from original raw data
5.wht is safety analysis n efficacy analysis?diff between safety n efficacy datasets?Plz rectify my doubts.


ans)1.From where the raw data will be extracted (Phase III trial data)The raw data is extracted from the clinical data management system. Every company has its own favourite CDMS. OC is just one among them. Few others are Clinplus, Clinaccess, Medidate Rave etc.

2.Cant we get the phase III data of any trial in PC files(excel sheets) in real time scenarios or else we have to fetch it only from OC database.Well....Since clinical trials and associated reporting are highly regulated, companies go for sophisticated database like OC rather than a poor excel "database". One thing you must remember is that, whatever electronic medium we use to capture and store data must be 21 CFR Part 11 compliant. Excel definetely does not satisfy the conditions mentioned in this part.

3.wht r the analysis datasets. It depends on your project/trial. Some common ones are Demog, Adverse events, Concomitant medication, Physical Examination (vitals), Disposition, lab data etc. These are some of the safety-related analysis datasets. Mostly these analysis datasets remain same among various therapeutic areas, wheres the efficacy analysis datasets are the ones that are unique to your study.

4. How r they created from original raw data. There is a lot of formating and derivations that go into the creation of Analysis datatsets, and there will be a specification to guide us. There is no straight forward answer to this question that I can type here. I request you to refer further on this.

5.wht is safety analysis n efficacy analysis?diff between safety n efficacy datasets?Safety data is the one we use for analyzing how safe a drug is. It is the major part of most of the phase I, II and III studies. In addition, PhaseIII also concentrate on the efficacy part. Efficacy analysis is done essentially to find out to what extent drug A is efficacious when compared to Drug B. For an antihypertensive medication, efficacy might be analysed using the change from baseline systolic/diastolic blood pressure when a particular drug is taken.Hope now you got some idea!!.............by Cathy......

6) temple
pivot tables
What are pivot tables in sas? and also can anyone let me know which versoin of sas is used mostly in Companies


ans) Pivot Tables are used in the financial environment to enable analysts to group and summarize statistics. A Pivot table is to a way to extract data from a long list of information, and present it in a readable form. Remember the data we had from the student scores spreadsheet? You could turn that into a pivot table, and then view only the Maths scores for each pupil. Or view just Paul's scores, and nobody else's.

Why are they called Pivot Tables ? -Well, basically they allow us to pivot our data via drag-and-drop to produce meaningful information. This makes Pivot Tables interactive in that once the table is complete we can very easily see what effect moving (or pivoting) our data has on our information. This will become patently clear once you give Pivot Tables a go. Believe me, no matter how experienced you get at Pivot Tables there will always be an element of trial-and-error involved in producing the desired results! What this means is you will find yourself pivoting your table a lot! cotd... http://www.orkut.com/CommMsgs.aspx?cmm=42949801&tid=5202377049730991529

7) Pallav
variable name more than 32 character....
How to export a file having variable name more than 32 characters and embedded spaces?


ans)hi pallav, correct me if i am wrong

1) how can the variable Name can have spaces? only variable labels will have spaces2) the primary purpose we create a export file in .xpt format is to send the file to FDA..but unfortunatly FDA requests only SAS Version 5 Compatible files...so even if SAS v9 can create variable name that can span for 32 characters, FDA won't accept it.if ur intention is to create a transport file to send to other SAS user in ur team or cross functional team member..then its fine...u can send the file that has variable namel of 32 char long... by Sreekanth....

8)about ranuni function?
what is the use of ranuni function?please provide me the relevant link for this ranuni function?
ans:
do nething &
RANUNI is a function used for random number generation. It has values between 0 and 1.We use this for selecting samples randomly.Let us say you want to select 10% of blood samples. thats where we can use it.
sarath_sas
Here is one example:%let n = 3;data generate;do Subj = 1 to &n;x = int(100*ranuni(0) + 1);output;end;run;title "Data Set with &n Random Numbers";proc print data=generate noobs;run;in this, we are selecting 3 numbers .so it select randomly between 0 to 99 . if we ran this code again then it select another random 3 numbers.

9)padmakar
related to colon
Could anybody explain how X: notation works in selecting the variables that starts with x i.e. specifies all variables that begin with the letter X.Plz explain with an eg:- showing its application.Thnx in Advance ....padhu.........

ans)Ram
Please look Little SAS book Chapter - 2.10

Reading Messy Raw DataFor example, given this line of raw data,

My dog Sam Breed: Rottweiler Vet Bills: $478

From the example above, you need get only Rottweiler, then look the different INPUT statements, in which you are getting Rottweiler:Statements Value of variable DogBreed1.

INPUT @’Breed:’ DogBreed $; Rottweil2.

INPUT @’Breed:’ DogBreed $20.; Rottweiler Vet Bill3.

INPUT @’Breed:’ DogBreed :$20.; RottweilerYou can see the difference, in the 1 step you are getting value only 8 characters, 2nd sept - 20 characters and in the 3rd step you got only Rottweiler (this you want).This example from Little SAS book, so that you can read from the book, if you didn't get it here.


9)m
_null_
why do you use _NULL_ ? tell some instances where you have used that technique?


do nething &
We DATA _NULL_to create customized reports without manipulating the dataset.we are not creating any new dataset using this statement.We can also use this for creating raw data files from the datasets.we use file and put statements for that.i think this helps.or you can go to the litttle sas book ....

10) What abt. ETL.

ETL process:Extract,transform and Load
ExtractThe 1st part of an ETL process is to extract the data from the source systems. Most data warehousing projects consolidate data from different source systems. Each separate system may also use a different data organization / format. Common data source formats are relational databases and flat files, but may include non-relational database structures such as IMS or other data structures such as VSAM or ISAM. Extraction converts the data into a format for transformation processing.An intrinsic part of the extraction is the parsing of extracted data, resulting in a check if the data meets an expected pattern or structure. If not, the data is rejected entirely.

Transform:The transform stage applies a series of rules or functions to the extracted data from the source to derive the data to be loaded to the end target. Some data sources will require very little or even no manipulation of data. In other cases, one or more of the following transformations types to meet the business and technical needs of the end target may be required:· Selecting only certain columns to load (or selecting null columns not to load) · Translating coded values (e.g., if the source system stores 1 for male and 2 for female, but the warehouse stores M for male and F for female), this is called automated data cleansing; no manual cleansing occurs during ETL · Encoding free-form values (e.g., mapping "Male" to "1" and "Mr" to M) · Joining together data from multiple sources (e.g., lookup, merge, etc.) · Generating surrogate key values · Transposing or pivoting (turning multiple columns into multiple rows or vice versa) · Splitting a column into multiple columns (e.g., putting a comma-separated list specified as a string in one column as individual values in different columns) · Applying any form of simple or complex data validation; if failed, a full, partial or no rejection of the data, and thus no, partial or all the data is handed over to the next step, depending on the rule design and exception handling. Most of the above transformations itself might result in an exception, e.g. when a code-translation parses an unknown code in the extracted data.

Load:The load phase loads the data into the end target, usually being the data warehouse (DW). Depending on the requirements of the organization, this process ranges widely. Some data warehouses might weekly overwrite existing information with cumulative, updated data, while other DW (or even other parts of the same DW) might add new data in a historized form, e.g. hourly. The timing and scope to replace or append are strategic design choices dependent on the time available and the business needs. More complex systems can maintain a history and audit trail of all changes to the data loaded in the DW.As the load phase interacts with a database, the constraints defined in the database schema as well as in triggers activated upon data load apply (e.g. uniqueness, referential integrity, mandatory fields), which also contribute to the overall data quality performance of the ETL process.

11) Can anyone tell me thw advantages of CDISC standards? Can anyone explain abt. CDISC standards?

ans) What are benefits of the CDISC standards? Ultimately all benefits associated with standards implementation --- efficiency, time saving, process improvement, reduced time for regulatory submissions, more efficient regulatory reviews of submission, savings in time and money on data transfers among business partners, more efficient archive and recovery procedures, more accessible information, better communications amongst team members --- come down to saving money - whether it be in time, resources or actual funds.

•CDISC SDTM
unfolding the core model that is the basis both for the specialised dataset templates (SDTM domains) optimised for medical reviewers•CDISC Define.xmlmetadata describing the data exchange structures (domains).

Basic Concepts in CDISC SDTM
Observations and Variables•The SDTM provides a general framework for describing the organization of information collected during human and animal studies.•The model is built around the concept of observations, which consist of discrete pieces of information collected during a study. Observations normally correspond to rows in a dataset.•Each observation can be described by a series of named variables. Each variable, which normally corresponds to a column in a dataset, can be classified according to its Role. •Observations are reported in a series of domains, usually corresponding to data that were Example:Subject AB-525 weight 52Kg 30days after first dose (May 30,2006)DOMAIN:"VS"(Vital Signs, a Findings Domain)Identifier: Unique Subject Identifier is USUBJID="AB-525".Topic: Vital Signs Test Short name is VSTESTCD="WEIGHT"Timing:date/time of measurement is VSDTC=2006-06-29study day of the vital sign VSDY=30Result Qualifier: Result or Finding the original units is VSORRES=52Variable Qualifier: Unit is VSORRESSU="KG"Additinal timing variables and qualifiers may be added as necessary as they are in the model.

CDISC’s Submission standard
•Underlying Models:CDISC Study Data Tabulation ModelØClinical Observations•General Classes: Events, Findings, Interventions–Trial Design Model•Elements, Arms, Trial Summary Parameters etc.•Domains, submission dataset templates:CDISC SDTM Implementation Guide.

11) What are the current versions of SDTM,ODM,LAB,ADaM,Define.Xml?

ans) Current Versions:SDTM,ODM,LAB,ADaM,Define.Xml
Study Data Tabulation Model (SDTM) - The current version is 3.1.1.Standard for the Exchange of Non-Clinical Data (SEND) – The current version is 2.3; this is actually considered to be a part of the SDTM (for animal/tox data vs. human data)Operational Data Model (ODM) – The current version is 1.2.1. Version 1.3 Draft is currently posted for comment. This version will enhance v 1.2 such that it can support SDTM metadata for regulatory submission. Laboratory Data Model (LAB) – The current version is 1.0.1. This content standard can be implemented via ASCII, SAS, XML or and ANSI-accredited HL7 V3 message.Case Report Tabulation Data Definition Specification (CRT-DDS) Define.xml – The current version is 1.0. This is a means to submit SDTM metadata to FDA in an ODM XML format.Analysis Dataset Model Team - (ADaM 2.0)

12) What do you do to get clean data?
-use prog freq to check variables which have limited number of categories, such as gender, sex..
-use a data step to identify invalid character values (use put in data _null_ statement.
-use a where statement with proc print to list out of range data
-use user-defined formats to detect invalid values-using proc means/proc univariate to detect invalid values.

13) If you need the value of a variable rather than the variable itself, what would you use to load the value to a macro variable?
Use call SYMPUT, to get a variable from a dataset then assign it's value to a macro variable.

14)Efficiently duplicating SAS data sets
Question: How can a duplicate copy of a data set be created within the same library without copying the data set to an intermediate location, renaming it, and copying it back?

Answer: The most efficient way to do this is to use the APPEND procedure. Also, unlike the DATA step, indexes are copied as well.
If the data set supplied on the BASE= option does not exist, then it's created with the contents of the data set supplied with the DATA= option. Here is an example of creating a duplicate data set with a different name in the same library using
PROC APPEND.
proc append base=sasuser.new
data=sasuser.class;
run;
NOTE: Appending SASUSER.CLASS to SASUSER.NEW.
NOTE: BASE data set does not exist. DATA file is being copied to BASE file. NOTE: The data set SASUSER.NEW has 19 observations and 5 variables.
real time 1.34 seconds
cpu time 0.11 seconds

15) SAS Data Step Debugger:
Have you ever found yourself with a SAS data step which runs, but not quite as you want it to? The SAS Data Step debugger can help you find logic errors in your program by allowing you to step through your code, examine data, and even temporarily modify data values. The full text of this tip appears in the 1997 Q1 edition of SAS Communications.

To invoke the data step debugger, add the DEBUG option in the DATA statement.
For example:
data temp/debug;
do i=1 to 10;
x=i*2;
output;
end;
run;

When you submit this code you will see two new windows on your workstation screen, the DEBUGGER LOG window and the DEBUGGER SOURCE window. In the DEBUGGER LOG window you can type commands to examine variable values, set breakpoints, and change values. The results of these commands are shown as well. The DEBUGGER SOURCE window contains the source code for the DATA step you are debugging.

To end the debugger session, type QUIT on the command line in the DEBUGGER LOG window.

16) is
recent interview questions i faced
1. suppose we have 2 datasets in a Work library i want to delete one dataset from worklibrary what wil u do?2. what is concamitant medication tell me about it?3. we have a dataset having two variables name,sal i want the SUM of the sal variable at the bottom of the sal variable. write the syntax for that?4.tell me about sas Mautosource?5.significance of p-value

1) SAS datasets created with just a name (i.e. without specifying the name of the library ) are by default in the WORK library. The WORK library and the datasets in it are automatically deleted at the end of the SAS session. We don’t need to delete them seperately. But during the SAS session, if we want to delete the datasets from the work library, you can use either PROC DATASETS or PROC SQL. I feel PROC SQL is better for this purpose simply because it gives very less information in the log. Using the DROP statement with the Proc SQL we will be able to delete the dataset from work library.Whereas the DELETE command in the Proc datasets is used to remove the datasets from the SAS work library. If we want to delete all the datasets in the work library we need to give KILL option instead of the DELETE option. DELETE option just deletes the specified datasets in the work library. The following example shows how to delete all the members within a permanent SAS library using the KILL option:

LIBNAME input ‘temp’;
PROC DATASETS LIBRARY=input DELETE X;
RUN; (X is the dataset we need to delete form the library).

2) Comcomitant medications are drugs that are taken along with the study drug by the patients in the study. Suppose a patient, name stacy in enrolled in the oncology( drug A) clinical trial of ABC pharmaceuticals, and if she is also taking some other drugs( Aspirin, acetaminophen etc) along with drug A are called concomitant medications. Concomitant medications used in either safety or efficacy analysis of the drug. Concomitant medications(aspirin, acetaminophen etc) may be examined to determine whether they interact with the study drug (in this case drug A) or whether they can explain the presence of certain adverse events.

3) A SUM statement is used to compute the total number of the sal variable.

Procedure Code:
PROC PRINT DATA=namesal;
BY name;
VAR name sal;
SUM sal;
RUN;

4) When we want SAS to search for your macro programs in auto call libraries, you must specify two options, Mautosource and SASautos. The Mautosource option must be enabled to tell the macro processor to search auto call libraries when resolving macro program references. To use the auto call facility, you must have the SAS system option MAUTOSOURCE set. It causes the macro processor to search the auto call library for a file with the requested name when a macro has been invoked but not compiled.

5) If the p-value were greater than 0.05, you would say that the group of independent variables does not show a statistically significant relationship with the dependent variable, or that the group of independent variables does not reliably predict the dependent variable. Note that this is an overall significance test assessing whether the group of independent variables,when used together reliably predict the dependent variable, and does not address the ability of any of the particular independent variables to predict the dependent variable.
source:http://www.ats.ucla.edu/stat/stata/webbooks/reg/chapter1/statareg_annotated2.htm

sarath

17) Sarath one question from me too..regarding the ISS & ISE. Could you please explain a bit more in detail exactly how the Statistics group integrates the Safety and efficacy information in these datasets across studies (i.e are these sister studies, are datasets across studies merged?how? ) with a few examples. Seekin for one

ans) ISS will have all the clinical trial data, collected form a normal volunteers (from phase 1 study) and patients (all other studies). ISE will have the clinical trial data only from the phase II and Phase III and phase IV and not of Phase I. The reason behind this is, Phase I study is conducted to identify the safety and not the efficacy of the drug, so the data from the Phase I study will not be there in the ISE.ISE should have a description of entire efficacy database demographics and baseline characteristics.ISS should have the details including the extent of the exposure of drug by the patient, different characteristics of patients enrolled in the study, listing the deaths occurred -during the study, How many patients are drop-outs from the study and Potential SAE, other AE and lab results.

ISS is considered as one of the most necessary document required for filing the NDA (new drug application). The safety data from different trials can be integrated by pooling all the safety data together and then to identify the AE, that are rare. The data integration approach for the ISS and ISE are entirely different, whereas pooling the efficacy data from different studies is not required, although pooled data will give more information regarding the efficacy of the drug. Pooling all the safety data is necessary in making the ISS. ISS needs a thorough research because it involves with the safety and safety parameter is considered important than the efficacy in a clinical trial, because study should always benefit patients. ISR (integrated summary report): It is a compilation of all the information collected from the safety and efficacy analysis in all the studies. ISS and ISE are different parts of ISR. Both the ISS and ISE reports are necessary for all the new drug applications (NDA) in the United States.Every clinical trial is different, because each one is conducted for a specific purpose (Phase I for safety in normal population and all other for efficacy in patients). The reason behind creating the ISR will be to create an integrated report to compare and to differentiate all other study results and to get one conclusion after reviewing the patient benefit/risk profile. It requires by the FDA is the other reason. Last but not the least reason for this is to reach a definite conclusion through thorough checking all the data which is integrated.
source: encyclopedia of biopharmaceutical statistics