Date: Wed, 6 Dec 2000 10:54:33 -0500
Reply-To: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject: Re: Question regarding Proc univariate
On Wed, 6 Dec 2000 10:25:25 -0500, Paige Miller <paige.miller@KODAK.COM>
wrote:
>Helan Lee wrote:
>>
>> I have the following dataset:
>>
>> ID Arrival_dt Arrival_tm Drug_dt Drug_tm
>> A 2/16/1999 10:15 2/16/1999 18:00
>> B 1/22/1999 16:00 2/16/1999 19:00
>>
>> I have calculated the length of time from arrival to drug administration
>> using the dhms function and then formatted this field using hhmm20.
>>
>> Now I am trying to calculate a mean, median, and range of this calculated
>> field using Proc Univariate. However, I need the format to remain as
hhmm.
>> I have tried to just insert a format statement but this doesn't work.
Any
>> suggestions would be greatly appreciated!
>
>I would save the results to a SAS data set, and then use PROC PRINT
>with the appropriate formats.
>
>--
>Paige Miller
>Eastman Kodak Company
>paige.miller@kodak.com
>
>"It's nothing until I call it!" -- Bill Klem, NL Umpire
>"Those black-eyed peas tasted all right to me" -- Dixie Chicks
You are creating variables which must have different names as the original
ones, because you create different statistics on them. The format is always
associated to a variable name (!). So e.g. use a PROC DATASETS or a simple
DATA step (I assume there are not too much obs, otherwise PROC DATASETS
would be better) and format all the variables you want to see as time-
values with hhmm20.
|