LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 8 Feb 2004 21:32:51 -0500
Reply-To:   Tom Slack <tom_sas@DUESOUTH.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Tom Slack <tom_sas@DUESOUTH.NET>
Subject:   Re: Calculating groupwise median in SAS 9.0
In-Reply-To:   <87868fc.0402081201.47962ee0@posting.google.com>
Content-Type:   text/plain; charset="us-ascii"; format=flowed

Seema, It sounds like you can't write to data set transacmed or you are running out of resources. Try limiting your observations (ie OPTIONS OBS=1000) and or drop the sort and use a class statement in the PROC MEANS.

In other words try taking these two suggestions and call Tech support in the morning ; ).

Good Luck,

Tom

At 12:01 PM 2/8/2004 -0800, you wrote: >Hi, > >I have a list of purchases where every customer purchases 1 brand on >one purchase occassion. So for some brands I have no price >information. I want to use the median price for that brand over the >entire time period instead of the missing values. So I am trying to >write a data step that will give me median prices for every model in a >separate file but am having some problems with the same. Am pasting my >code and the error message below. Any help is really really >appreciated. > >CODE: > >data transac; >infile 'N:\Spring Semester\MKTG 613\SAS Assignment\transacw1.txt'; >input #1 nweek 1-2 modelid 4-5 @8 (totalgro vehgross)(5.) @19 >(vehpampr vehprice)(6.) > daystotu 32-35 age 37-39 havetrad 41 tradmake 42-43 ntransac 45 > term 47-48 monthlyp 50-54 @55 apr 5.2 percentf 60-62 > manureba 64-68 totaldow 69-74 residual 76-80 > #2 tradeage 8-10 zipcode $ 12-16 ngender 19 censusb2 $ 23-37 > @40 (latitude longitud)(10.4) targetgr $ 65 nreg 70 region $ >75-80 > #3 @8 (mod1-mod9)(8.4) > #4 @8 (mod10-mod15)(8.4) > #5 @8 (PCTASIA PCTBLK PCTBLUE PCTCOL > PCTHISP PCTLHS PCTOWN PCTRURAL)(8.4) > #6 @8 (H_MED HSE_MED)(8.2) @25 (HI_MED VALUEMED)(12.2) > @56 closedat mmddyy8. vin $ 64-80; > run; >proc sort data=transac; >by modelid; >run; >proc means data=transac; >var vehprice manureba; >by modelid; >output out= transacmed median(vehprice)=medprice >median(manureba)=medreb; >run; > > ><b> Problem </b> When I do this, I get the median prices for brands 1 >and 2 (modelids 1 and 2 rather) and dont get the remaining brands from >3 to 15 although all the data is present in transac (checked that >already). The error message it gives me is as follows: > >ERROR: Read Access Violation In Task ( MEANS ) >Exception occurred at (66FE70BC) >Task Traceback >Address Frame (DBGHELP API Version 4.0 rev 5) >66FE70BC 050FF720 0001:000260BC sassfm01.dll >66FD97A2 050FF760 0001:000187A2 sassfm01.dll >66FD83A5 050FF7D8 0001:000173A5 sassfm01.dll >66FCBDC6 050FF878 0001:0000ADC6 sassfm01.dll >66FC386E 050FF89C 0001:0000286E sassfm01.dll >67008769 050FFF84 0001:00007769 sasmeans.dll >67E223EE 050FFFA0 0001:000113EE sashost.dll >67E26DE0 050FFFB4 0001:00015DE0 sashost.dll >77E7D33B 050FFFEC kernel32:RegisterWaitForInputIdle+0x43 > >NOTE: The SAS System stopped processing this step because of errors. > >Thanks a ton in advance, >Seema


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