C:\to_server\website\mrdcl-learning.com\mrdcl_files\TAB-105\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 $q4=$25/1-5,1..2,4..5,f,e,
x='Very good (5)<v5>;
Quite good (4)<v4>;
Neither good nor poor (3)<v3>;
Quite poor (2)<v2>;
Very poor (1)<v1>;
Net good;
Net poor;
Net difference (good minus poor)<x>;
Ns<Z>',
xt='Q4 Rating of service',
ds $q4x=$25/1-5,e,
x='Very good (5)<v5>;
Quite good (4)<v4>;
Neither good nor poor (3)<v3>;
Quite poor (2)<v2>;
Very poor (1)<v1>;
Ns<Z>',
xt='Q4 Rating of service',
ds $gender=$26/1,2,
x='Male;
Female',
xt='Gender',
ds $age=$27/1-3,
x='16-34;
35-54;
55+',
xt='Age',
di $number_in_household=$27-28,
xt='Number in household',
ds $vnumber_in_household=$number_in_household/1,2,3..5,>5,e,
x='1;
2;
3 to 5;
More than 5;
Not stated<z>',
xt='Number in household',
dm $mybanner=$gender,$age/1,2..3,$number_in_household/1..2,>2,
h='Gender\
Male;
Female;
Age\
16-34;
35+;
Number in h/hold\
1-2;
3+',
finish data,
start tables,
global bt#='All respondents',
f=clw7/bts,
select banner $mybanner,
t#1(f=brs/dpr0)=$q1 * ,
>>  Warning at line 94 in C:\to_server\website\mrdcl-learning.com\mrdcl_files\TAB-105\run.stp
>>  Last few chars parsed were {',f=clw7/bts,selectbanner$mybanner,t#1(f=brs/dpr0)}
>>W 360 Format already set to this value
t#2(f=dpr0)=$q1 * $q2,
>>  Warning at line 95 in C:\to_server\website\mrdcl-learning.com\mrdcl_files\TAB-105\run.stp
>>  Last few chars parsed were {ctbanner$mybanner,t#1(f=brs/dpr0)=$q1*,t#2(f=dpr0)}
>>W 360 Format already set to this value
t#3=$q2 * ,
t#4=$q1q2 * ,
t#5=$q3 * ,
t#6=$q4 * ,
if $gender/1,t#7a=$q4x *,
bt='Males',
if $gender/2,t#7b=$q4x *,
bt='Females',
dm $mybanner2=$mybanner,f,
h=$mybanner + 'Diff male vs female',
t#8=$q4x * $mybanner2,
t#9(f=pct/nbts/nptr/nitb/nrtv)=$q1 *,
vt='Q1/4 Conversion rate : %favourite / % considered',
finish tables,
start manip,
!!mt#1=#1 * 2,
!!mt#6(r8)=#6(r6) - (r7),
!!di $base=#7a(r0,c0),
!!if $base/<3,mt#7a=0.0,
!!di $base=#7b(r0,c0),
!!if $base/<3,mt#7b=0.0,
mt#9(r1-$)=#1(r1-$) / #4(r1-$) * 100.0,
finish manip,
