Date: Thu, 25 Aug 2011 17:28:56 -0700
Reply-To: Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Subject: Re: AE table help
In-Reply-To: <CAPo+ggvEhU9ggp4v3tdtTbAVQn_qbDa+qEBAaPus83n6fZuyBA@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Phani,
So if I am understanding correctly you want to get the number of events and
also the number of patients with events out of PROC FREQ within the same
call? I have never been able to do that myself without pre-processing the
data. Perhaps you could use a data step to get a count of events per
patient and then a binary variable indicating whether or not the patient had
at least one event, then limiting the dataset to one record per patient.
Then you could run the two variables (the count variable and the binary
indicator variable) though PROC FREQ at the same time. However, you would
need to do this one event at a time, so would probably want to use a macro.
I'm looking forward to hearing others ideas, which will probably be more
ellegant.
Cheers,
Mary R.
On Thu, Aug 25, 2011 at 4:12 PM, SAS_learner <proccontents@gmail.com> wrote:
> Hello all,
>
> I am doing a simple AE table where I want
>
>
> Placebo (n=xx)
> LY 3 mg (n=xx)
> preferred term # events incidence
> # events incidence
> Infections and Infestations
> Appendicitis
> Bronchitis
>
> I am planning to use the following proc freq code , I know I am getting
> #events count right in pt_term_count table , but how to get the incidence
> values using the proc freq. I think I can use proc sql distinct (usubjid)
> would give me what I want right but curious if there way to get in Proc
> freq
> step ??
>
> Proc freq data = event_count ;
> by trtsort;
> tables Socterm * pterm /out = pt_term_count ;
> tables pterm * Usubjid /list out = pt_term_subjid ;
> run;
>
> Thanks
> Phani
>
|