Now let’s think about the relationship between these repeated observations. The default for the within-subjects factors design is a full factorial model which includes the main within-subjects factor effects and all their interaction effects.”įor some analyses, this may be appropriate, but what if you don’t want this interaction in model? The answer is that you must use a different command, because there is no way to override this default. “A repeated measures analysis includes a within-subjects design describing the model to be tested with the within-subjects factors, as well as the usual between-subjects design describing the effects to be tested with between-subjects factors. From the SPSS documentation for the GLM: Repeated Measures entry we learn: Wait a minute – time by diet interaction? Where did we specify that in our glm syntax? An interaction of the variable listed on the wsfactor subcommand and the predictor variable(s) is included in the model by default, at least for the multivariate tests.
We can see that time is statistically significant, but diet and the time by diet interaction is not. The glm syntax for this would be: glm time1 time2 time3 by diet Blood pressure readings from three times are contained in the variables time1, time2 and time3. Let’s say that the hypothesis to be tested is that diet affects blood pressure.
#SPSS 16 SYNTAX FREE#
data list free / id exertype diet time1 time2 time3. In order to use the glm command for a repeated measures ANOVA, the data must be structured in wide format. We are going to start with an example of repeated measures ANOVA because, like OLS regression, most researchers are familiar with this type of analysis. So what procedure can be used? A common choice is the glm command with the wsfactor subcommand. Because the observations are not independent, we cannot use the regression command, or the standard errors will be biased, and hence, the test statistics an p-values will be inaccurate. Technically, we say that the errors within subjects are correlated. Because multiple observations are made on the same subjects, each data point is related to all of the other data points collected from that subject. We have the outcome at three time points and two categorical predictors, diet ( diet) and exercise type ( exertype). Let’s take a moment to look at our example data set. For example, a researcher might measure subjects’ blood pressure at three different time points. How do data become clustered? One way is to collect data on the same subjects over time.
Please see Harrell (2015) and Scariano and Davenport (1987) for explanations and examples. If this assumption is violated by having clustering in the data, the standard errors around the point estimates will be underestimated, and false alarms will be more likely. The effects of violating this assumption depend on how the assumption is violated. From a practical stand point, this means that each observation is represented on one and only one row in the data file. Remember that one of the most important assumptions of OLS regression is that the observations are independent. Obviously, there are already several ways to run an OLS regression in SPSS, so what else can the mixed command do? It can run linear models with clustered data. The print subcommand is used to have the parameter estimates included in the output (although the options used on the subcommand are different). The SPSS keyword with is used with both the glm and the mixed commands to indicate that the two predictor variables, read and female, are to be treated as continuous. Here is the same model run with the mixed command. How would you run a linear regression model in SPSS? Perhaps you would use either the regression command or the glm command. In this type of regression, the outcome variable is continuous, and the predictor variables can be continuous, categorical, or both. When most people think of linear regression, they think of ordinary least squares (OLS) regression.
The mixed command in SPSS is used to run linear regression models, including mixed effects models. References will be provided so that those interested in these topics can find additional information. Because the purpose of this workshop is to show the use of the mixed command, rather than to teach about multilevel models in general, many topics important to multilevel modeling will be mentioned but not discussed in detail. Such models are often called multilevel models. Although it has many uses, the mixed command is most commonly used for running linear mixed effects models (i.e., models that have both fixed and random effects).
The purpose of this workshop is to show the use of the mixed command in SPSS. Using the SPSS Mixed Command Introduction