问题
Assuming I have price of houses as the dependent variable and the following as the independent variable:
- Age
- Area
- Floor
- Time taken to walk to nearest railway station (
time_walk
) - Time taken to commute, via train, from the nearest station to the CBD station (
time_train
)
Is there a way to compare the coefficient of time_walk
given different ranges of time_train
. In essence what I would like to achieve is to investigate if people value walking differently, given a change in the mrt traveling time.
Model A: (0-9 mins
time_train
): How wouldWalking_Time
affects house pricing?Model B: (10-19 mins
time_train
): How wouldWalking_Time
affects house pricing?Model C: (20-29 mins
time_train
): How wouldWalking_Time
affects house pricing?
I understand that I can't create 4 models, each containing only the relevant details (eg. 0-9 mins train time, 10-19 mins train time ...etc) as the n number would be different. This comparing the coefficient estimates wouldn't be fair.
回答1:
What you are suggesting is that the effect of walking_time
is dependent on time_train
. That's an interaction hypothesis! If time_train
is an ordinal level variable, you can add interaction terms for each category dummy with the variable walking_time
. If time_train
is a continuous variable, one extra term is sufficient (walking_time
* time_train
).
来源:https://stackoverflow.com/questions/25399461/spss-comparing-regression-coefficient-from-multiple-models