# Step 3: Develop the random model

Should one or more of the regression coefficients be set free to vary among the firms? In other words, do one or more of the regression coefficients show significant variation among the firms? This step should be guided by theory, especially in situations with many x-variables. What about our model? Due to market imperfections, differences can be expected between firms in terms of the marginal wage premium for an extra year of education.

### Question:

Use SPSS or Stata to check whether the effects of years of education on wages show statistically significant variation among the firms? Estimate the best model.

#### Tip:

Use the Wald (Z) test as an initial evaluation of the variance components. Next, use likelihood ratio (LR) tests to compare models with and without random coefficients.

χ^{2}

_{H}= -2LL

_{K-H}- -2LL

_{K}

Answer SPSS Mixed

SPSS does not let us automatically perform the LR test. We have to estimate each model and compute the chi square as the difference between the -2LL for the models found in the *information criteria* table. The table of covariance parameters shows that this is the smaller model without any random coefficient.

Table 4.7. Information Criteria^{a}

Table 4.8. Estimates of Covariance Parameters^{a}

The output for the models with the coefficient of education defined as random:

Table 4.9. Information Criteria^{a}

Table 4.10. Estimates of Covariance Parameters^{a}

With the exception of the covariance term, the estimates divided by their standard errors are all greater than 2. The LR test statistic: 34,407.44 - 34,344.278 = 63.16. The test statistic is chi-square distributed, with the difference in the number of parameters as degrees of freedom. In this example, the random coefficient model has two more random terms. The outcome is statistically significant at any conventional level and the coefficient of education seems to vary among the firms.

Can we drop the covariance term UN(2,1)?

The LR test statistic: 34,346.014 - 34,344.278 = 1.74. This is chi-square distributed with one degree of freedom. The outcome is not statistically significant and the covariance can be dropped from the model.

The main output from the best model so far:

Table 4.11. Information Criteria^{a}

Table 4.12. Estimates of Fixed Effects^{a}

Table 4.13. Estimates of Covariance Parameters^{a}

Answer Stata xtmixed

LR tests can be performed manually using this formula:

χ^{2}

_{H}= 2(LL

_{K}- LL

_{K-H})

In Stata, however, estimates from models can be stored and the results used to perform an LR test for edyears as follows:

### Output

The test statistic is chi-square distributed, with the difference in the number of parameters as degrees of freedom. In this example, the random coefficient model has two more random terms. The outcome is statistically significant at any conventional level and the coefficient of education seems to vary among the firms.

Do we need the covariance between the level 2 residuals? This should also be decided using an LR test. The outcome below shows that the term can be deleted:

The first model is based on the default settings for the covariance structure and, in the second model, the covariance structure is specified as unstructured.

The best model so far:

Table 4.14.