linear regression short easy question

#1
Hi there,

I have the response Y and some covariates. I want to do linear regression.
Among the covariates there is the covariate sex (1: male, 2:female)

Can I just apply linear regression with spss or is there any problem with the categorical covariate? Or is there any special treatment needed?

Thanx in advance for any answers!
 

Link

Ninja say what!?!
#2
I'm not familiar with SPSS syntax, but there is no problem with using a categorical covariate. In your situation, it'll just give each line a different intercept.
 
#3
Forget SPSS,

what do you mean it will give each line a different intercept? I am talking about a multiple linear regression model and not a mixed model.

The form of the model will be y=b0+b1*Sex+b2*Age for example.

where the response and the variable of age are continuous and SEX is (1: male and 2:female)

I think that the above model is not correct because the variable SEX contains not scaled values. It is an ordinal variable and the values 1 and 2 are arbitrary. It doesn't mean that the class 2 is greater somehow from class 1. So I think that I should not include SEX in the model.

Were you talking about a mixed model?

Thanx for your time and looking forwars for your answer!!
 
#4
What Link is saying is that the model you want to fit is a model in which y is an affine function of age with a different constant for male and female individuals (two parallel lines).

To do so you need SEX to be a dummy variable : 0 for male and 1 for female. The constant for male will be b0 and the constant for female is b0 + b1. The lines are parallel with a slope equal to b2.

Hope this helps !
 

Dason

Ambassador to the humans
#6
It's still possible. You'll have a different overall intercept compared to doing 0-1 encoding. 0-1 encoding is more common and what you'll probably find in any literature. It's also slightly easier to interpret but you can still interpret things in the 1-2 coding scheme (but I recommend the 0-1).
 

Link

Ninja say what!?!
#7
What Link is saying is that the model you want to fit is a model in which y is an affine function of age with a different constant for male and female individuals (two parallel lines).

To do so you need SEX to be a dummy variable : 0 for male and 1 for female. The constant for male will be b0 and the constant for female is b0 + b1. The lines are parallel with a slope equal to b2.

Hope this helps !
Thank you very much for clarifying Etienne.