SPSS Mixed-effects model with unbalanced design using MIXED

Cours SPSS Mixed-effects model with unbalanced design using MIXED, tutoriel & guide de travaux pratiques en pdf.

Fitting simple mixed-effects models (balanced design)

MIXED, as its name implies, handles complicated models that involve fixed and random effects. Levels of an effect are, in some situations, only a sample of all possible levels. If we want to study the efficiency of workers in different environments, for example, we don’t need to include all workers in the study — a sample of workers is usually enough. The worker effect should be considered random, due to the sampling process. A mixed-effects model has, in general, the form where the extra term  models the random effects.  is the design matrix of random effects and is a vector of random-effects parameters. We can use GLM and MIXED to fit mixed-effects models. MIXED, however, fits a much wider class of models. To understand the functionality of MIXED, we first look at several simpler models that can be created in MIXED and GLM. We also look at the similarity between MIXED and VARCOMP in these models.
In examples 4 through 6, we use a semiconductor dataset that appeared in Pinheiro and Bates (2000) to illustrate the similarity between GLM, MIXED and VARCOMP. The dependent variable in this dataset is “current” and the predictor is “voltage.” The data are collected from a sample of ten silicon wafers. There are eight sites on each wafer and five measurements are taken at each site. We have, therefore, a total of 400 observations and a balanced design.

Example 4 — Simple mixed-effects model with balanced design using MIXED
Syntax:

  • MIXED CURRENT BY WAFER WITH VOLTAGE
  • /FIXED VOLTAGE | SSTYPE(3)
  • /RANDOM WAFER
  • /PRINT SOLUTION TESTCOV.

Example 5 — Simple mixed-effects model with balanced design using GLM
Syntax:

  • GLM CURRENT BY WAFER WITH VOLTAGE
  • /RANDOM = WAFER
  • /METHOD = SSTYPE(3)
  • /PRINT = PARAMETER
  • /DESIGN = WAFER VOLTAGE

Example 6 — Variance components model with balanced design
Syntax:

  • VARCOMP CURRENT BY WAFER WITH VOLTAGE
  • /RANDOM = WAFER
  • /METHOD = REML.

In Example 4, “voltage” is entered as a fixed effect and “wafer” is entered as a random effect. This example tries to model the relationship between “current” and “voltage” using a straight line, but the intercept of the regression line will vary from wafer to wafer according to a normal distribution. In the Type III tests for “voltage,” we see a significant relationship between “current” and “voltage.” If we delve deeper into the parameter estimates table, the regression coefficient of “voltage” is 9.65. This indicates a positive relationship between “current” and “voltage.” In the “Estimates of Covariance Parameters” table (Figure 17), we have estimates for the residual error variance and the variance due to the sampling of wafers.
We repeat the same model in Example 5 using GLM. Note that MIXED produces Type III tests for fixed effects only, but GLM includes fixed and random effects. GLM treats all effects as fixed during computation and constructs F statistics by taking the ratio of the appropriate sums of squares. Mean squares of random effects in GLM are estimates of functions of the variance parameters of random and residual effects. These functions can be recovered from “Expected Mean Squares” (Figure 19). In MIXED, the outputs are much simpler because the variance parameters are estimated directly using maximum likelihood (ML) or restricted maximum likelihood (REML). As a result, there is no random-effect sum of squares.
When we have a balanced design, as in examples 4 through 6, the tests of fixed effects are the same for GLM and MIXED. We can also recover the variance parameter estimates of MIXED by using the sum of squares in GLM. In MIXED, for example, the estimate of the residual variance is 0.175, which is the same as the MS(Error) in GLM. The variance estimate of random effect “wafer” is 0.093, which can be recovered in GLM using the “Expected Mean Squares” table (Figure 19) in Example 5:
Var(WAFER) = [MS(WAFER)-MS(Error)]/40 = 0.093
This is equal to MIXED’s estimate. One drawback of GLM, however, is that you cannot compute the standard error of the variance estimates.
VARCOMP is, in fact, a subset of MIXED. These two procedures, therefore, always provide the same variance estimates, as seen in examples 4 and 6. VARCOMP only fits relatively simple models. It can only handle random effects that are iid normal. No statistics on fixed effects are produced. If, therefore, your primary objective is to make inferences about fixed effects and your data are correlated, MIXED is a better choice.
An important note: due to the different estimation methods that are used, GLM and MIXED do not produce the same results. The next section gives an example of such differences.

Fitting simple mixed-effects models (unbalanced design)

One situation about which MIXED and GLM disagree is an unbalanced design. To illustrate this, we removed some cases in the semiconductor dataset, so that the design is no longer balanced.
We then rerun examples 4 through 6 with this unbalanced dataset. The output is shown in examples 4a through 6a. We want to see whether the three methods — GLM, MIXED and VARCOMP — still agree with each other.

Example 4a — Mixed-effects model with unbalanced design using MIXED
Syntax:

  • MIXED CURRENT BY WAFER WITH VOLTAGE
  • /FIXED VOLTAGE | SSTYPE(3)
  • /RANDOM WAFER
  • /PRINT SOLUTION TESTCOV.

Since the data have changed, we expect examples 4a through 6a to differ from examples 4 through 6. We will focus instead on whether examples 4a, 5a and 6a agree with each other.
In Example 4a, the F statistic for the “voltage” effect is 67481.118, but Example 5a gives an F statistic value of 67482.629. Apart from the test of fixed effects, we also see a difference in covariance parameter estimates.
Examples 4a and 6a, however, show that VARCOMP and MIXED can produce the same variance estimates, even in an unbalanced design. This is because MIXED and VARCOMP use maximum likelihood or restricted maximum likelihood methods in estimation, while GLM estimates are based on the method-of-moments approach.
MIXED is generally preferred because it is asymptotically efficient (minimum variance), whether or not the data are balanced. GLM, however, only achieves its optimum behavior when the data are balanced.

Introduction 
Data preparation for MIXED 
Fitting fixed-effects models with iid residual errors
Example 1 — Fixed-effects model using MIXED
Example 2 — Fixed-effects model using GLM
Fitting fixed-effects models with non-iid residual errors
Example 3 — Fixed-effects model with correlated residual errors
Fitting simple mixed-effects models (balanced design)
Example 4 — Simple mixed-effects model with balanced design using MIXED
Example 5 — Simple mixed-effects model with balanced design using GLM
Example 6 — Variance components model with balanced design
Fitting simple mixed-effects models (unbalanced design) 
Example 4a — Mixed-effects model with unbalanced design using MIXED
Example 5a — Mixed-effects model with unbalanced design using GLM
Example 6a — Variance components model with unbalanced design
Fitting mixed-effects models with subjects
Example 7 — Fitting random effect*subject interaction using MIXED
Example 8 — Fitting random effect*subject interaction using GLM
Example 9 — Fitting random effect*subject interaction using
SUBJECT specification
Example 10 — Using COVTYPE in a random-effects model
Multilevel analysis
Example 11 — Multilevel mixed-effects model
Custom hypothesis tests
Example 12 — Custom hypothesis testing in mixed-effects model
Covariance structure selection
Information criteria for Example 9
Information criteria for Example 10
Reference

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *