2
$\begingroup$

My data has a nested structure, which is suitable for hierarchical modelling. The categorical variable used as a hierarchical level is county. As the counties are unequally sized (different number of subjects), I use hierarchical modelling for analysing temporal changes.

First, am I correct, that the hierarchical modelling allows reporting temporal changes in a way, where all counties (small and big-sized) have equal contribution to the conditional effects? Or in other words, the results are less affected by the big counties.

Second, which of the following model structures should I use if I am interested in county-level trends only (not country-wide trends):

A

y ~ time + (time | county)

B

y ~ (time | county)

When plotting the conditional effects of these models, the results are more or less the same. I use https://cran.r-project.org/web/packages/brms/index.html

$\endgroup$
3
  • $\begingroup$ What do you mean by county-level and county-wide trends ? Do you mean within and between counties ? $\endgroup$ Oct 8, 2020 at 13:36
  • $\begingroup$ Thanks! County-level: I plot trends for each county. CountRy level: i am not interested in showing countRy-wide trends. $\endgroup$
    – st4co4
    Oct 8, 2020 at 13:49
  • 1
    $\begingroup$ Ahh OK got it ! $\endgroup$ Oct 8, 2020 at 13:55

1 Answer 1

3
$\begingroup$

The two models:

y ~ time + (time | county)

and

y ~ (time | county)

..only differ in the presence of the fixed effect for time. In the first model, the software will estimate a fixed (overall) effect for time, and each county will have it's own offset from this fixed effects.

In the 2nd model, since the fixed effect of time is absent, the overall effect of time is implicitly zero. Each county has it's own effect for time, but rather than being an offset from the fixed effect, it is an offset from zero.

In most cases, it rarely makes sense to exclude the fixed effect unless you know that the overal trend is zero.

$\endgroup$
1
  • $\begingroup$ Super answer! Could you please comment the first point also about hierarchical models. $\endgroup$
    – st4co4
    Oct 8, 2020 at 19:55

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.