Learn R Programming

plspm (version 0.2-2)

nipals: NIPALS: Non-linear Iterative Partial Least Squares

Description

Principal Component Analysis with NIPALS algorithm

Usage

nipals(x, nc = 2, scaled = TRUE)

Arguments

x
A numeric matrix or data frame.
nc
Number of components kept in the results (by default 2)
scaled
A logical value indicating whether scaling data is performed (TRUE by default).

Value

  • An object of class "nipals", basically a list with the following elements:
  • valuesThe pseudo eigenvalues.
  • scoresThe extracted scores.
  • loadingsThe loadings.
  • cor.scoCorrelations between the variables and the scores.
  • distoSquared distance of the observations to the origin.
  • contribContributions of the observations (rows).
  • cosSquared cosinus.
  • dmodDistance to the Model.
  • When the analyzed data contain missing values, the help interpretation tools (e.g. cor.sco, disto, contrib, cos, dmod) may not be meaningful, that is to say, some of the results may not be coherent.

Details

The function nipals performs Principal Component Analysis of a data matrix that may contain missing data.

References

Tenenhaus, M. (1998) La Regression PLS. Theorie et Pratique. Editions TECHNIP, Paris. Tenenhaus, M. (2007) Statistique. Methodes pour decrire, expliquer et prevoir. Dunod, Paris.

See Also

plot.nipals

Examples

Run this code
## example of NIPALS algorithm
  data(wines)
  nip1 <- nipals(wines[,-1], nc=5)
  plot(nip1)

  ## USArrests data vary 
  nip2 <- nipals(USArrests)
  plot(nip2)

Run the code above in your browser using DataLab