1
$\begingroup$

We have a dataset with the level of export of a certain good towards Italy for almost all countries of the world for 15 years.

We want to infere the effect of the distance of such countries from italy on the exportation levels.

Since we have many time points for each country, I first though of using a mixed effect model with the countries as random intercept. But because my fixed effect of interest is the distance, and of course this values is unique for each countries, this would not make sense.

So, how should I include the impact of time on the relationship distance-exportation? Would it make sense to use time as the random intercept, even if it is expected that there is some degree of autocorrelation between the time points?

Many thanks

$\endgroup$
1
$\begingroup$

If you include distance as a continuous variable, which seems more logical to me, then you can include country as a random intercept to take account of the fact that over time the values for country are correlated. Allowing a random coefficient for time allows for the slopes to vary randomly between countries. Whether that is sensible depends on subject matter knowledge but I would have thought that was what you wanted to do.

$\endgroup$
8
  • $\begingroup$ Is it correct to include the country as random intercept even if the distance (of course) don't change along time? $\endgroup$ – Bakaburg Jun 4 '16 at 16:57
  • 1
    $\begingroup$ As long as the country does not change (like for instance Sudan splitting into Sudan and South Sudan) then yes. $\endgroup$ – mdewey Jun 4 '16 at 17:02
  • $\begingroup$ I marked the answer as accepted but I would be glad if you could explain me why is it correct to have a random intercept even if you have one value of the predictor for each country. $\endgroup$ – Bakaburg Jun 5 '16 at 14:05
  • $\begingroup$ Because it is a continuous variable which, I assume, you are entering as such. If you are entering distance as a factor with as many levels as you have countries then you cannot have country as a random effect. $\endgroup$ – mdewey Jun 5 '16 at 16:49
  • 1
    $\begingroup$ It is fine to have country as a random intercept then. The fact that a continuous variable has many different values is not relevant because you are only fitting one parameter for it, its linear effect (well you could have quadratic and so on as well but they only use one parameter per effect). $\endgroup$ – mdewey Jun 13 '16 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.