Tagged Questions
1
vote
1answer
40 views
How to output varimax-rotated data in R?
I have ran PCA on 25 variables and selected the top 7 PCs using 'prcomp'.
prc <- prcomp(pollutions, center=T, scale=T)
I have then done varimax rotation on ...
3
votes
4answers
186 views
How to perform dimension reduction after doing PCA in R?
I have a big dataset of +- 40000 observations, each containing 784 variables. Because this dataset is extremely large I want to perform a dimension reduction.
Now everywhere I read that I can use ...
0
votes
0answers
29 views
PCA replicate data/index R
I have a set of date covering petrol prices.
My example has two columns where each row represents a sequential date.
...
1
vote
1answer
65 views
Kernel PCA (in R)
I am attempting to use the kernel PCA features in kernlab but am having trouble understanding the output. In particular, it's unclear what scale the results are in ...
1
vote
1answer
62 views
vector fit interpretation NMDS
So a colleague and myself are using principal component analysis (PCA) or non metric multidimensional scaling (NMDS) to examine how environmental variables influence patterns in benthic community ...
3
votes
2answers
65 views
PCs scores from Correlation and Covariance matrices through matrix computations and prcomp
I'm want to get PCs scores through matrix approach. My calculated PCs scores for correlation matrix matches with prcomp results but the PCs scores for covariance ...
0
votes
0answers
65 views
Robust statistical methods to estimate relationship between variables
I have a dataset with measured co2 fluxes for 5 years and also the corresponding meteorological data (pressure, temperature, humidity etc.) and soil data (soil moisture, temperature). I was able to ...
1
vote
1answer
54 views
Interpretation of Scree plots and Boruta Outcomes
I have 37 features in my dataset. I used Boruta package in R and according to its analysis, all the features are "important" and should be retained. I examined this result of Boruta and found that if ...
0
votes
0answers
40 views
dudi.pca error in v*row.w: non-numeric argument to binary operator
I need to run a dudi.pca from the package ade4. I am running it on a species dataframe with the 1st column as ...
0
votes
0answers
74 views
PCA alternatives
I've heard about alternatives to principal component analysis, they use improved methods such as decomposition over a non-orthogonal basis or penalizing the optimization problem of finding the highest ...
0
votes
0answers
33 views
PC analysis and regression-percentage of explained variance
my question is about the percentage of explained variance in principle component.
different codes in R software show different values for percentage of explained variance(PEV) with the obtained PEV ...
3
votes
1answer
75 views
What's the difference between a component and a factor in parallel analysis?
The psych package in R has a fa.parallel function to help determine the number of factors or components. From the documentation:
...
1
vote
0answers
59 views
Rescale factor scores from factor analysis to latent metric in R
I'm calculating a factor analysis of several variables in R. I want to determine each case's value on the latent variable. When I run the factor analysis, I receive factor scores. The factor scores do ...
1
vote
0answers
183 views
Problem with parallel analysis with psych
Good Morning,
I'm reviewing the different ways for running a Principal Component Analysis and choosing the principal components.
I have a data set with several hundred variables and some thousand ...
8
votes
1answer
339 views
For a random matrix, shouldn't a SVD explain nothing at all? What am I doing wrong?
If I construct a 2-D matrix composed entirely of random data, I would expect the PCA and SVD components to essentially explain nothing.
Instead, it seems like the the first SVD column appears to ...
0
votes
0answers
21 views
Determine relationship of habitat features to classification on an already classified dataset
I have a dataset of habitat classifications that were classified using canopy trees ratios. I have the associated understory characteristics (leafy forest floor plants, short shrubs, mosses, etc) that ...
3
votes
2answers
357 views
PCA and k-fold Cross Validation in Caret
I just re-watched a lectured from the Machine Learning course on Coursera. In the section where the professor discusses PCA for pre-processing data in supervised learning applications, he says PCA ...
3
votes
2answers
296 views
Choosing number of principal components to retain
One method that was suggested to me is to look at a scree plot and check for "elbow" to determine the correct number of PCs to use. But if the plot is not clear, does R have a calculation to determine ...
0
votes
0answers
64 views
problem with scaling of data in PCA
I'd like to have your opinion about my case study. I'm analyzing a dataset of 9 experiments and 15 variables with the aim to highlight the variables that can majorly explain the variance between the ...
1
vote
3answers
100 views
How can I separate each of 100 observations into groups as determined by the data?
I have 3 covariates for 100 observations. How can I separate each of my 100 observations into groups as determined by the data. I was thinking clustering. However, apparently, I need more than 3 ...
2
votes
1answer
125 views
Scaling mixed models for PCA using dudi.mix
I am trying to do a kselect model from the adehabitatHS which uses commands from ade4 package. I am trying to determine if I ...
3
votes
3answers
847 views
Replacement of NA values for PCA analysis
to perform a PCA analysis in R I used the prcomp function. However, there's a bug in that function so that the na.action ...
2
votes
0answers
95 views
Technique to remove factor structure from panel data
Let's say I have panel data (i.e. time-series data and cross-sectional).
Factors drive the bulk of the data as well as some noise.
Naturally I can express this factor structure using a covariance ...
7
votes
1answer
841 views
Dimensionality reduction (SVD or PCA) on a large, sparse matrix
I have a large, sparse Matrix of features I would like to use in a machine learning algorithm:
...
6
votes
1answer
138 views
Construct artificial slightly overlapping data for PCA plot
I am trying to construct artificial data which show two distinct groups in a PCA plot. However, the two groups should still slightly overlap. The following approaches came the closest but I am still ...
3
votes
2answers
194 views
Dimensionality reduction on a huge binary matrix
I have a 0/1 sparse matrix with 500 k columns and 3 M rows and I want to do reduce the number of columns.
Clearly I cannot load this into R, as is, so ...
4
votes
0answers
607 views
What is the correct way to calculate the explained variance of each EOF as calculated from a gappy data set?
I am trying to determine the correct amount of variance explained by each mode of an Empirical Orthogonal Function (EOF) analysis (similar to "PCA") as applied to a gappy data set. (i.e., containing ...
6
votes
2answers
525 views
I'm getting “jumpy” loadings in rollapply PCA in R. Can I fix it?
I have 10 years of daily returns data for 28 different currencies. I wish to extract the first principal component, but rather than operate PCA on the whole 10 years, I want to rollapply a 2 year ...
20
votes
1answer
623 views
How to determine significant principal components using bootstrapping or Monte Carlo approach?
I am interested in determining the number of significant patterns coming out of a Principal Component Analysis (PCA) or Empirical Orthogonal Function (EOF) Analysis. I am particularly interested in ...
5
votes
2answers
476 views
Incorporating a response variable in principal component analysis
I'm a biologist, and I have a large dataset that I'm trying to analyze. Here are the variables I'm working with:
levels of 211 different metabolites in 16 different blood samples (predictor ...
6
votes
3answers
716 views
Do components of PCA really represent percentage of variance? Can they sum to more than 100%?
When reading O'Reilly's Machine Learning For Hackers, it says each component represents a percentage of the variance. I've quoted the relevant part of the page below. Speaking to another expert they ...
2
votes
2answers
188 views
PCA with all categorical factors prior a regression with a continuous response
I realize that similar questions have already been asked and answered, but I am in need of a bit more detail and specific advice as I am new to PCA and statistical methods in general. My question is ...
4
votes
2answers
231 views
How to handle both text and numbers for PCA in R?
I'm relatively new to R and am working with a very large dataset that has a mix of numerical scores (for instance, household income) as well as text values (i.e. race). I was planning on using PCA to ...
1
vote
1answer
219 views
In principal components regression, should I weight the regression the same as the PCA? Or at all?
I am using PCA on foreign exchange return series to find a market "beta". I am using 10 years of daily data with a 2-year half life weighting in the PCA using the package FactoMineR's PCA function. I ...
2
votes
1answer
190 views
Is it possible to use common principal components for assessing covariance matrix similarity in R?
Is it possible to use common principal components for assessing covariance matrix similarity in R?
This approach was championed by Flurry, 1988 but this paper is what I have in mind.
References
...
1
vote
1answer
345 views
PCA loadings interpretation
Regarding the final output of PCA:
Using rotation, I'll get a loading for my 50 components, so the equation would be $pc_1=0.05*a_1+0.02*a_2+\dots+0.04*a_{50}$. Now, can I ...
0
votes
1answer
436 views
Principal component analysis in R
I am curerntly running PCA for returns series of 50 stocks for 524 observation. I have completed following steps like I have computed covariance matrix, got the loading for each of them and also ...
0
votes
1answer
241 views
Can empirical orthogonal function (EOF) analysis be used as a predictive model?
I am wondering if I can use the results of EOF to "predict" the EOF loadings of a second set of data?
I have a data set $X$ that consists of sampled light spectra (each column represents a sample and ...
0
votes
0answers
43 views
PCA prcomp function of R [duplicate]
Possible Duplicate:
PCA on Correlation or Covariance?
I recently used R for some analysis, and encountered the options offered with PCA. The details can be found here:
...
4
votes
1answer
186 views
Using principal component scores as predictors in mixed-model
Would there be any problem with using principal component analysis (e.g. for reduction of dimensionality) so that principal components scores could be used as predictors in a mixed-model? For ...
2
votes
2answers
2k views
Using PCA for feature selection
I'm new to feature selection and I was wondering how you would use PCA to perform feature selection. Does PCA compute a relative score for each input variable that you can use to filter out ...
3
votes
2answers
505 views
How to get coefficients from princomp object in R?
Basically, I want to manually compute what predict(princomp(somedata)) produces.
In order to do that I need to have coefficients matrix so that
...
4
votes
1answer
1k views
How to highlight predefined groups in PCA individual map?
This has a simple answer but it has been eluding me nonetheless.
I have been trying to build a PCA plot from scratch with the ability to plot predefined groups in different colors. I can plot PCA ...
10
votes
2answers
3k views
What is the difference between R functions prcomp and princomp?
Yup, I compared ?prcomp and ?princomp and found something about Q-mode and R-mode PCA. But honestly – I don't understand it. Can ...
3
votes
2answers
243 views
Incremental PCA in R
I am looking for a R package that implements Incremental PCA (online version of PCA)
Is there anybody that knows a piece of code that implements such algorithm?
1
vote
1answer
120 views
Pre-PCA pooling in R
I was just wondering if it is possible to pool the data into groups before doing prcomp() in R? I have i.e. 100 individuals (rows) and 50 measurements(cols) with individuals being grouped in separate ...
0
votes
0answers
109 views
princomp relevant information matrix
I want to get $ relative error = \frac{x-x_{0}}{x}$ between the results of R and mine with pca, to do so I am doing
...
6
votes
3answers
431 views
How to test whether variance explained by first factor of PCA differs across repeated measures conditions?
Context:
I have a study where six numeric variables are measured in each of two repeated measures experimental conditions (n = 200). Lets call the conditions $A$ and $B$ and the variables $A_1, ...
1
vote
1answer
468 views
Eigenvectors corresponding to eigenvalues
In R, the eigen() returns descending sorted eigenvalues. However, the eigenvectors do not correspond to these sorted eigenvalues. How do I identify the eigenvector corresponding to the ith sorted ...
0
votes
1answer
235 views
Clustering of multivariate data
Please I am about to cluster some data based which have about 15 different columns all of which are numbers(Some categorical while some are measurements) also some of my values are missing in some ...