Questions tagged [princomp]

26 questions
1
vote
0 answers

Matlab principal components regression

i'm trying to figure out how regression using pca works in Matlab...I have standardised my variables, performed pca on them, and then done a regression on the principal components, but what is not clear to me is how I convert the regression…
kazy13
  • 11
  • 1
1
vote
1 answer

Using princomp() in Matlab?

I do the following in MATLAB : >> X = [ 123 982 123 ; 434 233 842; 143 239 583; 733 292 503] X = 123 982 123 434 233 842 143 239 583 733 292 503 [coeff,score] = princomp(X) coeff = -0.3714 0.9202 0.1241 0.7330 0.2085 …
Sykalen
  • 11
  • 1
1
vote
1 answer

quesstion about PCA R language

I'm a freshman in R. I want to show the relationship between convariance matrix Σ and eigenvectors and eigenvalues. I know that Σ can be factorized such that : ∃P, ∃D: Σ = P. D. P' with P the eigenvector matrix and D the diagonal matrix whose…
Kroll DU
  • 79
  • 1
  • 10
1
vote
0 answers

PCA on raster in R :Proportion Var equally distributed among components?

I was doing PCA on 35 rasters with some environmental data (climond). Everything works fine and I use this command in R to perform a PCA on raster stack: pca<-princomp(na.omit(values(s)), cor=TRUE) All the rasters look fine but each of the…
Kamil
  • 23
  • 4
1
vote
0 answers

Principal component analysis (princomp, principal, etc.) on a 3D array

I have used PCA on 2D arrays before, and I use the first PC score vector that best best describes the variance of all the other columns in analyses. Below is a R example that shows the Comp.1 vector that would best describe the variance of the 2D…
Kevin
  • 311
  • 5
  • 18
1
vote
1 answer

Principal Componenet Analysis (mathworks example source code )

My question is quite elementary but I need help understanding the basic concepts. In the following example from the Mathworks documentation page of the princomp function load hald; [pc,score,latent,tsquare] = princomp(ingredients); pc,latent we get…
obelix
  • 880
  • 2
  • 16
  • 43
1
vote
2 answers

How do you use a correlation matrix as the input into princomp() in R

I have a dataframe that represents the correlation matrix of a large data set: > data V1 V2 V3 V4 V5 V6 V7 V8 1 1.000 0.846 0.805 0.859 0.473 0.398 0.301 0.382 2 0.846 1.000 0.881 0.826 0.376 0.326 0.277 0.415 3 0.805 0.881…
skmathur
  • 1,587
  • 5
  • 14
  • 21
0
votes
1 answer

Matlab's Princomp command- is it non-negative definite or not?

In Matlab, while trying to do PCA, is there a difference when using the princomp command for positive vs. negative data values? Is it a non-negative definite command? Thank you!
0
votes
1 answer

Remove top and right axis in princomp plot

I have a little problem, I want to remove the top and right axes (I don't know what's the name of that axis, sorry) of my PCA biplot, but I can't figure out how to do it. Is there a way to remove it? I read that bty=1 works to have only the left…
0
votes
1 answer

Difference between proc princomp in SAS and princomp command in R?

I am currently trying to obtain equivalent results with the proc princomp command in SAS and the princomp() command in R (in the stats package). The results I am getting are very similar, leading me to suspect that this isn't a problem with…
David Roberts
  • 617
  • 1
  • 11
  • 23
-1
votes
1 answer

Calculating new variables from Principal Components - PCA in R

For purpose of learning PCA in R, I have run princomp() function (from MASS package) on iris dataset. I have followed following steps: library(MASS) irispca<-princomp(iris[-5]) summary(irispca) irispca$loadings In order to calculate principal…
skumar
  • 353
  • 2
  • 4
  • 12
1
2