[Fwd: Table of frequencies]

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fwd: Table of frequencies]

Mark Webb-5


Is it possible to get a table of frequencies as shown below when the ranges [1-10 below] are common across questions? [Common rating type data]
The frequency function supplies separate results per variable.
I don't have custom tables. Have version 17.



Frequencies / Counts


Q1 Q2 Q3

1 4 4 3

2 3 5 5

3 5 6 6

4 4 3 2

5 5 4 3

6 3 5 4

7 2 2 2

8 3 3 4

9 4 4 3

10 3 0 4


36 36 36











--
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]

--
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Table of frequencies

Spousta Jan
Hi Mark,
 
You can re-structure the file and use crosstabs. E.g.:
 

GET FILE='C:\Program Files\SPSS14\GSS93 subset.sav' /keep id bigband to musicals.

mis val all ().

VARSTOCASES /MAKE trans1 FROM bigband blugrass country blues musicals

  /INDEX = Index1(trans1)

  /KEEP = id

  /NULL = KEEP.

var lab Index1 "Variable" /trans1 "Value".

CROSSTABS

  /TABLES=trans1 BY Index1

  /FORMAT= AVALUE TABLES

  /CELLS= COUNT

  /COUNT ROUND CELL .

 

Best regards,

Jan

 
 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Webb
Sent: Wednesday, October 21, 2009 12:11 PM
To: [hidden email]
Subject: [Fwd: Table of frequencies]



Is it possible to get a table of frequencies as shown below when the ranges [1-10 below] are common across questions? [Common rating type data]
The frequency function supplies separate results per variable.
I don't have custom tables. Have version 17.

<!--[if supportMisalignedColumns]--> <!--[endif]-->


Frequencies / Counts


Q1 Q2 Q3

1 4 4 3

2 3 5 5

3 5 6 6

4 4 3 2

5 5 4 3

6 3 5 4

7 2 2 2

8 3 3 4

9 4 4 3

10 3 0 4


36 36 36











--
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]

--
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD  

_____________

Tato zpráva a všechny připojené soubory jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem.

P Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu.

 


This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission.

 

P Are you sure that you really need a print version of this message and/or its attachments? Think about nature.

-.- --
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Table of frequencies]

Art Kendall
In reply to this post by Mark Webb-5
Look up MULT RESPONSE under help. Something like this untested syntax should work.
the stuff about gender is just to demo what you might also want to do.

MULT RESPONSE /GROUPS= myquestions 'a label for the set' (q1 to q3(1,10))
 /Variables = gender(1,2) SES(1,7)
 /Frequencies =myquestions
 /Tables= myquestions by gender, SES.



Art Kendall
Social Research Consultants

Mark Webb wrote:


Is it possible to get a table of frequencies as shown below when the ranges [1-10 below] are common across questions? [Common rating type data]
The frequency function supplies separate results per variable.
I don't have custom tables. Have version 17.



Frequencies / Counts


Q1 Q2 Q3

1 4 4 3

2 3 5 5

3 5 6 6

4 4 3 2

5 5 4 3

6 3 5 4

7 2 2 2

8 3 3 4

9 4 4 3

10 3 0 4


36 36 36
















--
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]

--
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Table of frequencies]

ViAnn Beadle
In reply to this post by Mark Webb-5

Without Custom Tables, you will have to use VARSTOCASES to convert your three variables into three cases and then crosstab your values variable against the index variable.  You’ll probably have to strip off the row totals from the crosstab before reporting the results.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Webb
Sent: Wednesday, October 21, 2009 4:11 AM
To: [hidden email]
Subject: [Fwd: Table of frequencies]

 



Is it possible to get a table of frequencies as shown below when the ranges [1-10 below] are common across questions? [Common rating type data]
The frequency function supplies separate results per variable.
I don't have custom tables. Have version 17.

Frequencies / Counts

Q1

Q2

Q3

1

4

4

3

2

3

5

5

3

5

6

6

4

4

3

2

5

5

4

3

6

3

5

4

7

2

2

2

8

3

3

4

9

4

4

3

10

3

0

4

36

36

36



--
Mark Webb
 
+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]



--
Mark Webb
 
+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Zip code to US region

Mike Pritchard

Does anyone have syntax to share to convert Zip codes to US regions?  I’m only  trying to create 4 regions (West, Midwest, South, Northeast) , but the maps I’ve found lead me to question whether I’m missing some of the codes.

 

Here’s what I’m using right now (very inelegant).

 

IF  (CHAR.SUBSTR(Zip,1,1)='9') Region_Combined=1.

IF  ((CHAR.SUBSTR(Zip,1,1)='8') OR (CHAR.SUBSTR(Zip,1,2)='59')) Region_Combined=1.

IF  (CHAR.SUBSTR(Zip,1,1)='6')  Region_Combined=2.

IF  ((CHAR.SUBSTR(Zip,1,2)~='59') AND (CHAR.SUBSTR(Zip,1,1)='5')) Region_Combined=2.

IF  ((CHAR.SUBSTR(Zip,1,2)='49') OR (CHAR.SUBSTR(Zip,1,2)='48')

OR (CHAR.SUBSTR(Zip,1,2)='47') OR (CHAR.SUBSTR(Zip,1,2)='46')

OR (CHAR.SUBSTR(Zip,1,2)='45') OR (CHAR.SUBSTR(Zip,1,2)='44')

OR (CHAR.SUBSTR(Zip,1,2)='43'))  Region_Combined=2.

IF  ((CHAR.SUBSTR(Zip,1,2)='40') OR (CHAR.SUBSTR(Zip,1,2)='41') OR (CHAR.SUBSTR(Zip,1,2)='42')) Region_Combined=3.

IF  (CHAR.SUBSTR(Zip,1,1)='2')  Region_Combined=3.

IF  ((CHAR.SUBSTR(Zip,1,1)='1') OR (CHAR.SUBSTR(Zip,1,1)='0')) Region_Combined=4.

EXECUTE.

 

Thanks

Mike

 

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410


Reply | Threaded
Open this post in threaded view
|

Re: Zip code to US region

Richard Ristow
At 12:44 AM 10/24/2009, Mike Pritchard wrote:

Does anyone have syntax to share to convert Zip codes to US regions?  I’m only  trying to create 4 regions (West, Midwest, South, Northeast) , but the maps I’ve found lead me to question whether I’m missing some of the codes.

As for missing some of the codes, I can't help you. But here's another way (not tested, and CHECK the logic) of writing your code:

STRING  #First1  (A1)
        #First2  (A2).

COMPUTE #First1 = CHAR.SUBSTR(Zip,1,1).
COMPUTE #First2 = CHAR.SUBSTR(Zip,1,2).


RECODE #First1
    ('9'       = 1)
    ('8'       = 1)
    ('6'       = 2)
    ('5'       = 2)
    ('2'       = 3)
    ('1', '0'  = 4)
    INTO Region_Combined.

RECODE #First2
    ('59'                               = 1)
    ('49','48','47','46','45','44','43' = 2)
    ('40','41','42'                     = 3)
    INTO Region_Combined.

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Zip code to US region

Eric Langston
In reply to this post by Mike Pritchard

Mike-

 

I’ve included a list below of the state allocation of ZIP code based on the first digit.  The first and second digits together don’t necessary follow a logical grouping, except in as much as it is a group of 3 digit ZIP codes.  The first 3 digits of the ZIP code designate the “sectional center facility” that the post office uses.  Typically a 3 digit ZIP code does not cross state lines, except in some (typically rural) areas where it is easier to service – for example, because the edge of the state is on the other side of a mountain range and thus, the neighboring state could deliver the mail without having to drive over the mountain every day.

 

It seems that you would only need the first digit to create the regions you are looking for.  Here is a link to a map that shows what the breakdown would be (picture from Wikipedia).

 

As always, elegant syntax from Richard.

 

Hope that helps,

-Eric

 

 

 

 

The first digit of the ZIP code is allocated as follows:

§  0 = Connecticut (CT), Massachusetts (MA), Maine (ME), New Hampshire (NH), New Jersey (NJ), Puerto Rico (PR), Rhode Island (RI), Vermont (VT), Virgin Islands (VI), Army Post Office Europe (AE), Fleet Post Office Europe (AE)

§  1 = Delaware (DE), New York (NY), Pennsylvania (PA)

§  2 = District of Columbia (DC), Maryland (MD), North Carolina (NC), South Carolina (SC), Virginia (VA), West Virginia (WV)

§  3 = Alabama (AL), Florida (FL), Georgia (GA), Mississippi (MS), Tennessee (TN), Army Post Office Americas (AA), Fleet Post Office Americas (AA)

§  4 = Indiana (IN), Kentucky (KY), Michigan (MI), Ohio (OH)

§  5 = Iowa (IA), Minnesota (MN), Montana (MT), North Dakota (ND), South Dakota (SD), Wisconsin (WI)

§  6 = Illinois (IL), Kansas (KS), Missouri (MO), Nebraska (NE)

§  7 = Arkansas (AR), Louisiana (LA), Oklahoma (OK), Texas (TX)

§  8 = Arizona (AZ), Colorado (CO), Idaho (ID), New Mexico (NM), Nevada (NV), Utah (UT), Wyoming (WY)

§  9 = Alaska (AK), American Samoa (AS), California (CA), Guam (GU), Hawaii (HI), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Oregon (OR), Palau (PW), Washington (WA), Army Post Office Pacific (AP), Fleet Post Office Pacific (AP)

 

 

From: Richard Ristow [mailto:[hidden email]]
Sent: Tuesday, October 27, 2009 12:28 AM
Subject: Re: Zip code to US region

 

At 12:44 AM 10/24/2009, Mike Pritchard wrote:


Does anyone have syntax to share to convert Zip codes to US regions?  I’m only  trying to create 4 regions (West, Midwest, South, Northeast) , but the maps I’ve found lead me to question whether I’m missing some of the codes.


As for missing some of the codes, I can't help you. But here's another way (not tested, and CHECK the logic) of writing your code:

STRING  #First1  (A1)
        #First2  (A2).

COMPUTE #First1 = CHAR.SUBSTR(Zip,1,1).
COMPUTE #First2 = CHAR.SUBSTR(Zip,1,2).


RECODE #First1
    ('9'       = 1)
    ('8'       = 1)
    ('6'       = 2)
    ('5'       = 2)
    ('2'       = 3)
    ('1', '0'  = 4)
    INTO Region_Combined.

RECODE #First2
    ('59'                               = 1)
    ('49','48','47','46','45','44','43' = 2)
    ('40','41','42'                     = 3)
    INTO Region_Combined.

 

Reply | Threaded
Open this post in threaded view
|

Regression Analysis Questions

Kurt Wilkening

We administer an employment test here in our office for Detention Deputy Trainee and want to adjust the test's cutoff score to match the cutoff score of a state exam. Below I have copied the raw scores of actual candidates who took both exams. D=Detention Deputy scores, whereas F Act=State exam scores. If the state's cutoff score is 77, what should be the cutoff score be for our D exam?

 

D

F Act

38

87

40

79

44

89

46

83

46

88

46

88

46

86

46

82

47

83

49

89

49

93

49

91

49

87

49

82

50

86

50

88

50

85

50

92

50

93

51

82

51

91

51

86

51

88

52

90

52

90

52

82

52

88

52

95

53

87

53

81

53

87

53

86

53

90

54

83

54

83

54

95

54

89

55

91

55

85

55

92

55

86

56

88

56

95

56

93

56

84

57

96

57

96

57

92

57

88

57

91

57

85

57

93

58

94

58

91

58

95

58

93

59

91

60

94

60

94

60

96

60

92

61

96

 

When using SPSS Regression Analysis to predict one score from another, when F Act is 77, what is the predicted value of D? What consideration should I be using to account for the fact there are no F Act scores lower than a 79, and I am trying to predict a D score from a F Act score outside the range of data on hand?

 

Thanks for your help.

 

Regards,

 

Kurt Wilkening, Division Chief

Recruiting, Testing, and Certification
Hillsborough County Civil Service Board
601 E. Kennedy Blvd., 17th Floor
Tampa, Florida 33602
(813) 274-6764 (Direct)

 

CONFIDENTIALITY NOTICE - The information contained in this transmission may contain privileged and confidential information.  It is intended only for the use of the person(s) named above. If you are not the intended recipient,  you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Eric Langston
Sent: Wednesday, October 28, 2009 10:01 AM
To: [hidden email]
Subject: Re: Zip code to US region

 

Mike-

 

I’ve included a list below of the state allocation of ZIP code based on the first digit.  The first and second digits together don’t necessary follow a logical grouping, except in as much as it is a group of 3 digit ZIP codes.  The first 3 digits of the ZIP code designate the “sectional center facility” that the post office uses.  Typically a 3 digit ZIP code does not cross state lines, except in some (typically rural) areas where it is easier to service – for example, because the edge of the state is on the other side of a mountain range and thus, the neighboring state could deliver the mail without having to drive over the mountain every day.

 

It seems that you would only need the first digit to create the regions you are looking for.  Here is a link to a map that shows what the breakdown would be (picture from Wikipedia).

 

As always, elegant syntax from Richard.

 

Hope that helps,

-Eric

 

 

 

 

The first digit of the ZIP code is allocated as follows:

§  0 = Connecticut (CT), Massachusetts (MA), Maine (ME), New Hampshire (NH), New Jersey (NJ), Puerto Rico (PR), Rhode Island (RI), Vermont (VT), Virgin Islands (VI), Army Post Office Europe (AE), Fleet Post Office Europe (AE)

§  1 = Delaware (DE), New York (NY), Pennsylvania (PA)

§  2 = District of Columbia (DC), Maryland (MD), North Carolina (NC), South Carolina (SC), Virginia (VA), West Virginia (WV)

§  3 = Alabama (AL), Florida (FL), Georgia (GA), Mississippi (MS), Tennessee (TN), Army Post Office Americas (AA), Fleet Post Office Americas (AA)

§  4 = Indiana (IN), Kentucky (KY), Michigan (MI), Ohio (OH)

§  5 = Iowa (IA), Minnesota (MN), Montana (MT), North Dakota (ND), South Dakota (SD), Wisconsin (WI)

§  6 = Illinois (IL), Kansas (KS), Missouri (MO), Nebraska (NE)

§  7 = Arkansas (AR), Louisiana (LA), Oklahoma (OK), Texas (TX)

§  8 = Arizona (AZ), Colorado (CO), Idaho (ID), New Mexico (NM), Nevada (NV), Utah (UT), Wyoming (WY)

§  9 = Alaska (AK), American Samoa (AS), California (CA), Guam (GU), Hawaii (HI), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Oregon (OR), Palau (PW), Washington (WA), Army Post Office Pacific (AP), Fleet Post Office Pacific (AP)

 

 

From: Richard Ristow [mailto:[hidden email]]
Sent: Tuesday, October 27, 2009 12:28 AM
Subject: Re: Zip code to US region

 

At 12:44 AM 10/24/2009, Mike Pritchard wrote:

Does anyone have syntax to share to convert Zip codes to US regions?  I’m only  trying to create 4 regions (West, Midwest, South, Northeast) , but the maps I’ve found lead me to question whether I’m missing some of the codes.


As for missing some of the codes, I can't help you. But here's another way (not tested, and CHECK the logic) of writing your code:

STRING  #First1  (A1)
        #First2  (A2).

COMPUTE #First1 = CHAR.SUBSTR(Zip,1,1).
COMPUTE #First2 = CHAR.SUBSTR(Zip,1,2).


RECODE #First1
    ('9'       = 1)
    ('8'       = 1)
    ('6'       = 2)
    ('5'       = 2)
    ('2'       = 3)
    ('1', '0'  = 4)
    INTO Region_Combined.

RECODE #First2
    ('59'                               = 1)
    ('49','48','47','46','45','44','43' = 2)
    ('40','41','42'                     = 3)
    INTO Region_Combined.

 

__________________
THINK AT THE SINK!
During this ongoing drought, every drop of water counts.
Learn how you can cut water use at http://www.hillsboroughcounty.org/water/conserve
Reply | Threaded
Open this post in threaded view
|

Re: Regression Analysis Questions

Steve Simon, P.Mean Consulting
Wilkening, Kurt wrote:

> We administer an employment test here in our office for Detention Deputy
> Trainee and want to adjust the test's cutoff score to match the cutoff
> score of a state exam. Below I have copied the raw scores of actual
> candidates who took both exams. D=Detention Deputy scores, whereas F
> Act=State exam scores. If the state's cutoff score is 77, what should be
> the cutoff score be for our D exam?

Interesting question. I don't think that regression will help here.
Instead, if you are comfortable with an assumption that the data is
normally distributed, then note that the mean and standard deviation of
F Act are 89.0 and 4.4. That means that a cutoff of 77 corresponds to a
z-score of -2.73 (= (77-89)/4.4).

In the D scores, the mean and standard deviation are 52.8 and 4.9. A
z-score of -2.73 would be equal to 39.4 (= 52.8-2.73*4.9) on this scale.

So 39.4 is a good cut-off, if the data is normally distributed, in the
sense that the same proportions are likely to pass using this cutoff. If
you are uncomfortable with the normality assumption, you could fit a
different distribution to account for the slight skewness in your data
and equate the percentiles of the distributions.

Everything is going to be an extrapolation beyond the range of your
data, but only slightly so.

Could I use your data on my website? It's an interesting application of
z-scores.
--
Steve Simon, Standard Disclaimer
Second free statistics webinar, Wed, Nov 4, 11am-noon CST.
"The first three steps in data entry, with examples in PASW/SPSS"
Details at www.pmean.com/webinars

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Regression Analysis Questions

Sonia Brandon
In reply to this post by Kurt Wilkening
Not knowing exactly the content of these tests, I would say regression is not
the correct method.  I would suggest you get ahold of Kolen and Brennan's book
Test Equating, Scaling, and Linking: Methods and Practices.  From your
description, it sounds like you want to equate the two exams.  Perhaps
equipercentile methods?  Not sure since, like I said, I don't know the content
well enough to know if the two tests are parallel.  Consult the book.  It is a
GREAT resource.

Sonia

Sonia Brandon, Ph.D.
Director, Institutional Research
Mesa State College
1100 North Avenue
Grand Junction, CO  81501
phone: (970) 248-1884
fax:  (970) 248-1812
email: [hidden email]


>>> "Wilkening, Kurt" <[hidden email]> 10/28/2009 8:47 AM
>>>
We administer an employment test here in our office for Detention Deputy
Trainee and want to adjust the test's cutoff score to match the cutoff score of
a state exam. Below I have copied the raw scores of actual candidates who took
both exams. D=Detention Deputy scores, whereas F Act=State exam scores. If the
state's cutoff score is 77, what should be the cutoff score be for our D exam?

D

F Act

38

87

40

79

44

89

46

83

46

88

46

88

46

86

46

82

47

83

49

89

49

93

49

91

49

87

49

82

50

86

50

88

50

85

50

92

50

93

51

82

51

91

51

86

51

88

52

90

52

90

52

82

52

88

52

95

53

87

53

81

53

87

53

86

53

90

54

83

54

83

54

95

54

89

55

91

55

85

55

92

55

86

56

88

56

95

56

93

56

84

57

96

57

96

57

92

57

88

57

91

57

85

57

93

58

94

58

91

58

95

58

93

59

91

60

94

60

94

60

96

60

92

61

96


When using SPSS Regression Analysis to predict one score from another, when F
Act is 77, what is the predicted value of D? What consideration should I be
using to account for the fact there are no F Act scores lower than a 79, and I
am trying to predict a D score from a F Act score outside the range of data on
hand?

Thanks for your help.

Regards,

Kurt Wilkening, Division Chief
Recruiting, Testing, and Certification
Hillsborough County Civil Service Board
601 E. Kennedy Blvd., 17th Floor
Tampa, Florida 33602
(813) 274-6764 (Direct)

CONFIDENTIALITY NOTICE - The information contained in this transmission may
contain privileged and confidential information.  It is intended only for the
use of the person(s) named above. If you are not the intended recipient,  you
are hereby notified that any review, dissemination, distribution or duplication
of this communication is strictly prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies of
the original message.

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Eric
Langston
Sent: Wednesday, October 28, 2009 10:01 AM
To: [hidden email]
Subject: Re: Zip code to US region

Mike-

I've included a list below of the state allocation of ZIP code based on the
first digit.  The first and second digits together don't necessary follow a
logical grouping, except in as much as it is a group of 3 digit ZIP codes.  The
first 3 digits of the ZIP code designate the "sectional center facility" that
the post office uses.  Typically a 3 digit ZIP code does not cross state lines,
except in some (typically rural) areas where it is easier to service - for
example, because the edge of the state is on the other side of a mountain range
and thus, the neighboring state could deliver the mail without having to drive
over the mountain every day.

It seems that you would only need the first digit to create the regions you are
looking for.  Here is a link to a map that shows what the breakdown would be
(picture from Wikipedia<http://en.wikipedia.org/wiki/File:ZIP_Code_zones.svg>).

As always, elegant syntax from Richard.

Hope that helps,
-Eric




The first digit of the ZIP code is allocated as follows:
§  0 = Connecticut (CT), Massachusetts (MA), Maine (ME), New Hampshire (NH),
New Jersey (NJ), Puerto Rico (PR), Rhode Island (RI), Vermont (VT), Virgin
Islands (VI), Army Post Office Europe (AE), Fleet Post Office Europe (AE)
§  1 = Delaware (DE), New York (NY), Pennsylvania (PA)
§  2 = District of Columbia (DC), Maryland (MD), North Carolina (NC), South
Carolina (SC), Virginia (VA), West Virginia (WV)
§  3 = Alabama (AL), Florida (FL), Georgia (GA), Mississippi (MS), Tennessee
(TN), Army Post Office Americas (AA), Fleet Post Office Americas (AA)
§  4 = Indiana (IN), Kentucky (KY), Michigan (MI), Ohio (OH)
§  5 = Iowa (IA), Minnesota (MN), Montana (MT), North Dakota (ND), South Dakota
(SD), Wisconsin (WI)
§  6 = Illinois (IL), Kansas (KS), Missouri (MO), Nebraska (NE)
§  7 = Arkansas (AR), Louisiana (LA), Oklahoma (OK), Texas (TX)
§  8 = Arizona (AZ), Colorado (CO), Idaho (ID), New Mexico (NM), Nevada (NV),
Utah (UT), Wyoming (WY)
§  9 = Alaska (AK), American Samoa (AS), California (CA), Guam (GU), Hawaii
(HI), Marshall Islands (MH), Federated States of Micronesia (FM), Northern
Mariana Islands (MP), Oregon (OR), Palau (PW), Washington (WA), Army Post Office
Pacific (AP), Fleet Post Office Pacific (AP)


From: Richard Ristow [mailto:[hidden email]]
Sent: Tuesday, October 27, 2009 12:28 AM
Subject: Re: Zip code to US region

At 12:44 AM 10/24/2009, Mike Pritchard wrote:

Does anyone have syntax to share to convert Zip codes to US regions?  I'm only
trying to create 4 regions (West, Midwest, South, Northeast) , but the maps I've
found lead me to question whether I'm missing some of the codes.

As for missing some of the codes, I can't help you. But here's another way (not
tested, and CHECK the logic) of writing your code:

STRING  #First1  (A1)
        #First2  (A2).

COMPUTE #First1 = CHAR.SUBSTR(Zip,1,1).
COMPUTE #First2 = CHAR.SUBSTR(Zip,1,2).


RECODE #First1
    ('9'       = 1)
    ('8'       = 1)
    ('6'       = 2)
    ('5'       = 2)
    ('2'       = 3)
    ('1', '0'  = 4)
    INTO Region_Combined.

RECODE #First2
    ('59'                               = 1)
    ('49','48','47','46','45','44','43' = 2)
    ('40','41','42'                     = 3)
    INTO Region_Combined.

__________________
THINK AT THE SINK!
During this ongoing drought, every drop of water counts.
Learn how you can cut water use at
http://www.hillsboroughcounty.org/water/conserve

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Regression Analysis Questions

Marija Norusis
In reply to this post by Kurt Wilkening
One question that arises is how do the people who take the test in your office differ from the people who were used for standardizing the state exam? Is there any reason that you would expect the same percent to fail your test as fail the state's test or to have the same distribution of scores? If the people who show up at your office are better qualified than the group taking the state test you certainly don't want to penalize them by failing the same percentage.
 
The real question is what is your goal? Do you want to spare candidates from taking the state exam, substituting your own in its place? If so you're probably going to have to administer your test to more people and perhaps different types of people. Do you just want to be as "tough" as the state and fail the same percentage? What are the consequences of incorrectly predicting a fail on the state test based on your test? Or incorrectly predicting a pass?
 
 
 
In a message dated 10/28/2009 10:40:09 A.M. Central Daylight Time, [hidden email] writes:
Wilkening, Kurt wrote:

> We administer an employment test here in our office for Detention Deputy
> Trainee and want to adjust the test's cutoff score to match the cutoff
> score of a state exam. Below I have copied the raw scores of actual
> candidates who took both exams. D=Detention Deputy scores, whereas F
> Act=State exam scores. If the state's cutoff score is 77, what should be
> the cutoff score be for our D exam?

Interesting question. I don't think that regression will help here.
Instead, if you are comfortable with an assumption that the data is
normally distributed, then note that the mean and standard deviation of
F Act are 89.0 and 4.4. That means that a cutoff of 77 corresponds to a
z-score of -2.73 (= (77-89)/4.4).

In the D scores, the mean and standard deviation are 52.8 and 4.9. A
z-score of -2.73 would be equal to 39.4 (= 52.8-2.73*4.9) on this scale.

So 39.4 is a good cut-off, if the data is normally distributed, in the
sense that the same proportions are likely to pass using this cutoff. If
you are uncomfortable with the normality assumption, you could fit a
different distribution to account for the slight skewness in your data
and equate the percentiles of the distributions.

Everything is going to be an extrapolation beyond the range of your
data, but only slightly so.
 
Reply | Threaded
Open this post in threaded view
|

Re: Zip code to US region

Mike Pritchard
In reply to this post by Eric Langston

Thanks Eric.  The list of codes you provided is helpful.  I was already using the Wikipedia picture, but on looking again I see that is a little clearer in color – so I’m printing again.

 

However, I don’t think I can avoid using 2 digits to get the split I want.  This map is supposed to be based on US Census information.  I couldn’t easily find it there, but it is on the Energy Information Administration site at http://www.eia.doe.gov/emeu/reps/maps/us_census.html.  This link was provided to me by e-Rewards, one of the online panel companies, and is what they use to identify panelist location.

 

You can see from the EIA map that Montana is in the West region.  No surprise to me living in Seattle.  Where I was having most trouble was the boundaries between Midwest, South, and Northeast.  It looks like Kentucky is classified in the South (again no surprise) which means 40-42 has to be identified.  Also there are a couple of 3 digit exceptions from the Wikipedia information.  005 for NY is no problem for the 4 region split, but 569 for DC and 885 for TX should be accounted for if you want a more accurate distribution.  Fortunately my data doesn’t have either 569 or 885.

 

Mike

 

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410
Helping companies delight their customers to increase profits
Signup for SurveyTips and Seminar announcements

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.


From: Eric Langston [mailto:[hidden email]]
Sent: Wednesday, October 28, 2009 7:01 AM
To: Richard Ristow; Mike Pritchard
Cc: [hidden email]
Subject: RE: Zip code to US region

 

Mike-

 

I’ve included a list below of the state allocation of ZIP code based on the first digit.  The first and second digits together don’t necessary follow a logical grouping, except in as much as it is a group of 3 digit ZIP codes.  The first 3 digits of the ZIP code designate the “sectional center facility” that the post office uses.  Typically a 3 digit ZIP code does not cross state lines, except in some (typically rural) areas where it is easier to service – for example, because the edge of the state is on the other side of a mountain range and thus, the neighboring state could deliver the mail without having to drive over the mountain every day.

 

It seems that you would only need the first digit to create the regions you are looking for.  Here is a link to a map that shows what the breakdown would be (picture from Wikipedia).

 

As always, elegant syntax from Richard.

 

Hope that helps,

-Eric

 

 

 

 

The first digit of the ZIP code is allocated as follows:

§                     0 = Connecticut (CT), Massachusetts (MA), Maine (ME), New Hampshire (NH), New Jersey (NJ), Puerto Rico (PR), Rhode Island (RI), Vermont (VT), Virgin Islands (VI), Army Post Office Europe (AE), Fleet Post Office Europe (AE)

§                     1 = Delaware (DE), New York (NY), Pennsylvania (PA)

§                     2 = District of Columbia (DC), Maryland (MD), North Carolina (NC), South Carolina (SC), Virginia (VA), West Virginia (WV)

§                     3 = Alabama (AL), Florida (FL), Georgia (GA), Mississippi (MS), Tennessee (TN), Army Post Office Americas (AA), Fleet Post Office Americas (AA)

§                     4 = Indiana (IN), Kentucky (KY), Michigan (MI), Ohio (OH)

§                     5 = Iowa (IA), Minnesota (MN), Montana (MT), North Dakota (ND), South Dakota (SD), Wisconsin (WI)

§                     6 = Illinois (IL), Kansas (KS), Missouri (MO), Nebraska (NE)

§                     7 = Arkansas (AR), Louisiana (LA), Oklahoma (OK), Texas (TX)

§                     8 = Arizona (AZ), Colorado (CO), Idaho (ID), New Mexico (NM), Nevada (NV), Utah (UT), Wyoming (WY)

§                     9 = Alaska (AK), American Samoa (AS), California (CA), Guam (GU), Hawaii (HI), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Oregon (OR), Palau (PW), Washington (WA), Army Post Office Pacific (AP), Fleet Post Office Pacific (AP)

 

 

From: Richard Ristow [mailto:[hidden email]]
Sent: Tuesday, October 27, 2009 12:28 AM
Subject: Re: Zip code to US region

 

At 12:44 AM 10/24/2009, Mike Pritchard wrote:

Does anyone have syntax to share to convert Zip codes to US regions?  I’m only  trying to create 4 regions (West, Midwest, South, Northeast) , but the maps I’ve found lead me to question whether I’m missing some of the codes.


As for missing some of the codes, I can't help you. But here's another way (not tested, and CHECK the logic) of writing your code:

STRING  #First1  (A1)
        #First2  (A2).

COMPUTE #First1 = CHAR.SUBSTR(Zip,1,1).
COMPUTE #First2 = CHAR.SUBSTR(Zip,1,2).


RECODE #First1
    ('9'       = 1)
    ('8'       = 1)
    ('6'       = 2)
    ('5'       = 2)
    ('2'       = 3)
    ('1', '0'  = 4)
    INTO Region_Combined.

RECODE #First2
    ('59'                               = 1)
    ('49','48','47','46','45','44','43' = 2)
    ('40','41','42'                     = 3)
    INTO Region_Combined.

 

Reply | Threaded
Open this post in threaded view
|

Re: Regression Analysis Questions

Richard Ristow
In reply to this post by Steve Simon, P.Mean Consulting
At 11:36 AM 10/28/2009, Steve Simon, P.Mean Consulting wrote:

>Instead, if you are comfortable with an assumption that the data is
>normally distributed, ...

Unfortunately, an assumption one should never be comfortable with,
especially if anything important is riding on it.

Many statistical procedures whose assumptions include normality, are
quite robust against many deviations from that assumption. But that's
not the same thing.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD