Dear Statalist,
I am now a bit confused about the categorical and continous variables and how they will affect on the result of logistic model.
I have a number of independent variables such as: household income, age of household leader, household living area which are collected and coded by a research agency as below:
Household income:
1 = till 999 Eur
2 = 1000 - 1999 Eur
3 = 2000 - 2999 Eur
4 = 3000 - 3999 Eur
5 = more than 4000 Euro
Household living area:
1 = North
2 = West
3 = East
4 = South
5 = Central
- I would like to put these independent variables in logistic model. However, the results show very different if I treat household income as a factor variable and another time as a continous variable. I think it is more understandable if I treat household income as continous variable in logistic model because the income can be received any value between each category. But the way it was coded implying that it could be seen as the categorical variable. Please advise me how should I put this variable in logistic model. However, to calculate the marginal effect, it is necessary to put the factor variables instead of continous variable
- I think household living area should not be coded as numeric but string and treated as factor variables in the logistic model, also applied for caculating the marginal effect. Is it correct?
Thank you,
Hang Vu
I am now a bit confused about the categorical and continous variables and how they will affect on the result of logistic model.
I have a number of independent variables such as: household income, age of household leader, household living area which are collected and coded by a research agency as below:
Household income:
1 = till 999 Eur
2 = 1000 - 1999 Eur
3 = 2000 - 2999 Eur
4 = 3000 - 3999 Eur
5 = more than 4000 Euro
Household living area:
1 = North
2 = West
3 = East
4 = South
5 = Central
- I would like to put these independent variables in logistic model. However, the results show very different if I treat household income as a factor variable and another time as a continous variable. I think it is more understandable if I treat household income as continous variable in logistic model because the income can be received any value between each category. But the way it was coded implying that it could be seen as the categorical variable. Please advise me how should I put this variable in logistic model. However, to calculate the marginal effect, it is necessary to put the factor variables instead of continous variable
- I think household living area should not be coded as numeric but string and treated as factor variables in the logistic model, also applied for caculating the marginal effect. Is it correct?
Thank you,
Hang Vu
Comment