/********************* cars97a.sps **********************/ set width=80 length=none. title 'Car data: Quant-Cat interaction'. data list file = 'cars.dat' free / country mpg weight length. value labels country 1 'USA' 2 'Japan' 3 'Other'. recode country (missing=sysmis) (1=1) (else=0) into c1. recode country (missing=sysmis) (3=1) (else=0) into c2. /* This makes Japan the comparison group. compute cw1 = c1* weight. compute cw2 = c2* weight. /* First look at country uncorrected for weight oneway mpg, weight by country(1,3) / statistics=descriptives / ranges = tukey. regression variables = weight mpg c1 to cw2 / statistics = defaults change / dependent = mpg / enter weight / enter c1 c2 /* Country controlling for weight / enter cw1 cw2. /* Weight by country interaction