Defining categorical variables

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

Defining categorical variables

Love-2
Hi guys,


1 - When we use SPSS to define categorical variables (change contrast to indicator), when working with logistic regression, if we choose the reference category to be last for example, does last mean last in numbe or last alphabeticallyr? For example, I have 1- white, 2- black, 3- asian. If I choose to define the last category as the reference, will SPSS choose 3- asian, because it is the last in the numerical order, or will it choose 1- white because it is the last category alphabetically? I read books giving different instructions so I am confused about this.

I have another simple question about categorizing. If I have a variable with four categories, and the one i want as a reference is the one in the middle, do I have to move this category to last or first so I can set the reference category?

Also, how do i know it changed to last or first? does last show a < sign after ther variable and does first show a (first)<?

Many thanks, Love.
Reply | Threaded
Open this post in threaded view
|

Re: Defining categorical variables

Laurie Petch
I am also interested in this topic as I am currently working on a meta-analysis. I plan to use regression analysis to explore the effects of various study characteristics on the effects sizes. Many of the independent variables are categorical (e.g. theoretical orientation of the interventions). I have assigned numbers to all the categories.

I read: “The predictor variables can be dichotomous…Categorical variables can, of course, be “dummy” coded as a set of dichotomous variables, one less than the number of categories (Cohen & Cohen, 1975)” (Lipsey & Wilson, 2001 p. 138)

If anyone can tell me how to go about this, using SPSS, I would be very grateful.

Thanks!

Laurie

References
---------------
Cohen, J. & Cohen, P. (1975). Applied multiple regression/ correlation analysis for the behavioural sciences. Hillsdale, NJ: Lawrence Erlbaum.

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Thousand Oaks: Sage.

Reply | Threaded
Open this post in threaded view
|

Re: Defining categorical variables

Kooij, A.J. van der
In reply to this post by Love-2
If you have SPSS CATEGORIES you can use CATREG ((nonlinear) regression
for categorical variables). If you choose nominal scaling level for the
independent variables, the result is identical to result of linear
regression with dummy variables. If you have ordered categorical
variables you can choose ordinal scaling level.

Anita van der Kooij
Data Theory Group
Leiden University

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Laurie Petch (sent by Nabble.com)
Sent: 04 August 2006 17:25
To: [hidden email]
Subject: Re: Defining categorical variables


I am also interested in this topic as I am currently working on a
meta-analysis. I plan to use regression analysis to explore the effects
of various study characteristics on the effects sizes. Many of the
independent variables are categorical (e.g. theoretical orientation of
the interventions). I have assigned numbers to all the categories.

I read: "The predictor variables can be dichotomous...Categorical
variables can, of course, be "dummy" coded as a set of dichotomous
variables, one less than the number of categories (Cohen & Cohen, 1975)"
(Lipsey & Wilson, 2001 p. 138)

If anyone can tell me how to go about this, using SPSS, I would be very
grateful.

Thanks!

Laurie

References
---------------
Cohen, J. & Cohen, P. (1975). Applied multiple regression/ correlation
analysis for the behavioural sciences. Hillsdale, NJ: Lawrence Erlbaum.

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Thousand
Oaks: Sage.


--
View this message in context:
http://www.nabble.com/Defining-categorical-variables-tf2046140.html#a565
2367
Sent from the SPSSX Discussion forum at Nabble.com.

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Defining categorical variables

Marc Feuerstein
In reply to this post by Laurie Petch
If you are using binary logistic regression, there is a "category..." button
in the dialog box. It opens an option box where you can define which
variables are categorical, and how you want them to be changed into dummy
variables. SPSS will automatically change variables with N categories into
N-1 binary variables.

Unfortunately, I didn't find the way to "save" these variables. They seem to
exist only during the execution of the binary logistic regression procedure.

Is that what you are looking for ?

Marc.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Laurie Petch (sent by Nabble.com)
Sent: vendredi 4 août 2006 17:25
To: [hidden email]
Subject: Re: Defining categorical variables

I am also interested in this topic as I am currently working on a
meta-analysis. I plan to use regression analysis to explore the effects of
various study characteristics on the effects sizes. Many of the independent
variables are categorical (e.g. theoretical orientation of the
interventions). I have assigned numbers to all the categories.

I read: “The predictor variables can be dichotomous…Categorical variables
can, of course, be “dummy” coded as a set of dichotomous variables, one less
than the number of categories (Cohen & Cohen, 1975)” (Lipsey & Wilson, 2001
p. 138)

If anyone can tell me how to go about this, using SPSS, I would be very
grateful.

Thanks!

Laurie

References
---------------
Cohen, J. & Cohen, P. (1975). Applied multiple regression/ correlation
analysis for the behavioural sciences. Hillsdale, NJ: Lawrence Erlbaum.

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Thousand
Oaks: Sage.


--
View this message in context:
http://www.nabble.com/Defining-categorical-variables-tf2046140.html#a5652367
Sent from the SPSSX Discussion forum at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Defining categorical variables

Marta García-Granero
Hi

M> I read: “The predictor variables can be dichotomous…Categorical variables
M> can, of course, be “dummy” coded as a set of dichotomous variables, one less
M> than the number of categories (Cohen & Cohen, 1975)” (Lipsey & Wilson, 2001
M> p. 138)

M> If anyone can tell me how to go about this, using SPSS, I would be very
M> grateful.

See the following example:

* Sample dataset (from: Campbell, 'Statistics at Square Two', BMJ books) *.
DATA LIST LIST/ deadspac height age group (4 F4).
BEGIN DATA
 44 110  5 1
 31 116  5 2
 43 124  6 1
 45 129  7 1
 56 131  7 1
 79 138  6 0
 57 142  6 1
 56 150  8 1
 58 153  8 1
 92 155  9 2
 78 156  7 2
 64 159  8 1
 88 164 10 2
112 168 11 0
101 174 14 0
END DATA.

VAR LABEL deadspac'Pulmonary anatomical deadspace (ml)'.
VAR LABEL height'Height (cm)'.
VAR LABEL age'Age (years)'.
VAR LABEL group'Status'.
VAL LABEL group 0'Normal' 1'Asthma' 2'Bronchitis'.

* Dummy coding group *.
NUMERIC grp1 grp2 (F4).
DO REPEAT A=grp1 grp2/B=1 2 .
. COMPUTE A=(group=B).
END REPEAT.
LIST.

REGRESSION
  /STATISTICS COEFF OUTS CI R ANOVA
  /DEPENDENT deadspac
  /METHOD=ENTER height age grp1 grp2  .


--
Regards,
Dr. Marta García-Granero,PhD           mailto:[hidden email]
Statistician

---
"It is unwise to use a statistical procedure whose use one does
not understand. SPSS syntax guide cannot supply this knowledge, and it
is certainly no substitute for the basic understanding of statistics
and statistical thinking that is essential for the wise choice of
methods and the correct interpretation of their results".

(Adapted from WinPepi manual - I'm sure Joe Abrahmson will not mind)