set nowide
set skipmiss
*sex data
coded: 1=female 0=male
*live data
coded: 1=
*fewtrips data coded: 1=yes 0=no
*newwal data coded: 1=yes 0=no
*benefit data
coded: 1=cheaper 2=convenience 3=job 4=other
*problem data
coded: 1=pollution 2=congestion 3=small business 4=other
*otherwal data coded: 1=yes 2=no
*homeshop data coded: 1=yes 2=no
*manyshop data coded: 1=many stores 2=one stores
sample 1 24
read female age live fewtrips
newwal benefit problem otherwal
drive homeshop manyshop
work supstore supspend safeway safspend zellers zelspend londond lonspend shoppers shpspend walmart walspend
1 22 1 0 1 2 -99999 0 7 1 1 0 2 100 2 50 1 20 3 50 0 0 1 50
1 23 2 -99999 1 -99999 3 0 7 1 1 0
4 200 0 0 2 100 10 200 0 0 0 0
1 21 1 0 1 2 2 0 2 1 1 0
4 200 1 50 0 0 3 30 0 0 1 20
1 20 1 1 1
3
-99999 0 1 1 1 16 4 100 2 30 0 0 4 30 1 126 2 100
0 28 1 0 1 1 -99999 0 7 1 0 5 2 30 1 10 1 20 0 0 0 0 0 0
1 23 1 1 1
2
-99999 0 5 1 0 17.5 2 50 0 0 0 0 0 0 0 0 2 50
1 24 5 -99999 1 3 -99999 1 7 0 1 25 0 0 2 50 0 0 7 100 3 30 0 0
0 21 1 0 1 1 -99999 0 0 1 1 0
0 0 4 -99999 0 0 2 -99999 0 0 0 0
1 22 2 -99999 1 4 -99999 0 6 1 1 0 1 30 5 60 0 0 5 60 0 0 2 40
1 21 1 1 1
1 3 0 6 1 1 0
0 0 6 100 0 0 0 0 0 0 1 30
1 22 2 -99999 1 1 -99999 0 3 1 1
10 2 40 1 10 1 20 0 0 3
40 0 0
0 24 1 0 0
-99999&nnbsp; 3 0 5 1 1 10
1 -99999 1 -99999 1 -99999 2 -99999 3 -99999 0 0
1 20 2 -99999 1 1 2 0 0 1 0 12
0 0
0 0 0 0 0 0 0 0 0 0
0 21 4 -99999 0 -99999 3 1 7 1 0 8 1 100 0 0 0 0 1 20 0 0 0 0
1 22 1 0 0
-99999&nnbsp; 3 0 1 1 1 0 2.5 90 1 25 0 0 1 25 0 0 1 30
1 21 1 0 1 1 2 0 5 1 0 0
1 100 4 80 0 0 0 0 0 0 3 100
1 21 3 -99999 0 -99999 4 0 4 1 0 0
1 100 1 100 0 0 1 50 0 0 0 0
1 20 1 0 1 1 -99999 0 1 0 1 5 2 50 1 20 0 0 1 20 0 0 1 30
1 21 1 0 1 2 2 0 7 1 1 0
2 100 2 50 0 0 3 50 3 50 2 50
1 21 1 1 1
1 -99999 0 7 0 0 2 15 500 13 400 3 100 4 100 1
30 10 300
0 32 4 -99999 1 1 -99999 0 7 1 1
45 0 0 2 60 1 20 2 35 0 0 0 0
1 22 1 1 1
2
-99999 0 0
1 1 0 0 0 4 120 0 0 2 0 0 0 1 -99999
0 21 1 0 0
-99999 -99999 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 21 1 0 0
-99999 -99999 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
genr
livevan=(live.eq.1)
genr
liverich=(live.eq.2)
genr
livebrun=(live.eq.3)
genr
livesurr=(live.eq.4)
genr
livewest=(live.eq.5)
sample 1 22
stat
stat walmart newwal otherwal/pfreq
*predict how
much will people spend on the new Walmart per month
assuming indeps: female, age, live, newwal, otherwal, work
ols
walspend female age livevan
newwal otherwal work supspend safspend zelspend/list
fc/
beg=23 end=24 list
*using Logit to predict the probability that people agree to have
the new Walmart
logit
newwal female age live work drive manyshop/piter=0
list
fc/
beg=23 end=24 list
*predict
whether people will decrease their trip to other cities
logit
fewtrips female age drive homeshop
manyshop/piter=0 list
fc/
beg=23 end=24 list
stop