Description Usage Arguments References Examples

This function calculates the proportion (resp. normalized proportion) of explained inertia of
the partitions in K clusters obtained with the Ward-like `hclustgeo`

procedure for a range
of mixing parameters alpha. When the proportion (resp. normalized proportion) of explained inertia based on D0 decreases,
the proportion (resp. normalized proportion)
of explained inertia based on D1 increases. The plot of these criteria can help the user in the choice of the
mixing parameter alpha.

1 | ```
choicealpha(D0, D1, range.alpha, K, wt = NULL, scale = TRUE, graph = TRUE)
``` |

`D0` |
an object of class "dist" with the dissimilarities between the n observations.
The function |

`D1` |
an object of class "dist" with other dissimilarities between the same n observations. |

`range.alpha` |
a vector of real values between 0 and 1. |

`K` |
the number of clusters. |

`wt` |
vector with the weights of the observations. By default, wt=NULL corresponds to the case where all observations are weighted by 1/n. |

`scale` |
if TRUE the two dissimilarity matrix are scaled i.e. divided by their max. |

`graph` |
if TRUE the two graphics (proportion and normalized proportion of explained inertia) are drawn. |

M.chavent, V. Kuentz-Simonet, A. Labenne, J. Saracco. ClustGeo: an R package for hierarchical clustering with spatial constraints arXiv:1707.03897 [stat.CO]

1 2 3 4 5 6 7 8 | ```
data(estuary)
D0 <- dist(estuary$dat) # the socio-demographic distances
D1 <- as.dist(estuary$D.geo) # the geographic distances between the cities
range.alpha <- seq(0,1,0.1)
K <- 5
cr <- choicealpha(D0,D1,range.alpha,K,graph=TRUE)
cr$Q # proportion of explained pseudo inertia
cr$Qnorm # normalized proportion of explained pseudo inertia
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.