# Chapter 17 | Exercise 1

### ‘Letting in English and Russian’

The data frame `letverbs`

in `Rling`

contains English and Russian verbs of letting as rows and several semantic functions that can be performed by these verbs as columns. Use non-metric MDS to investigate differences and similarities between the verbs and pinpoint common dimensions of variation (if any).

Create a matrix with Gower distances between the verbs. Tip: you might need to transpose the initial data frame.

Create a non-metric MDS map with the verbs.

Find the optimal number of dimensions.

For the model with the optimal number of dimensions, perform the diagnostics with the help of the Shepard plot.

```
> library(Rling)
> data(letverbs)
> library(cluster) #the package should be installed first
> letverbs.dist <- daisy(letverbs)
> letverbs.dist[letverbs.dist == 0] <- 0.001
```

```
> library(MASS) #the package should be installed first
> letverbs.mds <- isoMDS(letverbs.dist)
> plot(letverbs.mds$points, type = "n", main = "MDS of LET verbs", xlab = "Dim 1", ylab = "Dim 2")
> text(letverbs.mds$points, labels = rownames(letverbs), cex = 0.8)
```

The plot will show the most grammaticalized *let* and *dat’ *apart from the other verbs, whereas *permit* and its Russian analogue *pozvoljat’* overlap.

Repeat the following for different *k*:

```
> test <- isoMDS(letverbs.dist, k = 1)
initial value 14.120736
final value 14.120736
converged
```

The resulting stress values for five dimensions are as follows:

```
> letverbs.stress <- c(14.12, 0.006, 0, 0, 0)
> plot(1:5, letverbs.stress, type = "b", main = "Stress for n dimensions", xlab = "n of dimensions", ylab = "Stress")
```

The plot ‘elbows’ at two dimensions.

```
> letverbs.sh <- Shepard(letverbs.dist, letverbs.mds$points)
> plot(letverbs.sh, main = "Shepard plot")
> lines(letverbs.sh$x, letverbs.sh$yf, type = "S")
```

The diagnostic plot does not reveal serious problems.