|
Hello everyone,
I am preparing a course on data analysis, and I want to demonstrate that
using continuous variable is always more accurate than splitting this variable.
So I am seeking for a commented SPSS syntax that generate a moderately large
sample (around 80 participants) with 4 variables a dependent variable, a 2
categories independent variable (X), a continuous independent variable (Z),
and the interaction between the two (XZ). I'd like to define the dependant
variable as a fonction of the 2 IVs and their interaction.
I'd like the macro to :
1 - Regress the DV on the model (Y = b0 + b1X +b2Z + b3XZ),
2 - Save the following informations in a separate file (coeff.sav): Model's
F, p, and ERROR, and each variables B (raw regression coeff.), t and p.
3 - Performs a median split on Z (--> NZ).
4 - Regress the DV on X, NZ, and X by NZ interaction.
5 - Save the following informations in the "Coeff.sav" file : Model's F, p,
and ERROR, and each variables B (raw regression coeff.), t and p.
6 - Re-do these operations a definite number of times (LOOP).
7 - Finally, reports the average difference in Model's ERROR between Model 1
(continous) and model 2 (splitted) and the number of times Model 1 and 2
reports different conclusions (p's).
I don't really know if what i need is difficult or not, I only begin with
using Syntax. I don't know how to save each iteration new parameters
(Model's F, p, and ERROR, as well as IV's B, t, p) in different lines of one
new data file. Could you please help me (if the task is not too costly).
Thank you very much.
Fabrice.
P.S. : Excuse me for my english, I am French. :)
|