LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 9 Aug 2006 15:03:26 -0500
Reply-To:     Robin High <robinh@UNLSERVE.UNL.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin High <robinh@UNLSERVE.UNL.EDU>
Subject:      Re: UnifyPow question
Comments: To: Peter Flom <Flom@NDRI.ORG>
In-Reply-To:  <44D9D113.B875.00C9.0@ndri.org>
Content-Type: TEXT/PLAIN; charset=US-ASCII

> I tried sending this to Ralph OBrien, but he is away..... > > I just d/l ed the UnifyPow program, and, following his example, tried > > START CODE > > %include "&UnifyPow"; > title2 "Mystic Michelle: Ordinary (pi = .50) or Gifted (pi = .80)?"; > title3 "Testing a single proportion"; > datalines; > pi .80 . Mystic Michelle claims 80% accuracy. > null .50 . (This is default--not really needed.) > Ntotal 20 40 > alpha .01 .05 > %tables; > > > END CODE > > and got tons of errors about > "open code statement recursion detected" > and macro statements not being valid in open code > > > Does anyone know what I am doing wrong? > > thanks >

Peter

You need to first tell SAS where to find the file with the macros by entering a %LET statement:

%LET UnifyPow = c:\sas\UnifyPow\UnifyPow020817a.sas;

And then run as indicated:

title1 "UnifyPow Workshop and SUGI 23 Presentation";

*---------------------------------------; * Testing single proportion (sign test) ; *---------------------------------------;

%include "&UnifyPow"; title2 "Mystic Michelle: Ordinary (pi = .50) or Gifted (pi = .80)?"; title3 "Testing a single proportion"; datalines; pi .80 . Mystic Michelle claims 80% accuracy. null .50 . (This is default--not really needed.) Ntotal 20 40 alpha .01 .05 %tables;

* in version 9.1 you can also compute the same analysis with PROC POWER;

PROC POWER; ONESAMPLEFREQ test =exact SIDES = 1 ALPHA = .01 .05 NULLPROPORTION = .5 PROPORTION =.8 Ntotal = 20 40 POWER = . ; RUN;

Robin High


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