2
votes
2answers
97 views

How to find which variables are most correlated with the first principal component?

I came across an article where the authors did a Principal Component Analysis on gene expression data, and found out the genes that are most correlated to the 1st principal component, and they used ...
0
votes
0answers
15 views

Problems with variable loading in prcomp()

I am using methylKit to perform an analysis on my MethylCAP-bisulfite data. The prcomp() function has been used in "PCASamples" (a command in methylKit) to do PCA ...
-1
votes
0answers
49 views

Principal component Regression Using R

Can anyone explain principal component regression with the help of an example and the code in R? How to interpret the result of a principal component regression? How to find the individual effect of ...
2
votes
0answers
50 views

Using principal component analysis to reduce dimensions of data in R [closed]

I have a dataset which includes 4 separate measures of intelligence. To simplify my analysis, I wanted to express them as "g" a variable based on the shared variation of the 4 measures. A paper I read ...
0
votes
0answers
21 views

Multiple Factor analysis and squared cosines

I am a bit confused on how to proceed using the MFA analysis from FactoMineR in my data set. I am currently working with activity results of 15 bacteria (b1, b2, b3, b4, b5,.., b15), divided into 3 ...
0
votes
1answer
27 views

Multivariate regression or PCA to reduce response variables?

I hope the title is self-explanatory, but essentially I want to know which method is better: does it make sense to use a PCA to reduce a number of response Y variables and then conduct a univariate ...
1
vote
1answer
122 views

Pull out most important variables from PCA

I would like to get the most important variables from a PCA result. I see two clusters in the plot. I now that is possible that there is no only one variable causing this, so maybe I would have to get ...
1
vote
1answer
47 views

Principal components using correlation matrix in R

My understanding is that prcomp and princomp work off the dataset itself (row of observations, across variables in the columns). ...
1
vote
2answers
67 views

Is it important to convert “integer” variables (with 0 or 1 values) to factors?

I am working on a high-dimensional dataset (1776 variables). When I read the csv file, R loads variables (with 0 or 1 values) as class of "integer". Is it important to convert these variables to ...
0
votes
0answers
22 views

Feature selection from wavelet transformation in R

I am new to wavelets. Currently, I am developing a prediction model using time series data. I am using the wavelets package in R. I am taking part of the time ...
0
votes
0answers
40 views

Correlation tests – multivariate correlation matrix?

I just got comments from a reviewer to a submitted article and didn't understand what I should do very well. Here are the tests I performed: We first used principal components analysis (PCA) to ...
2
votes
4answers
77 views

Impractically long running time PCA command in R RStudio

I am using R in RStudio on OS X ver. 10.9.2 on 1.7 GHz Intel Core i7 with 8 GB RAM. I am trying to run a PCA command (prcomp) and plots on a dataset with ...
1
vote
2answers
87 views

R and SPSS differences in pca loadings

I performed two principal components analyses: in R and in SPSS - using the same dataset and the same variables. I got the same results - at least to some point. The eigenvalues are the same (I used ...
0
votes
1answer
173 views

PCA on Binary Data

I having binary data set (yes/no), so can I apply PCA on that. Is it mathematically correct to do that. In my opinion Binary variable can only be subjected to logical operations, so how it can be ...
0
votes
3answers
134 views

Problem with PCA in R (suspiciously high explained variance)

I have always been confused about how to properly interpret PCA results. My data looks like this and it's a big table with more than 5 million rows and 12 columns.(the first few lines are all 0...) ...
0
votes
0answers
46 views

X,Y coordinates confidence ellipses and centroids

As I try to add my PCA ggbiplot a centroid I wonder is the center of the confidence ellipses (X,Y) are the same X,Y coordinates of the centroids?. If so how can I extract them? Thanks
2
votes
0answers
111 views

Calculate centroid in PCA

If I understand correctly in order to calculate a centroid in PCA I can calculate the mean of X points and Y points (e.g., PC1 and PC2). When I run a simple PCA (code below) I don’t get the centroid ...
1
vote
2answers
93 views

Sparse principal component analysis

Does anyone know where I can find an algorithm (as well as an R implementation of it) to carry out sparse principal component analysis?
3
votes
1answer
209 views

Using PC scores or cluster analsis in predictions

I have very big data and low number of observations. So I decided to use PCA to reduce dimension of the data. The following is R example (just an dummy example - for workout): ...
0
votes
1answer
81 views

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

My question is strongly related to this one: PCA and component scores based on a mix of continuous and binary variables. I will basically use the same code, but add a new nominal feature (x6) to the ...
0
votes
0answers
52 views

Interpreting the results of a pca

I applied pca on r using prcomp. I would like to use the main PCs to reduce the size of my problem. In order to do so, I want to express the values of my samples on ...
1
vote
1answer
114 views

How to export and use results of PCA from R?

My ultimate goal is to run a cluster analysis on a data set with > 1 million records. The input variables for the cluster analysis will be the results of a Principal Component Analysis, as well as ...
3
votes
0answers
46 views

R implementation of some new Principal Component Pursuit methods

I'm looking for R packages implementing some new PCA methods. The first one is the Stable Principal Component Pursuit method of Zhou et al. (2010). The second one is the PCA via Outlier Pursuit ...
2
votes
2answers
198 views

PCA: 91% of explained variance on one principal component

I am new to PCA and wanted to do a bit of experimentation on my data set just to see what it looked like (using R). I am not able to give access to the data here since it is confidential. However, if ...
0
votes
0answers
98 views

PCA Using prcomp in R

I'm trying to do principal component analysis (PCA) in R using the prcomp function. My input is a large matrix of 1,188 observations (rows) and 15,462 features (cols). I input this to the function ...
0
votes
3answers
77 views

Problem with PCA

I am trying to do some PC analysis on my data coming from lipids measurements in different samples. I only have one factor: if samples are diabetic or non-dibetic. Here is the PCA graph I get: As ...
1
vote
1answer
101 views

cluster plot: working and interpretation ?

Recently I have come across usage of cluster plot, which combines k-mean clustering along with PCA. The plot shows different clusters plotted using first two PCs. I have checked some of the threads ...
0
votes
0answers
21 views

Calculate the correlation between a principal component and a feature of the original data set in R?

I am interested in seeing the correlation between a particular principal component and a particular independent variable in my 'original' data set, that is, I'd like to calculate $\rho_{Y_{i},X_{k}} ...
1
vote
0answers
26 views

What does the predict() function on a PCA model return? [closed]

Specifically, when I add "newdata": ...
0
votes
0answers
30 views

Programming Multiple Variable PCA Ratios

I would like to generalize Paul Teetor's A Better Hedge Ratio, which uses prcomp() to determine a TLS ratio between two variables. I am hoping to extend this to multiple variables, but am having ...
1
vote
0answers
73 views

Comparing isomap residual variance to pca variance

I am using R princomp function (from stats package) to run a PCA on a data set and I want to compare its output to that of the nonlinear dimensionality reduction method ISOMAP, which I am using under ...
0
votes
0answers
31 views

KPCA in R proportion of variability explained

I'm using kpca function from kernlab and try to get the proportion of variance explained by each component as in standard pca. I ...
1
vote
0answers
68 views

PCA figure formatting options in R

I've completed PCA analysis, in R with VEGAN package, of some ecological data on tree health. There are 80 trees total (so, 80 'sites') divided into four treatment categories. I've got the data ...
0
votes
0answers
103 views

Significant difference between two correlation matrices

We have two huge correlation matrices at different experimental conditions. If we want to identify the significant differences between these matrices , what would be the ideal method. I have ...
7
votes
3answers
338 views

A toy model of Principal Components Analysis in R

I'm working in R through an excellent PCA tutorial by Lindsay I Smith and am getting stuck in the last stage. The R script below takes us up to the stage (on p.19) where the original data is being ...
0
votes
0answers
11 views

Error trying to reduce my data dimentions [duplicate]

I'm trying to produce a linear regression model, but I only have 25 observations and 34 predictors. I'm trying feature selection, ...
9
votes
2answers
453 views

Why do PCA scores differ in sign?

Consider this: ...
1
vote
2answers
182 views

PCA of hyperspectral image data

I have some hyperspectral image data similar to this, and I want to do a PCA on it. The problem: I've never done a PCA, and its specially difficult for me to do it on 3D data. How can I do it in ...
1
vote
2answers
161 views

Predict only the first N principal components in a PCA analysis

I'm using R to analyze a very large dataset. I conduct a PCA on one dataset, PCA <- prcomp(formula = ~., data = train, scale = T, na.action=na.exclude) and ...
1
vote
1answer
89 views

Computing scalar/dot product between principal component and data

I am very new to R and statistics so this may be a simple question. I have a matrix (1000,756) containing 1000 years of winter sea-level pressure data (SLP) at 756 locations in the North Atlantic. I ...
1
vote
2answers
162 views

Reconstruction error of PCA when space dimensionality is larger than number of points

I've got a question and I have done several experiments in R, yet couldn't figure out why. The question is for a data set of N*D, N for number of data points and D for dimension, the maximum number ...
1
vote
1answer
131 views

What variables explain which PCA components?

Using this data: head(USArrests) nrow(USArrests) I can do a PCA as thus: plot(USArrests) otherPCA <- princomp(USArrests) ...
1
vote
1answer
333 views

Doing EOF analysis in R

I am very new to R and statistics as a whole so this may be a very simple question. I am trying to carry out empirical orthogonal function (EOF) analysis of sea-level pressure (SLP) data to determine ...
5
votes
1answer
340 views

Interpret clustering plotted in the first two principal components

I got this plot when I plotted a clustering object in R. If I run km <- clara(data, 2), then plot(km), I get a similar ...
0
votes
0answers
69 views

princomp loadings

My main goal is a model of the form Y ~ D + N . But lets say N and D correlate strongly so I decide to do a PCA on them I can do.. ...
1
vote
1answer
138 views

Using principal component analysis (PCA) for feature selection in regression [duplicate]

I have a dataset $D$ made of $m$ samples and $n$ features with $n \gg m$. For each sample I have a score $s$ which I would like to be able to predict. As the number of features is very high (compared ...
5
votes
1answer
1k views

Can the scaling values in a linear discriminant analysis (LDA) be used to plot explanatory variables on the linear discriminants?

Using a biplot of values obtained through principal component analysis, it is possible to explore the explanatory variables that make up each principle component. Is this also possible with Linear ...
2
votes
0answers
227 views

Multivariate orthogonal regression in R

I have a project in which I need to perform orthogonal regression in a multivariate space. For the univariate case, I've found Teetor's R Cookbook suggests using principle components: ...
3
votes
1answer
321 views

What are the units in this biplot?

This is a plot of my data These are the values: ...
2
votes
0answers
54 views

PCA for predictors in lmm or glmm

Imagine we have the following mixed model mod <- lmer(y ~ x + z +(1|g), data = dat) where: ...