1 ' RONPOWER.BAS 1.0 (C) 1996 BY RON HAYS
2 ' HAYS CONSULTANTS, 19524 NORMANDALE, CERRITOS, CA 90701
3 ' SOFTWARE PURCHASE PRICE $2.00
20 ' ******************************
35 INPUT "WHAT FILE IS THE DATA STORED IN";INFILE$
37 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
40 OPEN "I",#1,INFILE$
42 INPUT "WHAT FILE IS THE OUTPUT TO BE SAVED TO";OUTFILE$
45 OPEN "O",#2,OUTFILE$
46 INPUT #1,TITLE$
47 PRINT #2,"POWER ANALYSIS PROGRAM"
48 PRINT #2,"PROGRAMMMER: RON HAYS, RAND"
49 PRINT #2,:PRINT #2,TITLE$:PRINT #2,
51 PRINT #2,
52 PRINT #2,"Table: Sample sizes needed per group to detect differences in changes"
53 PRINT #2,"over time between two experimental groups, repeated measures design"
54 PRINT #2,
55 PRINT #2," Number of Points Difference "
56 PRINT #2,"Scale Name SD 2 5 10 20"
57 PRINT #2,"_________________________________________________________________"
82 INPUT #1,VAR$
83 IF VAR$="-" THEN GOTO 3014
84 INPUT #1,SD,R
85 RSQUARE=R*R:VAR=SD*SD
87 TWO=15.68*VAR*(1-RSQUARE)/4
91 FIVE=15.68*VAR*(1-RSQUARE)/25
94 TEN=15.68*VAR*(1-RSQUARE)/100
97 TWENTY=15.68*VAR*(1-RSQUARE)/400
102 PRINT #2,USING "& ####.## ####### ####### ####### #######";VAR$,SD,TWO,FIVE,TEN,TWENTY
104 GOTO 82
3014 PRINT #2,"_________________________________________________________________"
3015 PRINT #2,"Note: Scales are all scored on 0-100 possible range. Estimates"
3016 PRINT #2,"assume alpha = 0.05, two-tailed t-test, power = 80%, and an"
3017 PRINT #2,"intertemporal correlation between scores of 0.60."
3040 PRINT #2,:PRINT #2,
3042 PRINT #2,
3044 PRINT #2,"Table: Sample sizes needed per group to detect differences"
3046 PRINT #2,"between two experimental groups, post-intervention measures only"
3048 PRINT #2,
3050 PRINT #2," Number of Points Difference "
3060 PRINT #2,"Scale Name SD 2 5 10 20"
3064 PRINT #2,"_________________________________________________________________"
3065 CLOSE #1
3066 OPEN "I",#1,INFILE$
3068 INPUT #1,TITLE$
3070 INPUT #1,VAR$
3072 IF VAR$="-" THEN GOTO 3168
3080 INPUT #1,SD,R
3090 RSQUARE=R*R:VAR=SD*SD
3092 TWO2=15.68*VAR/4
3093 FIVE2=15.68*VAR/25
3094 TEN2=15.68*VAR/100
3096 TWENTY2=15.68*VAR/400
3166 PRINT #2,USING "& ####.## ####### ####### ####### #######";VAR$,SD,TWO2,FIVE2,TEN2,TWENTY2
3167 GOTO 3070
3168 PRINT #2,"_________________________________________________________________"
3170 PRINT #2,"Note: Scales are all scored on 0-100 possible range. Estimates"
3180 PRINT #2,"assume alpha = 0.05, two-tailed t-test, and power = 80%."
3240 PRINT #2,:PRINT #2,
3242 PRINT #2,
3244 PRINT #2,"Table: Sample sizes needed per group to detect differences "
3246 PRINT #2,"between two self-selected groups, repeated measures design"
3248 PRINT #2,
3250 PRINT #2," Number of Points Difference "
3260 PRINT #2,"Scale Name SD 2 5 10 20"
3264 PRINT #2,"_________________________________________________________________"
3265 CLOSE #1
3266 OPEN "I",#1,INFILE$
3268 INPUT #1,TITLE$
3270 INPUT #1,VAR$
3272 IF VAR$="-" THEN GOTO 3468
3280 INPUT #1,SD,R
3290 RSQUARE=R*R:VAR=SD*SD
3292 TWO3=15.68*VAR*2*(1-R)/4
3293 FIVE3=15.68*VAR*2*(1-R)/25
3294 TEN3=15.68*VAR*2*(1-R)/100
3295 TWENTY3=15.68*VAR*2*(1-R)/400
3466 PRINT #2,USING "& ####.## ####### ####### ####### #######";VAR$,SD,TWO3,FIVE3,TEN3,TWENTY3
3467 GOTO 3270
3468 PRINT #2,"_________________________________________________________________"
3470 PRINT #2,"Note: Scales are all scored on 0-100 possible range. Estimates"
3480 PRINT #2,"assume alpha = 0.05, two-tailed t-test, power = 80%, and an"
3490 PRINT #2,"intertemporal correlation between scores of 0.60."
3518 CLOSE
3520 SYSTEM
3521 END
3622 RETURN