# SCS 2017: Longitudinal and Nested Data/References and links/Notes on Snijders and Bosker

### From Wiki1

## Contents |

## Notes on Snijders & Bosker (2012)

### Hausman test (p. 57)

Is equivalent to a test that the between group effect of a variable is equal to the within group effect, i.e. that there is no 'contextual' effect of the variable beyond its within group effect. S&B state that the test has been wrongly used to decide between using a random effects versus a fixed effects model. It should be used to decide on the inclusion of a 'contextual' variable in addition to the original 'raw' variable or, equivalently in the fixed portion of the model, the inclusion of the contextual variable together with the 'centered-with-group' variable.

### Within- and between-group regression coefficients (p. 58)

They can have opposite signs providing an example of Robinson's Paradox.

### Centering variables with random slopes (p. 87ff)

This issue concerns centering the variable that appears in the 'random' portion of the model. The variable can appear uncentered or centered in fixed part of the model independently of the way it appears in the random part of the model. If the contextual variable is included in the fixed part of the model, then choosing either the centered-within-group (CWG) or the raw variable in the fixed part yields the same model with different parametrizations. Note that the contextual variable would not normally appear in the random part of the model because it is a level-2 variable. Using the raw variable versus the CWG variable in the random part yields different models as S&B discuss in the bottom half of p. 88.

It's a small point but the second to last paragraph on p. 88 might give the impression that the same variable (CWG or raw) needs to be used in the fixed part and in the random part. This is not the case. One can use raw in the fixed part so that the regression output provides a direct estimate of the contextual effect and the CWG in the random part.

The last paragraph seems to reify the relationship between Y and X versus Y and X-Xbar. In the presence of Xbar they are not distinguishable. What matters to distinguish the two models is the shape of the random scatter of within-group regression lines relative to group means for X and for Y.

There's a relevant connected point at the top of p. 89: Interactions among level-1 variables will produce different fixed models depending on the centering of the variables.