Occurrences of "median" in \Cens2000\sf3\Profiles Project\JBlodgett\aggsf3.sas (& list of temp arrays): array _p52w{16} _temporary_ (10000 8*5000 10000 15000 3*25000 50000 100000); array _p84w{20} _temporary_ ( 10*2500 6*5000, 2*10000 25000 50000); array _h23w {9} _temporary_ (8*1 2); array _h34w {9} _temporary_ (1.25 4 5 5*10 25); array _h38w {6} _temporary_ (1.25 4 5 10 10 20); array _h54w{21} _temporary_ (100 50 50 50 50 50 50 50 50 50 50 50 50 50 50 100 100 250 250 500 1000); array _h69w{9} _temporary_ (10 6*5 10 15); array _h74w{24} _temporary_ (10000 6*5000 6*10000 4*25000 2*50000 2*100000 2*250000 500000); array _h90wMort{15} _temporary_ (200 8*100 2*250 3*500 1000); array _h90wNoMort{14} _temporary_ (100 6*50 6*100 200); array _pct38w{16} _temporary_ (10000 8*5000 10000 15000 3*25000 50000 100000); array _pct44w(20) _temporary_ (2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 5000, 5000, 5000, 5000, 5000, 5000, 10000, 10000, 25000, 50000); array _pct46w(20) _temporary_ (10*2500 6*5000 2*10000 25000 50000); array _hct11w(11) _temporary_ ( 5*5000 10000 15000 2*25000 50000 100000); array _hct19w(15) _temporary_ (0 200 2*100 3*200 2*500 3*1000 2*2500 3500); array _pct73w (20) _temporary_ (10*2500 6*5000 2*10000 25000 50000); array _hct36w(21) _temporary_ (100 14*50 2*100 2*250 500 750); array _hct39w(9) _temporary_ (10 6*5 10 15); array _hct41w(24) _temporary_ (10000 6*5000 6*10000 4*25000 2*50000 2*100000 2*250000 500000); array _hct44Mortw(15) _temporary_ (200 8*100 2*250 3*500 750); array _hct44NoMortw(14) _temporary_ (100 6*50 6*100 1100); array _hct47w(9) _temporary_ (10 6*5 10 15); the aggregation for up to 3 datasets -- based on the settypes parm. Invokes the %agg and %median macros *--We treat Median Value of Owner occ mobile homes (H82i1) as a mean because there is no distribution table for it.-; *--We treat the entire array of medians in PCT42 as means - no distributions.-; *---Big thing to do here is to replace the medians with values that we estimate from the corresponding distribution tables usoing the median macro. It requires as parms 2 arrays: 1 with values representing the widths of the %median(mdn=P53i1,intvals=_p52t,intsize=_p52w,samestep=0); %*--Do the medians for table 56 where we repeat the calculation for 7 different age categories--; %median(mdn=_p56mdn,intvals=_p55t,intsize=_p52w) ; %median(mdn=P77i1,intvals=_p76t,intsize=_p52w) ; %median(mdn=P80i1,intvals=_p79t,intsize=_p52w) ; %median(mdn=P85i1,intvals=_p84t,intsize=_p84w); %median(mdn=P85i2,intvals=_p84t,intsize=_p84w); %median(mdn=P85i3,intvals=_p84t,intsize=_p84w); %median(mdn=P152&r.i1, intvals=_p151&r, intsize=_p52w); %median(mdn=P155&r.i1, intvals=_p154&r, intsize=_p52w); %median(mdn=P156&r.i1, intvals=_nfhhinc, intsize=_p52w); %median(mdn=H24i1,intvals=_h23t,intsize=_h23w); %median(mdn=H27i1,intvals=_h26TotOcc,intsize=_h23w); %median(mdn=H27i2,intvals=_h26Owner,intsize=_h23w); %median(mdn=H27i3,intvals=_h26renter,intsize=_h23w); %median(mdn=_mednage,intvals=_h34t, intsize=_h34w); *--To get median year built we calculate age and subtract--; %median(mdn=_mednage, intvals=_h36owner, intsize=_h34w); %median(mdn=_mednage, intvals=_h36renter, intsize=_h34w); %median(mdn=_yearsin,intvals=_h38owner,intsize=_h38w); %median(mdn=_yearsin,intvals=_h38renter,intsize=_h38w); %median(mdn=_yearsin,intvals=_H38total,intsize=_h38w); %median(Q1=H55i1, intvals=_h54t, intsize=_h54w); %median(mdn=H56i1, intvals=_h54t, intsize=_h54w); %median(Q3=H57i1, intvals=_h54t, intsize=_h54w); %median(mdn=H60i1,intvals=_h59t,intsize=_h54w); %median(mdn=H63i1,intvals=_h62t,intsize=_h54w); %median(mdn=H70i1,intvals=_h69t,intsize=_h69w); %median(Q1=H75i1, intvals=_h74t, intsize=_h74w); %median(mdn=H76i1, intvals=_h74t, intsize=_h74w); %median(Q3=H77i1, intvals=_h74t, intsize=_h74w); %median(mdn=H85i1, intvals=_h84t, intsize=_h74w); %median(mdn=H88i1,intvals=_h87t,intsize=_h74w); %median(mdn=H91i1,intvals=_h90tMort,intsize=_h90wMort); %median(mdn=H91i2,intvals=_h90tNoMort,intsize=_h90wNoMort); %median(mdn=H95i1,intvals=_h94tTotal,intsize=_h69w); %median(mdn=H95i2,intvals=_h94tMort,intsize=_h69w); %median(mdn=H95i3,intvals=_h94tNoMort,intsize=_h69w); *----Round off the medians, weighted averages, etc.-----------------------*; %*--aggregate to get the tally arrays for the 3 medians in pct39--; %median(mdn=pct39i1,intvals=_pct38TOTFAMt,intsize=_pct38w,samestep=0); %median(mdn=pct39i2,intvals=_pct38KIDSt,intsize=_pct38w); %median(mdn=pct39i3,intvals=_pct38NOKIDSt,intsize=_pct38w); %median(mdn=pct40i2,intvals=_pct38MCt,intsize=_pct38w); %median(mdn=pct40i3,intvals=_pct38MCKIDSt,intsize=_pct38w); %median(mdn=pct40i4,intvals=_pct38MCNOKIDSt,intsize=_pct38w); %median(mdn=pct40i5,intvals=_pct38OFAMt,intsize=_pct38w); %median(mdn=pct40i6,intvals=_pct38MHHNWt,intsize=_pct38w); %median(mdn=pct40i7,intvals=_pct38MHHNWKIDSt,intsize=_pct38w); %median(mdn=pct40i8,intvals=_pct38MHHNWNOKIDSt,intsize=_pct38w); %median(mdn=pct40i9,intvals=_pct38FHHNHt,intsize=_pct38w); %median(mdn=pct40i10,intvals=_pct38FHHNHKIDSt,intsize=_pct38w); %median(mdn=pct40i11,intvals=_pct38FHHNHNOKIDSt,intsize=_pct38w); %median(mdn=pct45i1,intvals=_pct44MTOT,intsize=_pct44w,samestep=0); %median(mdn=pct45i2,intvals=_pct44MFT,intsize=_pct44w,samestep=0); %median(mdn=pct45i3,intvals=_pct44MNFT,intsize=_pct44w,samestep=0); %median(mdn=pct45i4,intvals=_pct44FTOT,intsize=_pct44w,samestep=0); %median(mdn=pct45i5,intvals=_pct44FFT,intsize=_pct44w,samestep=0); %median(mdn=pct45i6,intvals=_pct44FNFT,intsize=_pct44w,samestep=0); %median(mdn=pct47i1,intvals=_pct46fttot,intsize=_pct46w,samestep=0); %median(mdn=pct47i2,intvals=_pct46MFT,intsize=_pct46w,samestep=0); %median(mdn=pct47i3,intvals=_pct46FFT,intsize=_pct46w,samestep=0); %median(mdn=pct47i4,intvals=_pct46nfttot,intsize=_pct46w,samestep=0); %median(mdn=pct47i5,intvals=_pct46MNFT,intsize=_pct46w,samestep=0); %median(mdn=pct47i6,intvals=_pct46FNFT,intsize=_pct46w,samestep=0); %median(mdn=hct12i1,intvals=_hct11total,intsize=_hct11w); %median(mdn=hct12i2,intvals=_hct11owner,intsize=_hct11w); %median(mdn=hct12i3,intvals=_hct11renter,intsize=_hct11w); %median(mdn=hct20i1,intvals=_hct19,intsize=_hct19w); *----Round off the medians and weighted averages-----------------------*; medians associated with those arrays in the pct74 tables. Time to loop. --; %median(mdn=pct74&r.i1,intvals=_pct73&r.FTTOT,intsize=_pct73w); %median(mdn=pct74&r.i2,intvals=_pct73&r.MFT,intsize=_pct73w); %median(mdn=pct74&r.i3,intvals=_pct73&r.FFT,intsize=_pct73w); %median(mdn=pct74&r.i4,intvals=_pct73&r.NFTTOT,intsize=_pct73w); %median(mdn=pct74&r.i5,intvals=_pct73&r.MNFT,intsize=_pct73w); %median(mdn=pct74&r.i6,intvals=_pct73&r.FNFT,intsize=_pct73w); %median(mdn=hct37&r.i1,intvals=_hct36&r,intsize=_hct36w); %median(mdn=hct40&r.i1,intvals=_hct39&r,intsize=_hct39w); %median(mdn=hct42&r.i1,intvals=_hct41&r,intsize=_hct41w); %median(mdn=hct45&r.i1,intvals=_hct44&r.Mort,intsize=_hct44Mortw); %median(mdn=hct45&r.i2,intvals=_hct44&r.NoMort,intsize=_hct44NoMortw); %median(mdn=hct48&r.i1,intvals=_hct47tot,intsize=_hct47w); %median(mdn=hct48&r.i2,intvals=_hct47&r.Mort,intsize=_hct47w); %median(mdn=hct48&r.i3,intvals=_hct47&r.NoMort,intsize=_hct47w); the aggregation for up to 3 datasets -- based on the settypes parm. Invokes the %agg and %median macros *--We treat Median Value of Owner occ mobile homes (H82i1) as a mean because there is no distribution table for it.-; *--We treat the entire array of medians in PCT42 as means - no distributions.-; *---Big thing to do here is to replace the medians with values that we estimate from the corresponding distribution tables usoing the median macro. It requires as parms 2 arrays: 1 with values representing the widths of the array _p52w{16} _temporary_ (10000 8*5000 10000 15000 3*25000 50000 100000); %median(mdn=P53i1,intvals=_p52t,intsize=_p52w,samestep=0); array _p55t {16} _temporary_; %*--Do the medians for table 56 where we repeat the calculation for 7 different age categories--; %median(mdn=_p56mdn,intvals=_p55t,intsize=_p52w,samestep=1) ; %median(mdn=P77i1,intvals=_p76t,intsize=_p52w,samestep=1) ; %median(mdn=P80i1,intvals=_p79t,intsize=_p52w,samestep=1) ; array _p84w{20} _temporary_ ( 10*2500 6*5000, 2*10000 25000 50000); array _p84t{20} _temporary_; %median(mdn=P85i1,intvals=_p84t,intsize=_p84w,samestep=1); %median(mdn=P85i2,intvals=_p84t,intsize=_p84w,samestep=1); %median(mdn=P85i3,intvals=_p84t,intsize=_p84w,samestep=1); %median(mdn=P152&r.i1, intvals=_p151&r, intsize=_p52w, samestep=1); %median(mdn=P155&r.i1, intvals=_p154&r, intsize=_p52w, samestep=1); array _nfhhinc {16} _temporary_; %median(mdn=P156&r.i1, intvals=_nfhhinc, intsize=_p52w,samestep=1); array _h23w {9} _temporary_ (8*1 2); %median(mdn=H24i1,intvals=_h23t,intsize=_h23w,samestep=1); array _h26TotOcc{9} _temporary_; %median(mdn=H27i1,intvals=_h26TotOcc,intsize=_h23w,samestep=1); %median(mdn=H27i2,intvals=_h26Owner,intsize=_h23w,samestep=1); %median(mdn=H27i3,intvals=_h26renter,intsize=_h23w,samestep=1); array _h34w {9} _temporary_ (1.25 4 5 5*10 25); %median(mdn=_mednage,intvals=_h34t, intsize=_h34w,samestep=1); *--To get median year built we calculate age and subtract--; %median(mdn=_mednage, intvals=_h36owner, intsize=_h34w,samestep=1); %median(mdn=_mednage, intvals=_h36renter, intsize=_h34w,samestep=1); array _h38w {6} _temporary_ (1.25 4 5 10 10 20); array _h38total{6} _temporary_; %median(mdn=_yearsin,intvals=_h38owner,intsize=_h38w,samestep=1); %median(mdn=_yearsin,intvals=_h38renter,intsize=_h38w,samestep=1); %median(mdn=_yearsin,intvals=_H38total,intsize=_h38w,samestep=1); array _h54w{21} _temporary_ (100 50 50 50 50 50 50 50 50 50 50 50 50 50 50 100 100 250 250 500 1000); %median(Q1=H55i1, intvals=_h54t, intsize=_h54w,samestep=1); %median(mdn=H56i1, intvals=_h54t, intsize=_h54w,samestep=1); %median(Q3=H57i1, intvals=_h54t, intsize=_h54w,samestep=1); %median(mdn=H60i1,intvals=_h59t,intsize=_h54w,samestep=1); %median(mdn=H63i1,intvals=_h62t,intsize=_h54w,samestep=1); array _h69w{9} _temporary_ (10 6*5 10 15); %median(mdn=H70i1,intvals=_h69t,intsize=_h69w,samestep=1); array _h74w{24} _temporary_ (10000 6*5000 6*10000 4*25000 2*50000 2*100000 2*250000 500000); %median(Q1=H75i1, intvals=_h74t, intsize=_h74w,samestep=1); %median(mdn=H76i1, intvals=_h74t, intsize=_h74w,samestep=1); %median(Q3=H77i1, intvals=_h74t, intsize=_h74w,samestep=1); %median(mdn=H85i1, intvals=_h84t, intsize=_h74w,samestep=1); %median(mdn=H88i1,intvals=_h87t,intsize=_h74w,samestep=1); array _h90wMort{15} _temporary_ (200 8*100 2*250 3*500 1000); array _h90wNoMort{14} _temporary_ (100 6*50 6*100 200); %median(mdn=H91i1,intvals=_h90tMort,intsize=_h90wMort,samestep=1); %median(mdn=H91i2,intvals=_h90tNoMort,intsize=_h90wNoMort,samestep=1); array _h94tTotal{9} _temporary_; %median(mdn=H95i1,intvals=_h94tTotal,intsize=_h69w,samestep=1); %median(mdn=H95i2,intvals=_h94tMort,intsize=_h69w,samestep=1); %median(mdn=H95i3,intvals=_h94tNoMort,intsize=_h69w,samestep=1); *----Round off the medians, weighted averages, etc.-----------------------*; array _pct38w{16} _temporary_ (10000 8*5000 10000 15000 3*25000 50000 100000); array _pct38TOTFAMt(16) _temporary_; array _pct38NOKIDSt(16) _temporary_; array _pct38KIDSt(16) _temporary_; %*--aggregate to get the tally arrays for the 3 medians in pct39--; %median(mdn=pct39i1,intvals=_pct38TOTFAMt,intsize=_pct38w,samestep=0); %median(mdn=pct39i2,intvals=_pct38KIDSt,intsize=_pct38w,samestep=1); %median(mdn=pct39i3,intvals=_pct38NOKIDSt,intsize=_pct38w,samestep=1); array _pct38MCt(16) _temporary_; array _pct38OFAMt(16) _temporary_; *--Other family-; array _pct38MHHNWt(16) _temporary_; array _pct38FHHNHt(16) _temporary_; %median(mdn=pct40i2,intvals=_pct38MCt,intsize=_pct38w,samestep=1); %median(mdn=pct40i3,intvals=_pct38MCKIDSt,intsize=_pct38w,samestep=1); %median(mdn=pct40i4,intvals=_pct38MCNOKIDSt,intsize=_pct38w,samestep=1); %median(mdn=pct40i5,intvals=_pct38OFAMt,intsize=_pct38w,samestep=1); %median(mdn=pct40i6,intvals=_pct38MHHNWt,intsize=_pct38w,samestep=1); %median(mdn=pct40i7,intvals=_pct38MHHNWKIDSt,intsize=_pct38w,samestep=1); %median(mdn=pct40i8,intvals=_pct38MHHNWNOKIDSt,intsize=_pct38w,samestep=1); %median(mdn=pct40i9,intvals=_pct38FHHNHt,intsize=_pct38w,samestep=1); %median(mdn=pct40i10,intvals=_pct38FHHNHKIDSt,intsize=_pct38w,samestep=1); %median(mdn=pct40i11,intvals=_pct38FHHNHNOKIDSt,intsize=_pct38w,samestep=1); array _pct44w(20) _temporary_ (2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 5000, 5000, array _pct44MTOT(20) _temporary_; array _pct44FTOT(20) _temporary_; %median(mdn=pct45i1,intvals=_pct44MTOT,intsize=_pct44w,samestep=0); %median(mdn=pct45i2,intvals=_pct44MFT,intsize=_pct44w,samestep=0); %median(mdn=pct45i3,intvals=_pct44MNFT,intsize=_pct44w,samestep=0); %median(mdn=pct45i4,intvals=_pct44FTOT,intsize=_pct44w,samestep=0); %median(mdn=pct45i5,intvals=_pct44FFT,intsize=_pct44w,samestep=0); %median(mdn=pct45i6,intvals=_pct44FNFT,intsize=_pct44w,samestep=0); array _pct46w(20) _temporary_ (10*2500 6*5000 2*10000 25000 50000); array _pct46MTOT(20) _temporary_; array _pct46FTOT(20) _temporary_; array _PCT46fttot(20) _temporary_; array _PCT46nfttot(20) _temporary_; %median(mdn=pct47i1,intvals=_pct46fttot,intsize=_pct46w,samestep=0); %median(mdn=pct47i2,intvals=_pct46MFT,intsize=_pct46w,samestep=0); %median(mdn=pct47i3,intvals=_pct46FFT,intsize=_pct46w,samestep=0); %median(mdn=pct47i4,intvals=_pct46nfttot,intsize=_pct46w,samestep=0); %median(mdn=pct47i5,intvals=_pct46MNFT,intsize=_pct46w,samestep=0); %median(mdn=pct47i6,intvals=_pct46FNFT,intsize=_pct46w,samestep=0); array _hct11Total(11) _temporary_; array _hct11w(11) _temporary_ ( 5*5000 10000 15000 2*25000 50000 100000); %median(mdn=hct12i1,intvals=_hct11total,intsize=_hct11w,samestep=1); %median(mdn=hct12i2,intvals=_hct11owner,intsize=_hct11w,samestep=1); %median(mdn=hct12i3,intvals=_hct11renter,intsize=_hct11w,samestep=1); array _hct19w(15) _temporary_ (0 200 2*100 3*200 2*500 3*1000 2*2500 3500); %median(mdn=hct20i1,intvals=_hct19,intsize=_hct19w,samestep=1); *----Round off the medians and weighted averages-----------------------*; array _pct73w (20) _temporary_ (10*2500 6*5000 2*10000 25000 50000); medians associated with those arrays in the pct74 tables. Time to loop. --; array _pct73&r.FTTOT(20) _temporary_; array _pct73&r.NFTTOT(20) _temporary_; %median(mdn=pct74&r.i1,intvals=_pct73&r.FTTOT,intsize=_pct73w,samestep=1); %median(mdn=pct74&r.i2,intvals=_pct73&r.MFT,intsize=_pct73w,samestep=1); %median(mdn=pct74&r.i3,intvals=_pct73&r.FFT,intsize=_pct73w,samestep=1); %median(mdn=pct74&r.i4,intvals=_pct73&r.NFTTOT,intsize=_pct73w,samestep=1); %median(mdn=pct74&r.i5,intvals=_pct73&r.MNFT,intsize=_pct73w,samestep=1); %median(mdn=pct74&r.i6,intvals=_pct73&r.FNFT,intsize=_pct73w,samestep=1); array _hct36w(21) _temporary_ (100 14*50 2*100 2*250 500 750); %median(mdn=hct37&r.i1,intvals=_hct36&r,intsize=_hct36w,samestep=1); array _hct39w(9) _temporary_ (10 6*5 10 15); %median(mdn=hct40&r.i1,intvals=_hct39&r,intsize=_hct39w,samestep=1); array _hct41w(24) _temporary_ (10000 6*5000 6*10000 4*25000 2*50000 2*100000 2*250000 500000); %median(mdn=hct42&r.i1,intvals=_hct41&r,intsize=_hct41w,samestep=1); array _hct44Mortw(15) _temporary_ (200 8*100 2*250 3*500 750); array _hct44NoMortw(14) _temporary_ (100 6*50 6*100 1100); %median(mdn=hct45&r.i1,intvals=_hct44&r.Mort,intsize=_hct44Mortw,samestep=1); %median(mdn=hct45&r.i2,intvals=_hct44&r.NoMort,intsize=_hct44NoMortw,samestep=1); array _hct47w(9) _temporary_ (10 6*5 10 15); array _hct47tot(9) _temporary_; %median(mdn=hct48&r.i1,intvals=_hct47tot,intsize=_hct47w,samestep=1); %median(mdn=hct48&r.i2,intvals=_hct47&r.Mort,intsize=_hct47w,samestep=1); %median(mdn=hct48&r.i3,intvals=_hct47&r.NoMort,intsize=_hct47w,samestep=1); drop _haf -- _slot2 _q1 _q3; *--temp vars used by median macro--;