As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [pca]

Principal component analysis (PCA) is a linear dimensionality reduction technique. It reduces a multivariate dataset to a smaller set of constructed variables preserving as much information (as much variance) as possible. These variables, called principal components, are linear combinations of the input variables.

Filter by
Sorted by
Tagged with
2 votes
1 answer
336 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 ...
4 votes
2 answers
826 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
1 answer
987 views

Use of further analysis on factors formed by principal component analysis in regression

I want to find out the relationship between 6 independent variable (4 categorical, 2 continuous) and 6 dependent variables (5 likert scale). As my data is categorical (likert scale) I thought of using ...
5 votes
3 answers
3k views

Jaccard Indexes and PCA

Does it make sense to use a matrix that is made up of jaccard indexes instead of a covariance matrix and perform principal component analysis on that?
2 votes
1 answer
1k views

PCA's principle and available algorithms

If I understand correctly, PCA's principle is very simple: Calculate data vectors' covariance matrix C. Solve det(C - e*I) = 0, to find matrix C's eigenvalues e. Calculate matrix C's eigenfunctions (...
5 votes
2 answers
4k views

Understanding condition index used for finding multicollinearity

In linear models, in my book, the condition index is defined as $\sqrt{\lambda_{max} \over \lambda_{min}}$ where $\lambda_{max}$ is the maximum eigenvalue of $ZZ^*$, i.e., the correlation matrix of ...
3 votes
1 answer
645 views

Which are the most effective methods for selecting independent variables?

Some clustering algorithms require independence of variables but (especially working with real data) variables are often highly correlated. I have been suggested to apply a Principal Component ...
3 votes
0 answers
253 views

How do I derive principal components taking account of repeated measures?

I have data from a 24-item (each item ordinal) scale used at two time points in 2 groups - before and after treatment with treatment A and treatment B. I want to capture a core group of symptoms that ...
1 vote
3 answers
2k views

Can two different data sets get the same eigenvector in PCA?

As we know, we can get the same eigenvector if we apply PCA to the same data. But, is it possible that we get the same eigenvectors after we apply PCA to two totally different data sets (still same ...
6 votes
2 answers
2k views

One component in PCA is always the mean vector in two-dimensions but not three [duplicate]

I've been testing PCA via SVD to decompose a simple time series data matrix, $X$. I have two signals $x_1(t)$ and $x_2(t)$ in a data matrix where $M$ rows represents each timepoint sample and each ...
7 votes
3 answers
2k views

Is the matrix dimension important for performing a valid PCA?

If $X$ is a $m × n$ matrix, where $m$ is the number of measurement types (variables) and $n$ is the number of samples, would it be correct to perform a PCA on a matrix that has $m \geq n$ ? If ...
1 vote
0 answers
100 views

Comparing original variables with characteristic values of diagonalized variance-covariance matrix

If I have a reference data set comprising repeated measurements of 3 variables of a system in state $A$. Given new observations of these variables for a different system I would like to classify ...
1 vote
1 answer
3k views

Principal component analysis before nearest neighbor search

I have a large data table (~500,000 rows) of normalized metrics (by Z-score) that looks like this: ...
7 votes
2 answers
2k views

Simulated annealing and k-means

One of my problems https://stackoverflow.com/questions/7783933/clustering-data-outputs-irregular-plot-graph suffers from the curse of dimensionality, which also makes it infeasible for exhaustive ...
2 votes
0 answers
848 views

Can it be valid to standardize non-normal data going into a PCA?

I have a collection of highly non-normal behavioral variables measured for each animal in a given test. I would like to reduce to 2 or 3 scores to characterize the individual's test using PCA. I see ...
3 votes
1 answer
4k views

Calculating principal component scores after PC analysis

I am carrying out a study to find out meteorological patterns using daily met observations including around 30 met parameters (each day is a case with 30 variables). My methodology includes carrying ...
5 votes
3 answers
10k views

PCA to decorrelate variables

I have 2 variables that I want to decorrelate. I was told I can use PCA to do so. I did PCA on the data and got all the parameters. Now how do I get the new set of transformed data that no longer ...
7 votes
5 answers
7k views

Does PCA have any advantages or usages in the frequency domain?

My question is about analysis of signals with PCA in the frequency domain. As frequency analysis offers a powerful tool for signal processing, does Principal Component Analysis (PCA) have any "well-...
8 votes
5 answers
3k views

Dimensionality reduction technique to maximize separation of known clusters?

So let's say I have a bunch of data points in R^n, where n is pretty big (like, 50). I know this data falls into 3 clusters, and I know which cluster each data point is a part of. All I want to do is ...
7 votes
3 answers
3k views

Whether to use EFA or PCA to assess dimensionality of a set of Likert items

This follows on from my previous question on assessing reliability. I designed a questionnaire (six 5-points Likert items) to evaluate the attitude of a group of users toward a product. I would like ...
2 votes
1 answer
2k views

prcomp() vs lm() results in R [duplicate]

I have a simple matrix: [,1] [,2] [,3] [1,] 1 2 3 [2,] 4 5 6 [3,] 7 8 9 [4,] 10 11 12 I have to calculate linear regression ...
2 votes
1 answer
3k views

How to estimate correlation matrix from largest eigenvalues?

I'm trying to estimate a correlation matrix from the 5 largest eigenvalues and associated eigenvectors of the sample correlation matrix. My problem is that the output from the following Matlab code ...
30 votes
2 answers
22k views

Is PCA unstable under multicollinearity?

I know that in a regression situation, if you have a set of highly correlated variables this is usually "bad" because of the instability in the estimated coefficients (variance goes toward infinity as ...
3 votes
1 answer
3k 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 ...
4 votes
1 answer
531 views

PCA with covariance matrix calculated using random matrix theory in R

I would like to perform a PCA and use the covariance matrix obtained by the random matrix theory. Is there an implementation of this in R? I am currently using the standard prcomp function from ...
10 votes
1 answer
704 views

How to interpret results of dimensionality reduction/multidimensional scaling?

I performed both a SVD decomposition and a multidimensional scaling of a 6-dimensional data matrix, in order to get a better understanding of the structure of the data. Unfortunately, all the ...
9 votes
1 answer
3k views

Plotting a discriminant as line on scatterplot

Given a data scatterplot I can plot the data's principal components on it, as axes tiled with points which are principal components scores. You can see an example plot with the cloud (consisting of 2 ...
2 votes
0 answers
457 views

Approximate vs. Strict Factor model specification in R [closed]

Background: Generally, pooled time-series cross-sectional regressions utilize a strict factor model (i.e. require the covariance of residuals is zero). However, in time series such as security returns ...
7 votes
0 answers
408 views

What, if any, dissimilarity is preserved in partial least squares (PLS)?

When we perform a principal components analysis (PCA) on a multivariate data set we are interested in finding orthogonal components that explain maximal variance in the data set. We can form a biplot ...
4 votes
0 answers
1k views

What is the difference between scores in Princomp vs. factanal? [duplicate]

In R the princomp()and the factanal() are somewhat similar. At least their output looks pretty similar. I learned that this is ...
2 votes
0 answers
139 views

Performing PCA for normal score transformed data

In an attempt to improve the results of Bayesian NNT, I transformed the 7 variables that I have into normal scores (subtracted the mean and divided by SD). Then I used a PCA on the transformed ...
13 votes
1 answer
3k views

PCA and component scores based on a mix of continuous and binary variables

I want to apply a PCA on a dataset, which consists of mixed type variables (continuous and binary). To illustrate the procedure, I paste a minimal reproducible example in R below. ...
8 votes
4 answers
2k views

How can one extract meaningful factors from a sparse matrix?

I am interested in finding some practical (and reasonably well accepted) techniques for finding the underlying factors of a sparse matrix. Specifically, I have a very large sparse matrix whose ...
1 vote
0 answers
360 views

How can I improve a simple regression here?

I'm trying to solve the following issue : Let's say that I have three normal random variables a,b,c, non correlated. Let's say that I only have two observations of these, M and N where : ...
2 votes
4 answers
490 views

Statistically group chemical batches

I have 80 chemical batches, each of which has 8 associated measurements like pH, viscosity, etc. Is there a way to use Principal Components Analysis or Factor Analysis to group the similar batches ...
2 votes
2 answers
237 views

Sampling dataset, choosing among N dimensions

I'm new in stats, and maybe this is a duplicated question, but I could not find a similar one. I'm trying to reduce a dimension of my dataset. Maybe reduce is not a good word. I need to sample some ...
6 votes
1 answer
298 views

Principal components of spatial variables

I have a number of rasters of environmental data (~10) which may be important predictors for modelling species presence and abundance at ~10 different locations. I would like to know which of the ...
9 votes
1 answer
973 views

Correlating continuous clinical variables and gene expression data

In SVM (linear kernel) classification analyses of a data-set of gene expression (~400 variables/genes) for ~25 each of cases and controls, I find that the gene expression-based classifiers have very ...
7 votes
4 answers
2k views

How to create one score from a mixed set of positive and negative variables?

I have 3,000 observations (administrative communities) characterized by five variables. Four of them work in the direction 'the more, the worse' and one goes in the opposite. I'd like to create one ...
1 vote
1 answer
2k views

Variation in PCA weights [closed]

I have weights of SNP variation (output through Eigenstrat program) for each SNP for the three main PCs. I wish to reduce my list of SNPs to those that show maximum differentiation between the three ...
3 votes
2 answers
1k views

Repeated measures with correlated measures (not time)

Most repeated measures ANOVAs have time as the repeated measure; I was wondering about using a repeated measure that is not time. Say we fed two groups of animals different diets. At the end of the ...
5 votes
1 answer
646 views

Question about probabilistic principal component analysis

I have a rather basic question about Probabilistic Principal Component Analysis, which I am now trying to apply to a real-world problem. In PPCA, the crucial assumption is that the generating ...
4 votes
0 answers
136 views

How can I rediscretize my data?

Related to my previous question, I have a dataset of 2D points with an associated label (this label can take 6 different values). As suggested in the answers to my other question, this can be modeled ...
10 votes
2 answers
876 views

How to find relationships between different types of events (defined by their 2D location)?

I have a dataset of events that happened during the same period of time. Each event has a type (there are few different types, less then ten) and a location, represented as a 2D point. I would like ...
8 votes
3 answers
1k views

How to visualize the true dimensionality of the data?

I have a dataset that's nominally 16-dimensional. I have about 100 samples in one case and about 20,000 in another. Based on various exploratory analyses I've conducted using PCA and heat maps, I'm ...
4 votes
1 answer
733 views

Do correlations relate to PCA eigenvectors and can PCA be used for clustering?

Does the magnitudes of principal eigenvectors obtained by PCA have anything to do with correlations of original variables, and can we use PCA for clustering? Thanks!
4 votes
1 answer
161 views

Creating groups with multi-dimensional data?

I'm trying to figure out the best way of creating groups in a dataset with many dimensions. I have 1000 measurements, and each measurement has 40 dimensions. The measurements are of neighborhoods with ...
3 votes
1 answer
862 views

PCA Based Filtering but only filter out small values

PCA based filtering is used to identify and eliminate noise in data. This would basically involve computing the PCs and using the top k PCs to denoise the data. What if I know for sure that only the ...
1 vote
2 answers
2k views

Random Sampling and PCA

I am kinda new to stats and understand random sampling, however I am just learning PCA and wondering if it is just a more sophisticated form of sampling? In other words if I have a large data set. and ...
14 votes
5 answers
6k views

SVD dimensionality reduction for time series of different length

I am using Singular Value Decomposition as a dimensionality reduction technique. Given N vectors of dimension D, the idea is to ...