|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|
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.
There are many other statistical functions in datastep statements - look at
descriptive and probability in SAS Online.Doc:
DDS Data Extraction
From: Dave Sorensen [mailto:Dave.Sorensen@JUR.KU.DK]
Sent: Tuesday, January 13, 2004 11:39 AM
Subject: TRANSPOSE and Analysis of the Distribution
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
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
Dave S., cross-eyed at
U of Copenhagen