LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 11 Nov 2006 21:26:13 -0500
Reply-To:   "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:   Re: Automatic Unblinding

On Thu, 9 Nov 2006 16:11:08 -0500, Roland Rivers <seatedcoin@GMAIL.COM> wrote:

>I want to be able to unblind a drug trial automatically without having to >change the column headers by hardcoding. For example I might have the >following blinded INPUT data: > >Patient # Disposition Treatment >1 Completed Blinded >2 Discontinued Blinded >3 Completed Blinded > >Output > Treatment Counts >Disposition Blinded >----------- ------- >Completed 2 >Discontinued 1 > >Once the study becomes unblinded (Treatments A and B rather than Blinded) >I want to automatically be able to produce output without hardcoding the >output columns. > >Unblinded Input: > >Patient # Disposition Treatment >1 Completed A >2 Discontinued B >3 Completed A > >Dersired Output after the trial has been unblinded > Treatment Counts > ---------------- >Disposition A B >------------ --- -- >Completed 2 0 >Discontinued 0 1

PROC TABULATE does this naturally. Consider:

data demo; input Before_or_After $ Patient Disposition :$12. Treatment $; cards; Before 1 Completed Blinded Before 2 Discontinued Blinded Before 3 Completed Blinded After 1 Completed A After 2 Discontinued B After 3 Completed A ;

options formchar = "|----|+|---+=|-/\<>*";

proc tabulate data=demo; by descending Before_or_After; class disposition treatment; table n*f=10., disposition, treatment; run;

Results:

Before_or_After=Before

N --------------------------- | |Treatment | | |----------| | | Blinded | |--------------+----------| |Disposition | | |--------------| | |Completed | 2| |--------------+----------| |Discontinued | 1| ---------------------------

Before_or_After=After

N -------------------------------------- | | Treatment | | |---------------------| | | A | B | |--------------+----------+----------| |Disposition | | | |--------------| | | |Completed | 2| .| |--------------+----------+----------| |Discontinued | .| 1| --------------------------------------


Back to: Top of message | Previous page | Main SAS-L page