In this blog post, I will replicate the results from Fruth et al (2019), a recently published choice experiment study.

Fruth et al. (2019) investigate preferences towards urban green features that have received little to no research focus: green facades, street greening or green initiatives to teach local communities. Urban green spaces improve the provision levels of urban ecosystem services, such as recreation and asthetics, climate regulation, food provision and freshwater cycling.

They conduct a choice experiment survey in Berlin, Germany, in a single neighborhood. The sample includes 128 respondents, which is unfortunately not representative of the neighborhood’s population.

The survey describes three attributes: the number of green building facades, street green in the form of trees or planter boxes, and green initiatives, such as eco-events and education programs. Each attribute had three levels, representing either the status quo or possible improvements (increases in greening). Moreover, the authors included a cost attribute described as a mandatory annual payment to an “urban green fund”, which would be managed by the local government. The cost attribute had six levels ranging from 12 € to 360 € (and zero for the status quo). In the choice card, respondents selected their preferred alternative, given the description in terms of attributes and cost. The picture below illustrates the choice card (as copied from the original paper):

The authors conducted an internet-based survey in 2018 and collected 128 completed questionnaires. The authors estimate a conditional logit model and a latent class logit model with 2 classes. Generally, the authors find that respondents are willing to pay for urban greening, thus planners should fund these green features. They also show that preferences are heterogeneous and the two classes have distinct preferences.

The original article webpage gives access to the original data. The original data is an RDS file, which means I have to have the *readRDS* function.

`urbangreen <- readRDS(file = "DIRECTORY/gmnldata.rds")`

I use the gmnl package to estimate a conditional logit model:

```
install.packages("gmnl")
library(gmnl)
```

The authors estimate the following utility function:

In order to estimate the regression above, we need to create an interaction between the price variable and individual’s income (all other interactions are already included in the original data):

```
urbangreen$PRICEXINC <- urbangreen$PRICE * urbangreen$INCOME
```

Finally, we can run a conditional logit model by using the gmnl function:

```
model_cl <- gmnl(pref1 ~ ASC
+ D.FACAD.2 + D.FACAD.3
+ D.STREET.2 + D.STREET.3
+ D.INITI.2 + D.INITI.3
+ D.INITI.2xAGE + D.INITI.3xAGE
+ PRICE + PRICEXINC
| 0,
data = urbangreen,
model = "mnl")
summary(model_cl)
```

The results are identical to those published in the paper:

```
> summary(model_cl)
Coefficients:
Estimate Std. Error z-value Pr(>|z|)
ASC 0.4876727 0.1583468 3.0798 0.0020716 **
D.FACAD.2 0.5514503 0.1151176 4.7903 1.665e-06 ***
D.FACAD.3 0.7617965 0.1141175 6.6755 2.463e-11 ***
D.STREET.2 0.8160700 0.1153793 7.0729 1.517e-12 ***
D.STREET.3 0.8293647 0.1168767 7.0961 1.284e-12 ***
D.INITI.2 0.2432129 0.1112497 2.1862 0.0288018 *
D.INITI.3 0.1428693 0.1119393 1.2763 0.2018458
D.INITI.2xAGE -0.1791532 0.0588993 -3.0417 0.0023526 **
D.INITI.3xAGE -0.2153725 0.0590365 -3.6481 0.0002642 ***
PRICE -0.0694812 0.0051119 -13.5920 < 2.2e-16 ***
PRICEXINC 0.0063972 0.0024031 2.6621 0.0077653 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Optimization of log-likelihood by Newton-Raphson maximisation
Log Likelihood: -1085.1
Number of observations: 1152
Number of iterations: 5
Exit of MLE: gradient close to zero
```

Finally, we can obtain average willingness to pay for various attributes by using the wtp.gmnl function:

```
> wtp.gmnl(model_cl , wrt = "PRICE")
Willigness-to-pay respect to: PRICE
Estimate Std. Error t-value Pr(>|t|)
ASC -7.018777 2.467293 -2.8447 0.0044449 **
D.FACAD.2 -7.936689 1.719150 -4.6166 3.900e-06 ***
D.FACAD.3 -10.964073 1.770363 -6.1931 5.898e-10 ***
D.STREET.2 -11.745198 1.815254 -6.4703 9.782e-11 ***
D.STREET.3 -11.936542 1.808887 -6.5988 4.144e-11 ***
D.INITI.2 -3.500415 1.611808 -2.1717 0.0298759 *
D.INITI.3 -2.056231 1.615658 -1.2727 0.2031282
D.INITI.2xAGE 2.578443 0.854826 3.0163 0.0025585 **
D.INITI.3xAGE 3.099726 0.864337 3.5862 0.0003355 ***
PRICEXINC -0.092071 0.034314 -2.6832 0.0072925 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
```

The price variable has been scaled down, so the WTP estimates need to be multiplied by 10 and by -1.

```
> as.data.frame(wtp.gmnl(model_cl , wrt = "PRICE"))$Estimate*(-10)
[1] 70.1877659 79.3668862 109.6407321 117.4519836 119.3654206 35.0041482 20.5623150 -25.7844318 -30.9972599 0.9207083
```

We conclude that on average respondents are willing to pay 79 euro to increase green facades by 1 out of 10 buildings with green facades, and 110 euro to have 2 out of 10 buildings with green facades. All of the estimates are statistically significant (except Green Initiatives 3, which represents increasing the frequency of eco-events).

To uncover patterns of preference heterogeneity, the authors also estimate a latent class model with 2 classes. again, I will use the gmnl package. The command is similar to the previous one, but the model has to be specified as “lc”, panel sets to true (T) and the number of classes to 2 (Q=2).

```
latent_model <- gmnl(
pref1 ~ ASC
+ D.FACAD.2 + D.FACAD.3
+ D.STREET.2 + D.STREET.3
+ D.INITI.2 + D.INITI.3 + D.INITI.2xAGE + D.INITI.3xAGE
+ PRICE + PRICEXINC
| 0 | 0 | 0 | RESIDENT + CAR,
data = urbangreen,
model = "lc",
panel = T,
Q = 2
)
```

The regression output is identical to the study’s.

```
> summary(latent_model)
Estimate Std. Error z-value Pr(>|z|)
class.1.ASC 0.5611493 0.2976105 1.8855 0.0593602 .
class.1.D.FACAD.2 0.4225581 0.2458068 1.7191 0.0856023 .
class.1.D.FACAD.3 0.6559344 0.2453457 2.6735 0.0075062 **
class.1.D.STREET.2 0.7881459 0.2451663 3.2147 0.0013056 **
class.1.D.STREET.3 0.4923308 0.2537271 1.9404 0.0523317 .
class.1.D.INITI.2 0.1219113 0.2349468 0.5189 0.6038383
class.1.D.INITI.3 -0.4667315 0.2763268 -1.6891 0.0912087 .
class.1.D.INITI.2xAGE -0.4304923 0.1163966 -3.6985 0.0002169 ***
class.1.D.INITI.3xAGE -0.6721978 0.1351556 -4.9735 6.575e-07 ***
class.1.PRICE -0.2302094 0.0262598 -8.7666 < 2.2e-16 ***
class.1.PRICEXINC 0.0141420 0.0135507 1.0436 0.2966548
class.2.ASC -0.8895071 0.2468243 -3.6038 0.0003136 ***
class.2.D.FACAD.2 0.7075329 0.1496369 4.7283 2.264e-06 ***
class.2.D.FACAD.3 1.0257079 0.1543898 6.6436 3.061e-11 ***
class.2.D.STREET.2 0.9235234 0.1485329 6.2176 5.047e-10 ***
class.2.D.STREET.3 1.1218419 0.1525922 7.3519 1.954e-13 ***
class.2.D.INITI.2 0.3133084 0.1441028 2.1742 0.0296900 *
class.2.D.INITI.3 0.4670330 0.1486033 3.1428 0.0016733 **
class.2.D.INITI.2xAGE -0.1616624 0.0900741 -1.7948 0.0726900 .
class.2.D.INITI.3xAGE -0.1797597 0.0920344 -1.9532 0.0507982 .
class.2.PRICE -0.0647417 0.0076188 -8.4977 < 2.2e-16 ***
class.2.PRICEXINC 0.0029378 0.0040429 0.7267 0.4674337
(class)2 0.1998110 0.1956655 1.0212 0.3071660
RESIDENT:class2 -0.0694162 0.1255315 -0.5530 0.5802783
class2:CAR 0.6049938 0.1078917 5.6074 2.054e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Optimization of log-likelihood by BFGS maximization
Log Likelihood: -861.45
Number of observations: 1152
Number of iterations: 473
Exit of MLE: successful convergence
```

The function to estimate WTP of each class for attributes is identical to before:

```
> as.data.frame(wtp.gmnl(latent_model , wrt = "class.1.PRICE")[1:9,])$Estimate*(-10)
[1] 24.375603 18.355381 28.492947 34.236044 21.386217 5.295668 -20.274218 -18.700032 -29.199407
> as.data.frame(wtp.gmnl(latent_model , wrt = "class.2.PRICE")[12:20,])$Estimate*(-10)
[1] -137.39318 109.28546 158.43075 142.64734 173.27959 48.39359 72.13788 -24.97036 -27.76567
```

As seen on Table 5 of the paper, these WTP are identical to those reported in the paper. Individuals belonging to class 1 are willing to pay 34 euros to have mostly trees (every 10 meters), while individuals belonging to class 2 are willing to 143 euros for the same change.

The paper concludes that there are two distinct consumer profiles. While individuals in class 1 are not willing to pay much for street greening, individuals in class 2 are willing to pay significantly more for urban greening measures. This is one way to uncover preference heterogeneity. Increasing the number of classes (Q=) allows for more flexible patterns of preference heterogeneity (while it complicates convergence of the model).

**References:**

Fruth, E., Kvistad, M., Marshall, J., Pfeifer, L., Rau, L., Sagebiel, J., … & Winiarski, B. (2019). Economic valuation of street-level urban greening: A case study from an evolving mixed-use area in Berlin. *Land Use Policy*, *89*, 104237.

## 1 Comment