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 (January 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 13 Jan 2004 14:12:31 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: TRANSPOSE and Analysis of the Distribution
Comments:   To: Dave Sorensen <Dave.Sorensen@JUR.KU.DK>

Hi again Dave,

Do you want to count the non-missing burglary entries at each address? You don't need to transpose again, use the "n" function.

Data burgs; Set burgs; Num_Burgs=n(of COL1-COL30); Run;

There are many other statistical functions in datastep statements - look at descriptive and probability in SAS Online.Doc:

http://v8doc.sas.com/sashtml/lgref/z0245860.htm

hth

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: Dave Sorensen [mailto:Dave.Sorensen@JUR.KU.DK] Sent: Tuesday, January 13, 2004 11:39 AM To: SAS-L@LISTSERV.UGA.EDU Subject: TRANSPOSE and Analysis of the Distribution

Hi SAS-L,

I have a dataset with 30,958 cases of burglary reported to the police during a one year period. I am interested in how many burglaries occured at each unique address. Since my unit of analysis was burglary reports (each of which contains an addresses), I ran PROC TRANSPOSE so I could find out how many times each address shows up in the dataset.

So now I have a transposed dataset containing 32 variables: COL1...COL30, Address, and _Name_.

I'd like to create a variable called "Num_Burgs" (which combines COL1...COL30) so that I could analyze its distribution and detrmine whether it is attributable to chance. I presume that requires transposing my data again. But how? Could someone give me the code?

My dataset has 30,958 burglaries occurring at 29,491 unique residences. Data from around the world indicate a very skewed distribution for burglary - where a small proportion of households experience a comparatively large proportion of all burglaries. But my Danish data don't seem to follow that trend. Some hand calculations based on the first transpose indicate the following:

Times This % Experienced this Burgled of address % of all burglaries

1 95.5% 91.0% 2 4.11 7.82 3 0.28 0.80 3 to 30 0.07 0.36

Thanks, Dave S., cross-eyed at U of Copenhagen


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