Hi all

When I have a dichotomous predictor in any form of regression analysis I

almost always set the codes to 0 vs 1 and treat it as continuous (i.e. I

do the dummy coding myself)

However, when playing around with something in SPSS mixed I decided to

let SPSS do this coding for me by treating my dichotomous predictor, X,

as categorical, using the 'by' keyword, i.e. entering the code as

MIXED Y by X...

as opposed to

MIXED Y with X...

And in doing so I ran up against something very odd...

If I just look at the fixed effect of X I get the same result if I do

the dummy coding or if SPSS does it e.g.

MIXED Y with X /fixed = X /random = intercept | subject(TEAMID) /print

= solution testcov.

gives the same interpretation as

MIXED Y by X /fixed = X /random = intercept | subject(TEAMID) /print =

solution testcov.

This is exactly as it should be

But... if I also include X as a random effect, and allow for covarying

intercepts and slopes e.g.

MIXED Y with X /fixed = X /random = intercept X | subject(TEAMID)

covtype(UN) /print = solution testcov.

DOES NOT give the same results as when I use SPSS to do the dummy

coding, e.g.

MIXED Y by X /fixed = X /random = intercept X | subject(TEAMID)

covtype(UN) /print = solution testcov.

The former code seems OK in terms of the results given - but the latter

code, i.e the automated spss way of dummy coding X, gives a very odd

result, in that, when calculating the random effects, it seems to treat

the reference category of X as a variable too, and gives a 3x3

variance-covariance matrix, albeit with un1,3), un(2,3) and un(3,3)

unable to be estimated, and the usual warning re: the Hessian matrix!?

Has anyone else run into this issue?! Any idea what is going on?

cheers

Chris

--

--

Dr Chris Stride, C. Stat, Statistician, Institute of Work Psychology,

University of Sheffield

Telephone: 0114 2223262

Fax: 0114 2727206

"Figure It Out"

Statistical Consultancy and Training Service for Social Scientists

Visit www.figureitout.org.uk for details of my consultancy services, and

forthcoming training courses, which are also available on an in-house basis:

- Data management using SPSS syntax

- Advanced SPSS syntax and SPSS macros

- Testing for Mediation and Moderation using SPSS

- Multi-level Modelling using SPSS

- Introduction to Structural Equation Modelling using Mplus

- Testing for Mediation and Moderation using Mplus

- Multi-level Modelling using Mplus

- Latent Growth Curve Modelling using Mplus

=====================

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