[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: storing z-stats after nlcom
I have choice modelling data where people choose a food option on
the basis of the levels of several attributes which define each option
(price, GM, pesticide level etc).
I then estimate a conditional logit to identify how changes in
attribute levels affect the probability of an option being chosen.
In addition, the ratio of any of the attribute coefficients to the price
coefficient gives a partworth or a willingness to pay (WTP). I find
that some attributes are affected by:
(i) age (age)
(ii) age-squared (age2)
(iii) a personís attitude (pca1, a composite attitude score via PCA)
My calculation of the WTP is of the form:
gen wtp = -1 * [[ _b[grpA]+_b[grpApca1]* pca1 + _b[grpAage]*age
+ _b[grpAage2]*age2] / _b[price] ]
I can test the significance of these WTPs using nlcom, if I insert
pca1, age and age2 values, for example for someone aged 16 with
an attitude score of 2:
nlcom -1*[[ _b[grpA]+_b[grpApca1]* 2 + _b[grpAage]*16 +
_b[grpAage2]*16*16] / _b[price] ]
This gives a z-statistic to allow significance of the WTP to be
determined for such an individual.
At the moment, I can only determine these significances if I insert
example age and attitude values.
What I want to do is calculate and store this significance for each
person, i.e. each observation, in the dataset.
Is it possible to do this calculation for every observation and store
these z-statistic values as a new variable. This would allow me to
replace the WTPs with a zero if the z-statistic falls below a critical
value (2, for example).
Dr Dan Rigby
Senior Lecturer in Environmental Economics
School of Economic Studies
0161 275 4808
* For searches and help try: