File: estim_ncp.Rd

package info (click to toggle)
r-cran-factominer 2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,008 kB
  • sloc: ansic: 192; sh: 4; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 1,382 bytes parent folder | download
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
\name{estim_ncp}

\alias{estim_ncp}

\title{Estimate the number of components in Principal Component Analysis}

\description{
Estimate the number of components in PCA .
}

\usage{
estim_ncp(X, ncp.min=0, ncp.max=NULL, scale=TRUE, method="GCV")
}

\arguments{
  \item{X}{a data frame with continuous variables}
  \item{ncp.min}{minimum number of dimensions to interpret, by default 0}
  \item{ncp.max}{maximum number of dimensions to interpret, by default NULL which corresponds to the number of columns minus 2}
  \item{scale}{a boolean, if TRUE (value set by default) then data are scaled to unit variance}
  \item{method}{method used to estimate the number of components, "GCV" for the generalized cross-validation approximation or "Smooth" for the smoothing method (by default "GCV")}
}

\value{
Returns ncp the best number of dimensions to use (find the minimum or the first local minimum) and the 
mean error for each dimension tested
}

\author{Francois Husson \email{francois.husson@institut-agro.fr}, Julie Josse\email{Julie.Josse@agrocampus-ouest.fr}}

\references{Josse, J. and Husson, F. (2012). Selecting the number of components in PCA using cross-validation approximations. Computational Statistics and Data Analysis, 56, 1869-1879.
}

\seealso{ \code{\link{PCA}}}

\examples{
data(decathlon)
nb.dim <- estim_ncp(decathlon[,1:10],scale=TRUE)
}

\keyword{multivariate}