Description Usage Arguments Details Value Author(s) References See Also Examples

Separates a single stratum of the population file into n clusters and finds the centroid of each cluster, where n is the sample size. Not intended to be called directly.

1 | ```
Centroids(popfile, nrefs, desvars, ctype, imax, nst)
``` |

`popfile` |
population file - dataframe containing information relating to all plots in the stratum. |

`nrefs` |
scalar defining the number of reference plots - required sample size for the stratum. |

`desvars` |
character vector containing the names of the design variables. |

`ctype` |
clustering type - either k-means ('km') or Ward's D2 ('WD'). |

`imax` |
maximum number of iterations when calling the k-means clustering procedure. |

`nst` |
number of random initial centroid sets when calling the k-means clustering procedure. |

The virtual plots are partitioned so as to minimise the sums of squares of distances from plots to cluster centroids. This is done by using a multivariate clustering procedure such as k-means clustering (Hartigan & Wong, 1979) or Ward's D2 clustering (Murtagh & Legendre, 2013), using standardized design variables and a Euclidean distance metric.

`centroids ` |
dataframe containing centroids. |

`cmns ` |
dataframe containing centroid means. |

G Melville

Hartigan & Wong (1979) Algorithm AS 136: a K-means clustering algorithm. Applied Statistics 28, 100-108, DOI:10.2307/2346830.

Murtagh, M & Legendre, P. (2014) Ward's hierarchical agglomerative clustering method: which algorithms implement Ward's criterion? Journal of Classification, 31, 274-295, DOI: 10.1007/s00357-014-9161-z.

```
Existing, NC.sample and kmeans.
```

1 | ```
## Centroids(popfile, nrefs, desvars, ctype='km', imax=200, nst=20)
``` |

NCSampling documentation built on June 27, 2017, 9:01 a.m.

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.