?
This
file
is
Peconic
Survey
Programs.
txt
?
It
contains
Limdep
programs
for
the
Peconic
data.
?
Written
by
Marisa
Mazzotta
for
Abt
Associates,
2003.

?*************************************************************************
?
Read
data.
.
.
?
Read
in
the
ASCII
data
set
that
was
output
by
SAS.

?
All
Second
Home
Residents
READ
;
nvar=
57
;
file=
c:\
pec_
data\
limdep\
abt_
sec.
dat
;
nobs=
3255$

?
All
Primary
Residents
READ
;
nvar=
57
;
file=
c:\
pec_
data\
limdep\
abt_
prim.
dat
;
nobs=
8202$

RENAME
;
X1=
y
;
X2=
farm
;
X3=
undev
;
X4=
wet
;
X5=
shell
;
X6=
eel
;
X7=
cost
;
X8=
ed123_
f
;
X9=
ed123_
u
;
X10=
ed123_
w
;
X11=
ed123_
s
;
X12=
ed123_
e
;
X13=
ed123_
c
;
X14=
ed4_
f
;
X15=
ed4_
u
;
X16=
ed4_
w
;
X17=
ed4_
s
;
X18=
ed4_
e
;
X19=
ed4_
c
;
X20=
ed567_
f
;
X21=
ed567_
u
;
X22=
ed567_
w
;
X23=
ed567_
s
;
X24=
ed567_
e
;
X25=
ed567_
c
;
X26=
inc12_
f
;
X27=
inc12_
u
;
X28=
inc12_
w
;
X29=
inc12_
s
;
X30=
inc12_
e
;
X31=
inc12_
c
;
X32=
inc34_
f
;
X33=
inc34_
u
;
X34=
inc34_
w
;
X35=
inc34_
s
;
X36=
inc34_
e
;
X37=
inc34_
c
;
X38=
inc567_
f
;
X39=
inc567_
u
;
X40=
inc567_
w
;
X41=
inc567_
s
;
X42=
inc567_
e
;
X43=
inc567_
c
;
X44=
inc8_
f
;
X45=
inc8_
u
;
X46=
inc8_
w
;
X47=
inc8_
s
;
X48=
inc8_
e
;
X49=
inc8_
c
;
X50=
fisher
;
X51=
sheller
;
X52=
bch_
user
;
X53=
boater
;
X54
=
oth_
user
;
X55=
N
;
X56=
A
;
X57=
B
$

?
Create
namelists
for
regressions:
Namelist
;
attrib=
farm,
undev,
wet,
shell,
eel,
cost
;
educ=
ed4_*,
ed567_*
;
inc=
inc34_*,
inc567_*,
inc8_*
$
?
Create
interaction
variables
for
users,
nonusers
Create
;
farm_
U=
0
;
undev_
U=
0
;
wet_
U=
0
;
shell_
U=
0
;
eel_
U=
0
;
cost_
U=
0
;
farm_
NU=
0
;
undev_
NU=
0
;
wet_
NU=
0
;
shell_
NU=
0
;
eel_
NU=
0
;
cost_
NU=
0
;
If
(
fisher=
1
|
sheller=
1
)
|
farm_
U=
farm
;
undev_
U=
undev
;
wet_
U=
wet
;
shell_
U=
shell
;
eel_
U=
eel
;
cost_
U=
cost
;
(
ELSE)
|
farm_
NU=
farm
;
undev_
NU=
undev
;
wet_
NU=
wet
;
shell_
NU=
shell
;
eel_
NU=
eel
;
cost_
NU=
cost
$

?
Create
constants
for
each
alternative
and
for
action
vs.
no
action
Create
;
J=
trn(­
3,0)
;
No=(
J=
1)
;
PA=(
J=
2)
;
PB=(
J=
3)
;
AB=
PA+
PB
$

?*****************************************************************************
****
?
Model
USERS
AND
NON­
USERS,
with
constants
Discrete
choice
;
Lhs=
y
;
Rhs=
AB,
PB,
farm_
U,
undev_
U,
wet_
U,
shell_
U,
eel_
U,
cost_
U,
farm_
NU,
undev_
NU,
wet_
NU,
shell_
NU,
eel_
NU,
cost_
NU,
educ,
inc
;
Tlf
;
printvc
;
choices=
No_
Act,
Prog_
A,
Prog_
B
$?
Save
coeff.
vector
and
var/
covar.
matrix:
Matrix
;
Bsave=
B
;
VCsave=
VarB
$

?****
Weighting*********
?****
USING
POPULATION
WEIGHTS
AND
1
FOR
FIRST
CATEGORY
***

?
Primary
Homes
Type
;
Step
1,
Read
in
weights.
$
Matrix
;
list
;
E13I12p=
1
$
Matrix
;
list
;
Ed4p=.
1835
$
Matrix
;
list
;
Ed567p=.
3090
$
Matrix
;
list
;
Inc34p=.
3194
$
Matrix
;
list
;
Inc567p=.
3087
$
Matrix
;
list
;
Inc8p=.
0341
$

?
Second
Homes
Type
;
Step
1,
Read
in
weights.
$
Matrix
;
list
;
E13I12s=
1
$
Matrix
;
list
;
Ed4s=.
1172
$
Matrix
;
list
;
Ed567s=.
701$
Matrix
;
list
;
Inc34s=.
153
$
Matrix
;
list
;
Inc567s=.
4642
$
Matrix
;
list
;
Inc8s=.
2849
$

Type;
Step
1a,
Remove
1st
two
coefficients
and
their
var­
covar
$
Matrix
;
list
;
B5s
=
part(
Bsave,
3,
44)
;
VC5s
=
part(
VCsave,
3,
44,
3,
44)
$

Type;
Step
1b,
Separate
Users
and
NonUsers
$
?
Users
Matrix
;
list
;
B5sU1
=
part(
B5s,
1,
6)
$
Matrix
;
list
;
B5sU2
=
part(
B5s,
13,
42)
$
Matrix
;
list
;
B5sU
=
[
B5sU1
/
B5sU2]
$
Matrix
;
list
;
VC5sU1
=
part(
VC5s,
1,
6,
1,
6)
$
Matrix
;
list
;
VC5sU2
=
part(
VC5s,
1,
6,
13,
42)
$
Matrix
;
list
;
VC5sU3
=
part(
VC5s,
13,
42,
1,
6)
$
Matrix
;
list
;
VC5sU4
=
part(
VC5s,
13,
42,
13,
42)
$
Matrix
;
list
;
VC5sUa
=
[
VC5sU1,
VC5sU2]
$
Matrix
;
list
;
VC5sUb
=
[
VC5sU3,
VC5sU4]
$
Matrix
;
list
;
VC5sU
=
[
VC5sUa
/
VC5sUb]
$

?
Non­
Users
Matrix
;
list
;
B5sNU1
=
part(
B5s,
7,
12)
$
Matrix
;
list
;
B5sNU2
=
part(
B5s,
13,
42)
$
Matrix
;
list
;
B5sNU
=
[
B5sNU1
/
B5sNU2]
$
Matrix
;
list
;
VC5sNU1
=
part(
VC5s,
7,
12,
7,
12)
$
Matrix
;
list
;
VC5sNU2
=
part(
VC5s,
7,
12,
13,
42)
$
Matrix
;
list
;
VC5sNU3
=
part(
VC5s,
13,
42,
7,
12)
$
Matrix
;
list
;
VC5sNU4
=
part(
VC5s,
13,
42,
13,
42)
$
Matrix
;
list
;
VC5sNUa
=
[
VC5sNU1,
VC5sNU2]
$
Matrix
;
list
;
VC5sNUb
=
[
VC5sNU3,
VC5sNU4]
$
Matrix
;
list
;
VC5sNU
=
[
VC5sNUa
/
VC5sNUb]
$
?
Primary
homes
Type
;
Step
2,
Create
6x36matrix
of
weights.
$
Matrix
;
list
;
I6=
Iden(
6)
$
Matrix
;
list
;
W1s=
E13I12p|
I6
$
Matrix
;
list
;
W2s=
Ed4p|
I6
$
Matrix
;
list
;
W3s=
Ed567p|
I6
$
Matrix
;
list
;
W4s=
Inc34p|
I6
$
Matrix
;
list
;
W5s=
Inc567p|
I6
$
Matrix
;
list
;
W6s=
Inc8p|
I6
$
Matrix
;
list
;
Ws=[
W1s,
W2s,
W3s,
W4s,
W5s,
W6s]
$

?
Second
homes
Type
;
Step
2,
Create
6x36matrix
of
weights.
$
Matrix
;
list
;
I6=
Iden(
6)
$
Matrix
;
list
;
W1s=
E13I12s|
I6
$
Matrix
;
list
;
W2s=
Ed4s|
I6
$
Matrix
;
list
;
W3s=
Ed567s|
I6
$
Matrix
;
list
;
W4s=
Inc34s|
I6
$
Matrix
;
list
;
W5s=
Inc567s|
I6
$
Matrix
;
list
;
W6s=
Inc8s|
I6
$
Matrix
;
list
;
Ws=[
W1s,
W2s,
W3s,
W4s,
W5s,
W6s]
$

Type
;
Step
3,
Calculate
weighted
coefficients
and
std.
errors.
$
Type
;
Weighted
Coefficients,
Users
$
Matrix
;
list
;
NewB5sU=
Ws|
B5sU
$
Type
;
Weighted
var/
covar.
matrix
$
Matrix
;
list
;
NewVCsU=
Ws|
VC5sU|
Ws'
$
Type
;
Variance
of
Wtd.
Coefficients
$
Matrix
;
list
;
VB5sU=
Vecd(
NewVCsU)
$

Type
;
Weighted
Coefficients,
NON­
Users
$
Matrix
;
list
;
NewB5sNU=
Ws|
B5sNU
$
Type
;
Weighted
var/
covar.
matrix
$
Matrix
;
list
;
NewVCsNU=
Ws|
VC5sNU|
Ws'
$
Type
;
Variance
of
Wtd.
Coefficients
$
Matrix
;
list
;
VB5sNU=
Vecd(
NewVCsNU)
$

Type
;
Step
4,
Calculate
WTP
values
and
confidence
intervals.
$
?
USERS
?
separate
attributes
from
cost
Matrix
;
list
;
WBs=
part(
NewB5sU,
1,
5)
;
WCs=
part(
NewB5sU,
6,6)
$
?
create
a
scalar
for
k
Calc
;
alphas=
0
$
initialize
Matrix;
list
;
alphas=
WCs
$
Calc
;
Ks=­
1/
alphas
$
?
calculate
vector
of
dollar
values
Matrix
;
list
;
WTPsU=
Ks
*
WBs
$
?
create
info.
matrix
Matrix
;
list
;
I1s=
Ginv(
NewVCsU)
$
takes
the
inverse
?
create
J
matrix
Matrix
;
list
;
I5=
Iden(
5)
;
J1s=
1/
Ks
*
I5
$
Matrix
;
list
;
J2s=
Init(
5,1,0)
;
J3s=[
J1s,
J2s]
$
Matrix
;
list
;
J4s=
alphas
*
NewB5sU
$
Matrix
;
list
;
J4s=
J4s'
$
Matrix
;
list
;
Js=[
J3s/
J4s]
$
?
create
info.
matrix
for
wtp
Matrix
;
list
;
I2s=
Js|
I1s|
Js'
$
?
create
var­
cov.
matrices
and
vector
of
variances
for
WTP
Matrix
;
list
;
VCBKs=
Ginv(
I2s)
;
VCWTPs=
part(
VCBKs,
1,
5,
1,5)
;
VWTPsU=
vecd(
VCWTPs)
$

?
NON­
USERS
?
separate
attributes
from
cost
Matrix
;
list
;
WBs=
part(
NewB5sNU,
1,
5)
;
WCs=
part(
NewB5sNU,
6,6)
$
?
create
a
scalar
for
k
Calc
;
alphas=
0
$
initialize
Matrix;
list
;
alphas=
WCs
$
Calc
;
Ks=­
1/
alphas
$
?
calculate
vector
of
dollar
values
Matrix
;
list
;
WTPsNU=
Ks
*
WBs
$
?
create
info.
matrix
Matrix
;
list
;
I1s=
Ginv(
NewVCsNU)
$
takes
the
inverse
?
create
J
matrix
Matrix
;
list
;
I5=
Iden(
5)
;
J1s=
1/
Ks
*
I5
$
Matrix
;
list
;
J2s=
Init(
5,1,0)
;
J3s=[
J1s,
J2s]
$
Matrix
;
list
;
J4s=
alphas
*
NewB5sNU
$
Matrix
;
list
;
J4s=
J4s'
$
Matrix
;
list
;
Js=[
J3s/
J4s]
$
?
create
info.
matrix
for
wtp
Matrix
;
list
;
I2s=
Js|
I1s|
Js'
$
?
create
var­
cov.
matrices
and
vector
of
variances
for
WTP
Matrix
;
list
;
VCBKs=
Ginv(
I2s)
;
VCWTPs=
part(
VCBKs,
1,
5,
1,5)
;
VWTPsNU=
vecd(
VCWTPs)
$
