Dec 30, 2009

SAS Analytics Delivered to iPhone...

  • Deliver SAS Reports and Data to Mobile Users
  • User Friendly Interface for Parameter Selection without Programming
  • Capture Real Time Data from SAS Directly from your iPhone
  • Intuitive Web Interface for Administrators and Power Users
  • Deliver Powerful Business Intelligence to iPhone®
Any SAS macros, programs or data can be delivered to iPhone. By simply registering the programs or SAS libraries, you can make this available to specified users who connect via standard 3G or Wifi network and results are delivered into a viewer on iPhone. This is executed in real time so the user gets always the latest data.


Be Sociable, Share!

Dec 1, 2009

Sample SAS Codes on the Internet

SAS Code Examples
 

SAS STAT Examples

SAS Macros

SAS Library 

What statistical analysis should I use?

SAS Textbook Examples

David Franklin’s Examples

Nov 30, 2009

Drug Development, Approval Process and Electronic Submissions (CDISC)

Laws, Regulations, Policies and Procedures for Drug Applications 
http://www.fda.gov/Drugs/DevelopmentApprovalProcess/ucm090410.htm
Supporting CDISC Standards in Base SAS® Using the SAS® Clinical Standards Toolkit
http://www.nesug.org/Proceedings/nesug09/ph/ph14.pdf
CDISC Standards for submissions -
Although the Pharmaceutical companies do NOT have a common format for reporting/FDA Submissions, The CDISC and FDA are constantly pushing the companies to conform to CDISC standards. But the standards documents gives us a good oppurtunity to know more about the elements of Clinical trials. The ADAM, SDTM and CRT’s are the most important documents on the standards links to start with. Download The SDTM/SDSV3.x Zip Document – The SDTM Implementation Guide is the most important document from a developer perspective. This would list all the 23 domains and the datasets/elements that have to b submitted to FDA during ESubmissions.
You might want to read these topics at the least –
  • 2.2 – Datasets and Domains
  • 2.5 – Standard Domain codes….These are pretty much the sas datasets or the type of data that you would work in a clinical trial. The explanation or the columns in these domains are the ones that you would use in your programming. Chapters 5-9 give more details of all the Domains listed here in 2.5.
  • 3.2.1 – This is a key summary of all the Domains described in 2.5 and Chapters 5 – 9. If u can byheart them it would be perfect. With this information you would which SAS dataset has what type of information and structure of the data (one record per subject or per medication/visit) and the primary key variables on the datasets.
  • 3.2.3 – how to conform with CDISC.
Industry Standards for the Electronic Submission of Data to the FDA 
http://thenjchapterasa.org/njasa/Presentations/cdisca1.pot

Clinical Trial Listings by Medical Areas

At this link Clinical Trial Listings by Medical Areas – You can get the latest clinical trials going on at different places….Here you can gather the Trial Information such as ” A Randomized, Double-blind, Placebo-controlled, Dose-ranging Study to Assess the Safety, Tolerability and ” blah…..blah…. and inclusion and exclusion criteria…..An Excellent source of Functional Information on a Company’s drug.

 

Nov 22, 2009

Clinical Trials Terminology for SAS Programmers

The drug development process is a clinical process that has its own language. It is not required that SAS programmers function as a MD or a regulatory expert, but working knowledge of the terminology is important to be effective. This paper will walk through the drug development process from discovery to Phase IV. It will explain a wide range of acronyms such as IND, NDA, GCP and MedDRA. It will also describe some of the terminologies used within the process of clinical trials as a drug is developed and submitted to the FDA. This will give SAS programmers a larger perspective and context to their work during the analysis and reporting of clinical trials data.
Clinical Trial Acronyms – Source: CDISC
Clinical Trials Glossary- Source: CDISC

Basic Notes on Clinical Trials Phase I-IV

New chemical entities (NCEs) are discovered through screening existing compounds or designing new molecules. Once synthesized, they go through a rigorous testing process. Their pharmacological activity, therapeutic promise, and toxicity are tested using isolated cell cultures and animals, as well as computer models. A promising NCE is then modified to optimize its pharmacological activity with fewer undesirable biological properties.
Once pre-clinical studies are completed and the NCE has been proven safe on animals, the drug sponsor applies for Investigational New Drug (IND) status. If it receives approval, Phase I clinical trials are started to establish the tolerance of healthy human subjects at different doses and to study the effects on humans of anticipated dosage levels. The firm also studies the NCE’s absorption, distribution, metabolism, and excretion patterns. This stage requires careful supervision, as it is not yet certain if the drug is safe for humans. Phase 1 primarily determines how a medicine works in humans and helps to predict the dosage range for the medicine, and involves healthy volunteers. This initial phase of testing in humans is done in a small number of healthy volunteers (20 to 100), who are usually paid for participating in the study.
If phase I results are favorable, Phase II is authorized. A relatively small number of patients participate in controlled trials to establish the compound’s potential usefulness and short-term risks. Most phase II studies are randomized trials. One group of patients will receive the experimental drug, while a second “control” group will receive a standard treatment or placebo. Often these studies are “blinded”–neither the patients nor the researchers know who is getting the experimental drug. In this manner, the study can provide the pharmaceutical company and the FDA comparative information about the relative safety of the new drug, and its effectiveness. Only about one-third of experimental drugs successfully complete both phase I and phase II studies. Depending on these results, phase III trials are approved. The firm gathers precise information on the drug’s effectiveness for specific indications and to determine whether it produces a broader range of adverse effects than those exhibited in the smaller phase I and II trials. Phase 2 tests efficacy as well as safety among a small group of patients (100-300) with the condition for which the medicine has been developed.
Phase III can involve several hundred to several thousand subjects, and is extremely expensive. Reviews occur before and during each phase, and drug development may be terminated at any point if the risk of failure and the added cost needed to prove effectiveness outweigh the probability of success. In a phase III study, a drug is tested in several hundred to several thousand patients. This large-scale testing provides the pharmaceutical company and the FDA with a more thorough understanding of the drug’s effectiveness, benefits, and the range of possible adverse reactions. Most phase III studies are randomized and blinded trials.Phase III studies typically last several years. Seventy to 90 percent of drugs that enter phase III studies successfully complete this phase of testing. Once a phase III study is successfully completed, a pharmaceutical company can request FDA approval for marketing the drug.
There is a data and safety monitoring board in the United States under the Food and Drug Administration (FDA). This group of experts in given therapeutic areas has access to “unblinded data” throughout the conduct of a trial, but does not let anyone else know what the data show until it is necessary. For example, the board will not divulge efficacy data unless a point is reached where it seems appropriate to recommend stopping the trial because the drug’s basic efficacy has been either accepted or rejected. The FDA usually insists on the drug proving its efficacy with respect to ameliorating a disease before giving approval to sell it.
Post-Marketing — Late Phase Three/Phase IV Studies
If clinical trials are successful, the sponsor seeks FDA marketing approval by submitting a new drug application (NDA). If approved, the drug can be marketed immediately, although the FDA often requires some amendments before marketing can proceed. The amendments are based on recommendations from the FDA’s outside advisory panels.
In late phase III/phase IV studies, pharmaceutical companies have several objectives: (1) studies often compare a drug with other drugs already in the market; (2) studies are often designed to monitor a drug’s long-term effectiveness and impact on a patient’s quality of life; and (3) many studies are designed to determine the cost-effectiveness of a drug therapy relative to other traditional and new therapies. Phase 4 trials are conducted after a medicine has been granted a licence. In these studies a medicine is prescribed in an everyday healthcare environment which allows results to be developed using a much larger group of participants.
Phase 4 trials are performed to:
  • Know more about the side effects and safety of the drug
  • What are the long term risk and benefits?
  • How well the drug works when it’s used more widely than in clinical trials.
  • Develop new treatment uses for the medicine.
  • Compare with other treatments for the condition.
  • Determine the clinical effectiveness of the medicine in a much wider variety of patient types in conditions of “real life”.
  • How is it being marketed?
  • How good are the orders?
  • Feedback of the doctors?
  • How frequently are the orders being placed?
A drug’s manufacturing process must meet stringent best-practice standards. Scaling up from making a drug in the research phase to producing it in large quantities is difficult. In the lab, processing is done in small batches. In commercial production, significantly greater quantities are being produced, so ingredients generally go into a flow process that produces output continuously. (These are still batches in the sense that after the desired quantity is produced, the run stops, the equipment is cleaned, and a different drug is made.) Variations from the mean in a dose’s chemical make-up must be very small (the FDA constant-dosage requirement). Such uniformity of output is difficult in continuous processing because many parameters and conditions have to be kept constant. This requires a good understanding of optimizing the chemical process and maintaining safeguards against abnormal conditions.

Nov 16, 2009

SAS Macro to Create a delimited file from a SAS data set..

SAS has a macro that creates a delimited text file from a SAS dataset @ SAS Macro to Create a delimited text file from a SAS data set..
%macro makefile
  (
   dataset=_last_ ,  /* Dataset to write */
   filename=print ,  /* File to write to */
   dlmr=","       ,  /* Delimiter between values */
   qtes="no"      ,  /* Should SAS quote all character variables? */
   header="no"    ,  /* Do you want a header line w/ column names? */
   label="no"        /* Should labels be used instead of var names in header? */
  );
 
proc contents data=&dataset out=___out_;
run;
 
/* Return to orig order */
 
proc sort data=___out_;
  by varnum;     
run;
 
/* Build list of variable names */
 
data _null_;                         
  set ___out_ nobs=count;
  call symput("name"!!left(put(_n_,3.)),name);
  call symput("type"!!left(put(_n_,3.)),type);
 
  /* Use var name when label not present */
  if label=" " then label=name;       
  call symput("lbl"!!left(put(_n_,3.)),label);
  if _n_=1 then call symput("numvars", trim(left(put(count, best.))));
run;
 
/* Create file */
 
data _null_;
  set &dataset;
  file &filename;
  %global temp;
  %if &qtes="yes" %then %let temp='"';
  %else %let temp=' ';
  %if &header="yes" %then %do;
 
    /* Conditionally add column names */
    if _n_=1 then do;  
        put %if &label="yes" %then %do;
        %do i=1 %to &numvars-1;
          &temp  "%trim(%bquote(&&lbl&i)) " +(-1) &temp &dlmr
          %end;
        &temp "%trim(%bquote(&&lbl&numvars)) " &temp;
        %end;
    %else %do;
      %do i=1 %to &numvars-1;
        &temp "%trim(&&name&i) " +(-1) &temp &dlmr
        %end;
       &temp "%trim(&&name&numvars) " &temp ;
       %end;
    ;
    end;
  %end;
 
  /* Build PUT stmt to write values */
  put                                 
     %do i = 1 %to &numvars -1;
       %if &&type&i ne 1 and &qtes="yes" %then %do;
         '"' &&name&i +(-1) '"' &dlmr
         %end;
       %else %do;
         &&name&i +(-1) &dlmr
         %end;
     %end;
     %if &&type&i ne 1 and &qtes="yes" %then %do;
 
       /* Write last varname */
       '"' &&name&numvars +(-1) '"';   
       %end;
       %else %do;
 
         /* Write last varname */
         &&name&numvars;                 
       %end;
  run;
%mend makefile;
 
 
/* Write last varname */
 
options mprint;
 
data one;
  input id name :$20. amount ;
  date=today();
  format amount dollar10.2
           date mmddyy10.;
  label id="Customer ID Number";
datalines;
1 Grant   57.23
2 Michael 45.68
3 Tammy   53.21
;
run;
 
 
 
/* If LRECL= required because of records longer the 256, specify here */
 
filename myfile "~/tmp/rawdata" lrecl=256;
   
/* Invoke macro to write to a file, include proper parameters for your case. Make sure that the variables are in the order you want and have the desired formats.                                                          */
 
%makefile(dataset=one,
          filename=myfile, /* FILEREF or DDNAME of the file */
          dlmr=",",
          qtes="yes",
          header="yes",
          label="yes");
run;
 
 
There is one another simple method below but does not give that many options as the macro above...
 
 
%macro delimitfile(dsn,dlm,fileref);
     data _null_;
     file &fileref dlm=&dlm;
     set &dsn;
     put (_all_) (:); /* The colon here is dummy and has no effect */
     run;
%mend delimitfile;
 
filename out "c:\out1.csv";
 
%delimitfile(sashelp.class,"|",out);