Date: Thu, 29 Oct 2009 11:11:59 -0700
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: 95% UCL using Proc Freq problem ??
Content-Type: text/plain; charset=ISO-8859-1
Hello all,
Here is my problem. As there are no values for Inc2a_n to get the freq
values I did do simple output to get extra records. And after that My macro
worked fine .
Well now problem is that even though I do not have any records for inc2a_n
I am getting a value for Upper Confidence Limit as say 6 (after *100) on
SAS version 9 .Is this right or I am doing something wrong .2)if I am right
same logic code ran on SAS 8.2 is giving different number (they are getting
0 ) . Is that possible ??
Please let me know if my question is not clear .Please find my piece of code
that I am using and log which was generated.
-------------------------------------------------------------------------------------------------------
%if &var. = Inc2a_n %then %do ;
Data Val_adsl_ae2 ;
do wgt=1 by 0 until( eof ) ;
set Val_adsl_ae1 end=eof ;
output ;
end ;
do Event_Inc2a=0 to 1 ;
output ;
end;
stop ;;
run ;
Proc Freq Data = Val_adsl_ae2 Noprint ;
weight wgt / zeroes ;
Table &Var1./ Binomial (Level= '1' ) ;
Output Out = est2 (keep = XU_BIN XL_BIN) Binomial ;
Run;
%end ;
%else %do;
Proc Freq Data = Val_adsl_ae1 Noprint ;
Table &Var1./ Binomial (Level= '1' ) ;
Output Out = est2 (keep = XU_BIN XL_BIN) Binomial ;
Run;
%end;
Proc Transpose Data = Est2 Out = T_Est2 ;
Run;
Data count2;
Length Col1 $200. ;
set T_Est2 (Rename = (Col1 = Col1_)) ;;
counter = _n_ +3 ;
col_a = Strip(Round(Put(( Col1_ *&Main_Count.),4.)));
Run;
SYMBOLGEN: Macro variable VAR resolves to Inc2a_n
MLOGIC(TABLE_NUM): %IF condition &var. = Inc2a_n is TRUE
MPRINT(TABLE_NUM): Data Val_adsl_ae2 ;
MPRINT(TABLE_NUM): do wgt=1 by 0 until( eof ) ;
The SAS System
MPRINT(TABLE_NUM): set Val_adsl_ae1 end=eof ;
MPRINT(TABLE_NUM): output ;
MPRINT(TABLE_NUM): end ;
MPRINT(TABLE_NUM): do Event_Inc2a=0 to 1 ;
MPRINT(TABLE_NUM): output ;
MPRINT(TABLE_NUM): end;
MPRINT(TABLE_NUM): stop ;
MPRINT(TABLE_NUM): ;
MPRINT(TABLE_NUM): run ;
NOTE: There were 531 observations read from the data set WORK.VAL_ADSL_AE1.
NOTE: The data set WORK.VAL_ADSL_AE2 has 533 observations and 24 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds
MPRINT(TABLE_NUM): Proc Freq Data = Val_adsl_ae2 Noprint ;
MPRINT(TABLE_NUM): weight wgt / zeroes ;
SYMBOLGEN: Macro variable VAR1 resolves to Event_Inc2a
MPRINT(TABLE_NUM): Table Event_Inc2a/ Binomial (Level= '1' ) ;
MPRINT(TABLE_NUM): Output Out = est2 (keep = XU_BIN XL_BIN) Binomial ;
MPRINT(TABLE_NUM): Run;
NOTE: There were 533 observations read from the data set WORK.VAL_ADSL_AE2.
NOTE: The data set WORK.EST2 has 1 observations and 2 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds