Displaying 19 results from an estimated 19 matches similar to: "sdev value returned by princomp function (used for PCA)"
1999 Sep 09
1
princomp
Peter,
As I understand your Q. You probably have data that is similar to each other
like stock Prices for all RHS variable. In that case the difference between corr
and cov is not significant; however, if your RHS contains totally dissimilar
variables it matters a great deal. If x1 income, x2 job type, x3 Education
level, etc..., then taking cov of these variables would not be desireable
2011 Aug 09
2
S4 classes, some help with the basics
Hi All,
I have tried to find an answer within documentation, but I cannot:
o How can call a class "slot" without knowing the name a priori?
E.g., let's say I use the "pcaMethods" library to create a "pcaRes"
object. How can I call parts of that object without using the specific
names of the object in the call?
example code:
library(pcaMethods)
2010 Apr 16
1
PCA scores
Hi all,
I have a difficulty to calculate the PCA scores. The PCA scores I calculated
doesn't match with the scores generated by R,
mypca<-princomp(mymatrix, cor=T)
myscore<-as.matrix(mymatrix)%*%as.matrix(mypca$loadings)
Does anybody know how the mypca$scores were calculated? Is my formula not
correct?
Thanks a lot!
Phoebe
[[alternative HTML version deleted]]
2000 Jul 20
1
Installing R-1.1.0 (PR#612)
Dear R-developers,
I finally got around to install R 1.1.0 but had problems at the `make
check' stage.
After compiling the released R 1.1.0 version the `make check' stage
stopped while checking the examples in base. There was some problem
with the quantile function and the check stopped complaining that NA's
are not allowed.
But I assume that this problem is already known because
2008 Nov 03
1
Input correlation matrix directly to princomp, prcomp
Hello fellow Rers,
I have a no-doubt simple question which is turning into a headache so
would be grateful for any help.
I want to do a principal components analysis directly on a correlation
matrix object rather than inputting the raw data (and specifying cor =
TRUE or the like). The reason behind this is I need to use polychoric
correlation coefficients calculated with John Fox's
2012 Feb 22
1
xtable prcomp
Hi, I need to export to LaTex the summary of a PCA. So:
myPCA <- prcomp(myDF)
mySummary <- summary(myPCA)
#
print(xtable(mySummary))
How can I export to LaTeX not all the summary but only the first nPCs??
Best
Riccardo
2005 Jul 08
2
extract prop. of. var in pca
Dear R-helpers,
Using the package Lattice, I performed a PCA.
For example
pca.summary <- summary(pc.cr <- princomp(USArrests, cor = TRUE))
The Output of "pca.summary" looks as follows:
Importance of components:
Comp.1 Comp.2 Comp.3 Comp.4
Standard deviation 1.5748783 0.9948694 0.5971291 0.41644938
Proportion of Variance 0.6200604
2013 Jul 10
3
PCA and gglot2
Hi,
I was trying as well as looking for an answer without success (a bit strange
since it should be an easy problem) and therefore I will appreciate you
help:
My simple script is:
# Loadings data of 5 columns and 100 rows of data
data1<-read.csv("C:/?/MyPCA.csv")
pairs(data1[,1:4])
pca1 <- princomp(data1[,1:4], score=TRUE, cor=TRUE)
biplot(pca1)
The biplot present the data
2009 Oct 28
2
Labelling individual points on 3D PCA scatterplot
Hi There,
I'm attempting to plot 10 values on a three-dimensional PCA with text labels
next to each point. While i have no trouble doing this on 2D plots using the
'text' or 'textxy' function, I cannot find a function to do this on a 3D
plot.
I am using princomp for my PCA:
>PCA<-princomp(eucdata, cor=TRUE)
>PCA$scores [,1:3] # the three principal components i
2004 Jul 20
3
regression slope
Hello,
I'm a newcomer to R so please
forgive me if this is a silly question.
It's that I have a linear regression:
fm <- lm (x ~ y)
and I want to test whether the
slope of the regression is significantly
less than 1. How can I do this in R?
I'm also interested in comparing the
slopes of two regressions:
fm1 <- lm (x ~ y)
fm2 <- lm (a ~ b)
and asking if the slope of fm1 is
2007 Nov 22
3
question about extreme value distribution
Hello,
I have a question about using extreme
value distribution in R.
I have two variables, X and Y, and have pairs
of points (X1,Y1),(X2,Y2), (X3,Y3) etc.
When I plot X against Y, it looks
like the maximum value of Y (for a particular X) is
correlated with X.
Indeed, when I bin the data by X-value into
equally sized bins, and test whether the maximum
value of Y for a bin is correlated with
2004 Oct 29
3
missing values in logistic regression
Dear R help list,
I am trying to do a logistic regression
where I have a categorical response variable Y
and two numerical predictors X1 and X2. There
are quite a lot of missing values for predictor X2.
eg.,
Y X1 X2
red 0.6 0.2 *
red 0.5 0.2 *
red 0.5 NA
red 0.5 NA
green 0.2 0.1 *
green 0.1 NA
green 0.1 NA
green 0.05 0.05 *
I am wondering can I combine X1 and
2011 Aug 25
2
within-groups variance and between-groups variance
Hello,
I have been looking for functions for calculating the within-groups
variance and between-groups variance, for the case where you have
several numerical variables describing samples from a number of groups.
I didn't find such functions in R, so wrote my own versions myself (see
below). I can calculate the within- and between-groups variance for the
Sepal.length variable (iris[1]) in
2000 Oct 03
3
prcomp compared to SPAD
Hi !
I've used the example given in the documentation for the prcomp function
both in R and SPAD to compare the results obtained.
Surprisingly, I do not obtain the same results for the coordinates of
the principal composantes with these two softwares.
using USArrests data I obtain with R :
> summary(prcomp(USArrests))
Importance of components:
PC1 PC2
2004 Jul 27
1
test for difference between non-independent correlations
Hello,
I am wondering whether there is a way to
test whether two non-independent correlation
coefficients are significantly different, in R?
I have an experimentally measure variable Y,
and two different variables X1, and X2, which
are predictions of Y that were predicted using
two different computational models.
I would like to see whether the correlation
of Y and X1, and Y and X2 is
2012 Apr 09
1
sdev, variance in prcomp
Hello,
It might be a trivial question but I just wanted to find out the relationship between sdev and proportion of variance generated by prcomp. I got the following result from my data set
???????????????????????????? PC1????? PC2????? PC3
Standard deviation???? 104.89454 15.40910 9.012047
Proportion of Variance?? 0.52344? 0.01130 0.003860
Cumulative Proportion??? 0.52344? 0.53474 0.538600
2012 Jun 20
1
prcomp: where do sdev values come from?
In the manual page for prcomp(), it says that sdev is "the standard
deviations of the principal components (i.e., the square roots of the
eigenvalues of the covariance/correlation matrix, though the
calculation is actually done with the singular values of the data
matrix)." ?However, this is not what I'm finding. ?The values appear
to be the standard deviations of a reprojection of
2011 Jun 09
0
booklet on using R for time series analysis
Dear all,
I've written a small booklet on using R for time series analysis,
available here :
http://a-little-book-of-r-for-time-series.readthedocs.org/
<http://a-little-book-of-r-for-time-series.readthedocs.org/>
It is just a little booklet for beginners like myself (I am studying
Stats, and mostly wrote it to help myself study and understand this
material), but thought it
2004 Jun 09
1
testing effects of quantitative predictors on a categorical response variable
Hello,
I have a small statistics question, and
as I'm quite new to statistics and R, I'm not
sure if I'm doing things correctly.
I am looking at two quantitative
variables (x,y) that are correlated.
When I divide the data set according to a categorical
variable z, then x and y are more poorly correlated
when z = A than when z = B (see attached figure).
In fact x and y are two