File: hprabclust.Rd

package info (click to toggle)
r-cran-prabclus 2.3-2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,392 kB
  • sloc: sh: 13; makefile: 2
file content (95 lines) | stat: -rw-r--r-- 4,008 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\name{hprabclust}
\alias{hprabclust}
\alias{print.comprabclust}
%- Also NEED an `\alias' for EACH other topic documented here.
\title{Clustering of species ranges from presence-absence matrices
  (hierarchical methods)}
\description{
  Clusters a presence-absence matrix object by taking the
  'h-cut'-partition of a hierarchical clustering and
  declaring all members of too small clusters as 'noise' (this gives a
  distance-based clustering method, which estimates the number of
  clusters and allows for noise/non-clustered points). Note that this
  is experimental. Often, the \code{prabclust}-solutions
  is more convincing due to higher flexibility of that method. However,
  \code{hprabclust} may be more stable sometimes.
  
  \bold{Note:} Data formats are described
  on the \code{prabinit} help page. You may also consider the example datasets
  \code{kykladspecreg.dat} and \code{nb.dat}. Take care of the
  parameter \code{rows.are.species} of \code{prabinit}.
}

\usage{
hprabclust(prabobj, cutdist=0.4, cutout=1,
method="average", nnout=2, mdsplot=TRUE, mdsmethod="classical")

\method{print}{comprabclust}(x, ...)
}
%- maybe also `usage' for other objects documented here.
\arguments{
  \item{prabobj}{object of class \code{prab} as
    generated by \code{prabinit}. Presence-absence data to be analyzed.}
  \item{cutdist}{non-negative integer. Cutoff distance to determine the
    partition, see \code{cutree}.}
  \item{cutout}{non-negative integer. Points that have at most
    \code{nnout} distances smaller or equal than \code{cutout} are
    treated as noise.}
  \item{method}{string. Clustering method, see \code{hclust}.}
  \item{nnout}{non-negative integer. Members of clusters with less or
    equal than \code{nnout} points or that have less or equal than
    \code{nnout} neighbors closer than \code{cutout} are treated as noise.}
  \item{mdsplot}{logical. If \code{TRUE}, the cluster solution is
    plotted on the first two MDS dimensions, see \code{mdsmethod}.}
  \item{mdsmethod}{\code{"classical"}, \code{"kruskal"}, or
    \code{"sammon"}. The MDS method
    to transform the distances to data points. \code{"classical"} indicates
    metric MDS by function \code{cmdscale}, \code{"kruskal"} is
    non-metric MDS. Note that if \code{mdsmethod!="classical"} zero
    distances between different objects are replaced by the minimum of
    the nonzero distances divided by 10 (otherwise the MDS method would
    produce an error). Note that \code{mdsmethod} is ignored if
    \code{mdsplot=FALSE}.}
  \item{x}{\code{comprabclust}-object as generated by \code{hprabclus}.}
  \item{...}{necessary for print method.}
}

\value{
  \code{hprabclust} generates an object of class \code{comprabclust}. This is a
  list with components
  \item{clustering}{vector of integers indicating the cluster memberships of
    the species (\code{cutout}-outliers are noise, but small clusters
    are allowed). Noise is coded as 0.}
  \item{rclustering}{vector of integers indicating the cluster memberships of
    the species, noise as described under \code{nnout}.
    Noise is coded as 0.}
  \item{cutdist}{see above.}
  \item{method}{see above.}
  \item{cutout}{see above.}
  \item{nnout}{see above.}
  \item{noisen}{number of points minus \code{cutout}-outliers.}
  \item{symbols}{vector of characters corresponding to \code{rclustering}, but
    estimated noise by \code{"N"}.}
  \item{points}{numerical matrix. MDS configuration (if \code{mdsplot=TRUE}).}
  \item{call}{function call.}
}

\author{Christian Hennig
  \email{christian.hennig@unibo.it}
  \url{https://www.unibo.it/sitoweb/christian.hennig/en}}

\seealso{
  \code{\link{hclust}}, \code{\link{cutree}},
  \code{\link{prabclust}}.
}

\examples{
data(kykladspecreg)
data(nb)
data(waterdist)
x <- prabinit(prabmatrix=kykladspecreg, neighborhood=nb,
              geodist=waterdist, distance="geco")
hprabclust(x,mdsplot=FALSE)
}
\keyword{cluster}% at least one, from doc/KEYWORDS
\keyword{spatial}% __ONLY ONE__ keyword per line