C:\to_server\website\mrdcl-learning.com\mrdcl_files\DAT-08\run.stp
start data,
serial number in columns 1-3,
card characters 100,
ds $q1=$4/1-9,0,e,
x='Brand A;
Brand B;
Brand C;
Brand D;
Brand E;
Brand F;
Brand G;
Brand H;
Brand I;
Brand J;
None',
xt='Q1 Favourite brand',
dm $q2=$5-14,e,
x=$q1,
xt='Q2 Other brands considered',
dm $q1q2=$q1.or.$q2,
dm $q1q2=$q1q2/1-10,e,
x=$q1,
xt='Q1/Q2 All brands considered',
dm $q3=$15-24,e,
x=$q1,
xt='Q3 Brand seen advertised',
dm $q1q2_and_q3=$q1q2.and.$q3,
dm $q1q2_and_q3=$q1q2_and_q3/1-10,e,
x=$q1,
xt='Q1/Q3 Brand connsidered and seen advertised',
dm $q1q2_not_q3=$q1q2.and..not.$q3,
dm $q1q2_not_q3=$q1q2_not_q3/1-10,e,
x=$q1,
xt='Q1/Q3 Brand connsidered and not seen advertised',
ds $gender=$25/1,2,
x='Male;
Female',
xt='Gender',
ds $age=$26/1-3,
x='16-34;
35-54;
55+',
xt='Age',
ds $gender_age=$gender.by.$age,
x='Male 16-34;
Male 35-54;
Male 55+;
Female 16-34;
Female 35-54;
Female 55+',
xt='Age within gender',
list csv(h) $iobs.&$gender.&$age.&$q1,
finish data,
start tables,
t#1=$q1 * $gender,
t#2=$q2 * $gender,
t#3=$q1q2 * $gender,
t#4=$q3 * $gender,
t#5=$q1q2_and_q3 * $gender,
t#6=$q1q2_not_q3 * $gender,
t#7=$gender_age * $gender,
t#8=$gender_age * $age,
finish tables,
