SPSS practical 1
Create interactions terms: transform compute variable.
- Interactieterm tussen gender en smoke = gender*smoke.
Perform a regression analysis according to the top-down procedure:
- You start with a model containing all relevant independent/predictor variables,
including the interactions: analyse regression linear.
o Put the Y variable below ‘dependent’ and the X-variables below
‘independent(s)’.
- You then check the results in the table ‘coefficients’: remove the variable with the
smallest absolute t-value (t) and a p-value (Sig.) larger then 0,05 from the model.
Then repeat the regression analysis without the variable.
o First test the interactions.
o De variabele waar je onderzoek naar doet blijft altijd in het model, ook al
is deze niet significant.
- Repeat this procedure until all remaining X-variables have a p-value at or below
5%.
Create dummy variables: transform compute variable.
- Bijvoorbeeld D_EXP1 krijgt de codering instruction_method = 1, en D_EXP2 krijgt de
codering instruction_method = 2. D_EXP1 en D_EXP2 zijn de dummy variabelen.
Compare two regression models through an F-change test, to test the interaction:
analyse regression linear.
- Model 1 only contains main effects, model 2 also contain the interaction terms.
o These effects and interaction terms are places below ‘independent(s)’.
- Press ‘statistics’ and select ‘R squared change’. This is required to obtain the F-
change test.
- Check in the table ‘model summary’ the F-change value (F Change) and it’s p-
value (Sig. F change) in model 2. Check whether they are significant.
Case 1A
Create variables: transform compute variable
- BMI = weight/(length**2).
- Overweigh = bmi > 25.
Inspect whether variabele increases of decreases across time: analyse descriptive
statistics descriptives.
- Below ‘variable(s)’ you enter the variable at different points of time. E.g.
‘bmi1998’, ‘bmi2008’, and ‘bmi2012’.
Change across time in the degree to which employees perform sports: analyse
descriptive statistics frequencies.
- Below ‘variable(s)’ you enter the variable at different points of time.
1
, Analyse whether there is a relation between two X’s and a continues Y: analyse
regression linear.
- Y = dependent, X’s = independent.
Some issues that could occur in the analysis:
- If it’s an observational study, confounders for the variable of central interest play
a role. You have to think about possible confounders and correct for them.
- Remember also that including categorical (i.e. nominal and ordinal) variables
with more than 2 levels as covariates into the regression analysis, has to be done
by first creating dummy variables. Testing for the significance of categorical
variables then has to be done using an F-change test.
- A good strategy is to start with the most complete model, and then perform a top-
down strategy for testing. The variable of central interest must always remain in
the model (even when it’s not significant).
SPSS practical 2
Crosstabulation; for instance, for calculating the incidence of becoming overweight in
2012 or having a normal weight again in 2012, taking 2008 as a departure year: analyse
descriptive statistics crosstabs.
- Row = overweight 2008, column = overweight 2012.
- Press ‘cells’ and select ‘row’ (incidences) below ‘percentages’; to specify that row
conditional percentages are calculated.
To describe the crude longitudinal association between a determinant and an outcome
that both are binary, also cross-tabulation can be used: analyse descriptive statistics
crosstabs.
- Association between sport and overweight’; row = sport2008, column =
overweight2012.
- Select ‘statistics’ and select ‘risk’; to obtain the OR (with a 95% confidence
interval) of being overweight of the sporting versus the non-sporting group.
Control for confounding variables can be done by performing a logistic regression
analysis. A method for selecting covariates is the top-down procedure: analyse
regression binary logistic.
- This is an automatic procedure and it can only be used when there are no
interactions in the analysis model!
- Block 1: Y = dependent, X = covariate/independent (first, only enter the variable
of central interest).
- Block 2: enter all remaining covariates that you consider relevant under
‘covariates’. The variables in block 2 will be removed by SPSS if they are not
significant (the variable from block 1 will always remain in the model).
o This occurs stepwise and is established by changing Method into:
Backward LR (instead of ‘Enter’).
- Categorical independent variables that involve more than two categories should
be defined as Categorical: press ‘categorical’ and select categorical covariates.
This implies that SPSS will automatically create 2 dummy variables for this
variable, where the highest value corresponds to the reference category.
- Check the results in the table ‘Variables in the equation’. In this model the
variable of central interest will be included and all covariates whose p-value ≤
2