clda {smacofx} | R Documentation |
Curvilinear Distance Analysis (CLDA)
Description
A function to run curvilinear distance analysis via CCA
and returning a 'smacofP' object. Note this functionality is rather rudimentary.
Usage
clda(
delta,
Epochs = 20,
alpha0 = 0.5,
lambda0,
ndim = 2,
weightmat = 1 - diag(nrow(delta)),
init = NULL,
acc = 1e-06,
itmax = 10000,
verbose = 0,
method = "euclidean",
principal = FALSE,
epsilon,
k,
path = "shortest",
fragmentedOK = FALSE
)
Arguments
delta |
dist object or a symmetric, numeric data.frame or matrix of distances. Will be turne dinto geodesci distances. |
Epochs |
Scalar; gives the number of passes through the data. |
alpha0 |
(scalar) initial step size, 0.5 by default |
lambda0 |
the boundary/neighbourhood parameter(s) (called lambda_y in the original paper). It is supposed to be a numeric scalar. It defaults to the 90% quantile of delta. |
ndim |
dimension of the configuration; defaults to 2 |
weightmat |
not used |
init |
starting configuration, not used |
acc |
numeric accuracy of the iteration; not used |
itmax |
maximum number of iterations. Not used. |
verbose |
should iteration output be printed; not used |
method |
Distance calculation; currently not used. |
principal |
If 'TRUE', principal axis transformation is applied to the final configuration |
epsilon |
Shortest dissimilarity retained. |
k |
Number of shortest dissimilarities retained for a point. If both 'epsilon' and 'k' are given, 'epsilon' will be used. |
path |
Method used in 'stepacross' to estimate the shortest path, with alternatives '"shortest"' and '"extended"'. |
fragmentedOK |
What to do if dissimilarity matrix is fragmented. If 'TRUE', analyse the largest connected group, otherwise stop with error. |
Details
This implements CLDA as CLCA with geodesic distances. The geodesic distances are calculated via 'vegan::isomapdist', see isomapdist
for a documentation of what these distances do. 'clda' is just a wrapper for 'clca' applied to the geodesic distances obtained via isomapdist.
Value
a 'smacofP' object. It is a list with the components
delta: Observed, untransformed dissimilarities
tdelta: Observed explicitly transformed dissimilarities, normalized
dhat: Explicitly transformed dissimilarities (dhats), optimally scaled and normalized
confdist: Configuration dissimilarities
conf: Matrix of fitted configuration
stress: Default stress (stress-1; sqrt of explicitly normalized stress)
spp: Stress per point
ndim: Number of dimensions
model: Name of model
niter: Number of iterations (training length)
nobj: Number of objects
type: Type of MDS model. Only ratio here.
weightmat: weighting matrix as supplied
stress.m: Default stress (stress-1^2)
tweightmat: transformed weighting matrix; it is weightmat here.
Examples
dis<-smacof::morse
res<-clda(dis,lambda0=0.4,k=4)
res
summary(res)
plot(res)