% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procrustes.R
\name{ca_procrustes_ser}
\alias{ca_procrustes_ser}
\alias{ca_procrustes_ser.incidence_matrix}
\alias{ca_procrustes_ser.matrix}
\title{Seriate Procrustes-Fit CA Scores}
\usage{
ca_procrustes_ser(obj, projection = "curve", samples = 10^5, symmetric = TRUE)

\method{ca_procrustes_ser}{incidence_matrix}(obj, projection = "curve", samples = 10^5, symmetric = TRUE)

\method{ca_procrustes_ser}{matrix}(obj, projection = "curve", samples = 10^5, symmetric = TRUE)
}
\arguments{
\item{obj}{An incidence matrix of size n x k.}

\item{projection}{Which projection to use:
\itemize{
\item \code{ca1} The first axis for CA scores.
\item \code{ca2} The second axis for CA scores.
\item \code{procrustes1} The first axis of Procrustes-fit CA scores.
\item \code{procrustes2} The second axis of Procrustes-fit CA scores.
\item \code{curve} The reference curve of an ideal seriation, using Procrustes fitting (this is the default).
}}

\item{samples}{Number of samples to use for plotting points along polynomial curve. Default is \code{10^5}.}

\item{symmetric}{Whether to use standard scores for both rows and columns. Default is \code{TRUE}. Setting this to \code{FALSE} will result in a asymmetric map of standard scores for rows and principal scores for columns.}
}
\value{
A \code{list} of class \code{strand} containing the following:.
\itemize{
\item \code{$dat} A data frame with the following columns:
\itemize{
\item \code{Procrustes1, Procrustes2} The location of the point on the biplot after fitting.
\item \code{CurveIndex} The orthogonal projection of the point onto the reference curve, given as the index of the point sampled along \eqn{y = \beta_2 x^2 + \beta_0}.
\item \code{Distance} The squared Euclidean distance of the point to the nearest point on the reference curve.
\item \code{Rank} The ranking of the row or column, a range of \verb{1:nrow`` and }1:ncol``.
\item \code{Type} Either \code{row} or \code{col}.
\item \code{sel} Data frame column used in \code{shiny} app to indicate whether point is selected in biplot/curve projection.
}
\item \code{$im_seriated} The seriated incidence matrix, of class \code{incidence_matrix}.
}
}
\description{
Obtain a ranking of row and column scores projected onto a reference curve of an ideal seriation (row and column scores are ranked separately). Scores of correspondence analysis have been fit to those produced by reference matrix contain an ideal seriation using a Procrustes method, projecting them. Rotation is determined by minimizing Euclidean distance from each row score to the nearest reference row score. Correspondence analysis is performed using the \code{\link[ca]{ca}} package \insertCite{nenadic_correspondence_2007}{lakhesis}.
}
\examples{
data("quattrofontanili")
s <- ca_procrustes_ser(quattrofontanili)
# print(s)
# summary(s)

}
\references{
\insertAllCited{}
}
