cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Does Mathcad have PCA - principal component analysis functions

gourish
3-Newcomer

Does Mathcad have PCA - principal component analysis functions

Does Mathcad has principal component analysis functions? Or do I need to program from basics. If any one has a built a program, i would appreciate. Thanks

2 REPLIES 2
RichardJ
19-Tanzanite
(To:gourish)

Look up the Nipals and Nipals2 functions. If you are using Mathcad 15 look in the Data Analysis Extension Pack. If you are using Mathcad Prime look in the help.

VladimirN
24-Ruby II
(To:gourish)

In attachment you can find Mathcad 11 worksheet ("Principal Component Analysis of n-Dimensional Data") which demonstrates the principal component analysis of multidimensional data. Here is a description of the functions of the "Principal Component Analysis", which is included in the package extensions "Data Analysis Extension Pack" (documents describing the subject (PCA) from the expansion pack can also be found in the attachment):

"Nipals(DATA, NumPC, maxiter, "scale/noscale", Acc) - takes a matrix of multivariate DATA, and returns numPC principal components, calculated with a maximum of maxiter iterations. The fourth argument may be set to "scale" if you wish to scale the data to the standard deviation, or "noscale" if you do not. The convergence accuracy is given by Acc, typically of the order of 10-10 or smaller.

The output contains the scores, loadings, cumulative variance explained, and the principal components (eigenvalues) in nested format. These can be accessed using matrix indexing or can be extracted with the other functions mentioned on this page.

Nipals2(Nipals, numAddPC) - takes the nested matrix output of the Nipals function and the number of additional principal components to calculate. Nipals2 returns a nested matrix of the scores, loadings, eigenvalues, and cumulative variances for the original plus the additional number of principal components.

loadings(Nipals) - takes the results array from the Nipals or Nipals2 function and returns the entry corresponding to the loadings of the principal components.

PCAeigenvals(Nipals) - takes the results array from the Nipals or Nipals2 function and returns the eigenvalues of the principal components.

PCAvariance(Nipals) - takes the results array from the Nipals or Nipals2 function and returns the cumulative variance explained by each calculated principal component.

scores(Nipals) - takes the results array from the Nipals or Nipals2 function and returns the scores array."

For access to a description of the expansion pack in main menu select "Help" --> "E-books" --> "Data Analysis Extension Pack".

Announcements

Top Tags