bernatural.blogg.se

Spss code interaction
Spss code interaction









Column sum of column 1 (i.e., total number of observations in Column 1): a + c.Row sum of row 2 (i.e., total number of observations in Row 2): c + d.Row sum of row 1 (i.e., total number of observations in Row 1): a + b.d is the number of observations corresponding to Row 2 AND Column 2.īy adding a, b, c, and d, we can determine the total number of observations in each category, and in the table overall.c is the number of observations corresponding to Row 2 AND Column 1.b is the number of observations corresponding to Row 1 AND Column 2.a is the number of observations corresponding to Row 1 AND Column 1.The letters a, b, c, and d represent what are called cell counts. Column variable: Smoking (3 categories: never smoked, past smoker, current smoker)Ī typical 2x2 crosstab has the following construction:.Column variable: Gender (2 categories: male, female).Row variable: Class Rank (4 categories: freshman, sophomore, junior, senior).Column variable: Alcohol (2 categories: no, yes).Row variable: Gender (2 categories: male, female).(The "total" row/column are not included.) The table dimensions are reported as as Rx C, where R is the number of categories for the row variable, and C is the number of categories for the column variable.Īdditionally, a "square" crosstab is one in which the row and column variables have the same number of categories. For example, you might make a scatterplot of A and B with different symbols for men and women and overlay two different lines in different colors to display the two different relationships.The dimensions of the crosstab refer to the number of rows and columns in the table. To understand your results more clearly, and to present them clearly to others, you look at the effect of A on B twice, once looking only at the men, and then again looking only at the women. In your example, there is one relationship (i.e., slope) between A and B for men, and a different relationship (i.e., slope) between A and B for women. An interaction just means the effect of one variable depends on the other variable.

spss code interaction

Interactions seem mysterious to people, but there is no magic there. But explaining what an interaction is may help with #2 & #3.

spss code interaction

In addition, it's been a long time since I've worked with SPSS, so I can't help with #1 from memory. What you most need is a more solid basic understanding of the general linear model, and that's more than can be provided by answers on CV. I am very new to GLM and it is fascinating (if I can get it right!). Should I look at the effect of A and gender separately or only focus on the interaction between A and gender? If this is significant, does it mean that gender affects the relationship between A and B. I understand I can get an interaction between A and gender, which then means that A and gender have a joint effect on B. My understanding is that B goes in the dependent variable box, gender goes in the factor box and A goes in the covariate box in SPSS GLM (univariate). (The nature of the variables, as I understand it, makes factorial ANOVA inappropriate, leading to a choice of ANCOVA for this example.) Gender, of course, is a categorical variable. A is the independent and B is the dependent variable. In other words, how does gender impact on the relationship between A and B.

spss code interaction

I am looking at how the relationship between A and B behaves or differs based on gender. What is the best method to analyse the following problem in SPSS? I am unsure why it should be controlled in my case below (unless I am wrongly interpreting what a 'covariate' means). The confusion is because I have read in many places that when you use ANCOVA in GLM (in SPSS), the effect of the covariate is controlled. Following my question here, I will be most grateful for further assistance to clear my confusion.











Spss code interaction