similar to: About princomp

Displaying 20 results from an estimated 1000 matches similar to: "About princomp"

2008 Jan 13
1
What is the 'scale' in princomp() function?
Dear R users, When I tried to use princomp() from stats packages to do Principal Components Analysis, I am not very clear what is the "scale". And the scores are different from "PROC PRINCOMP" procedure from SAS. Using the example data from this package: restpc <- princomp(USArrests, cor = TRUE) > restpc$scale Murder Assault UrbanPop Rape 4.311735 82.500075
2004 Nov 03
2
Princomp(), prcomp() and loadings()
In comparing the results of princomp and prcomp I find: 1. The reported standard deviations are similar but about 1% from each other, which seems well above round-off error. 2. princomp returns what I understand are variances and cumulative variances accounted for by each principal component which are all equal. "SS loadings" is always 1. 3. Same happens
2003 Jul 15
2
"na.action" parameter in princomp() (PR#3481)
Full_Name: Jerome Asselin Version: 1.7.1 OS: Red Hat Linux 7.2 Submission from: (NULL) (24.77.125.119) Setting the parameter na.action=na.omit should remove incomplete records in princomp. However this does not seem to work as expected. See example below. Sincerely, Jerome Asselin data(USArrests) princomp(USArrests, cor = TRUE) #THIS WORKS USArrests[1,3] <- NA princomp(USArrests, cor =
2006 Jul 31
1
How does biplot.princomp scale its axes?
I'm attempting to modify how biplot draws its red vectors (among other things). This is how I've started: Biplot <- function(xx, comps = c(1, 2), cex = c(.6, .4)) { ## Purpose: Makes a biplot with princomp() object to not show arrows ## ---------------------------------------------------------------------- ## Arguments: xx is an object made using princomp() ##
2009 Dec 24
1
bug in princomp example (PR#14167)
When I run example(princomp) I get the following error message: prncmp> ## The variances of the variables in the prncmp> ## USArrests data vary by orders of magnitude, so scaling is appropriate prncmp> (pc.cr <- princomp(USArrests)) # inappropriate Error in cov.wt(z) : 'x' must contain finite values only Seth Roberts -- blog.sethroberts.net www.shangriladiet.com
2011 Jun 30
2
sdev value returned by princomp function (used for PCA)
Dear all, I have a question about the 'sdev' value returned by the princomp function (which does principal components analysis). On the help page for princomp it says 'sdev' is 'the standard deviations of the principal components'. However, when I calculate the principal components for the USArrests data set, I don't find this to be the case: Here is how I
2009 Nov 25
1
which to trust...princomp() or prcomp() or neither?
According to R help: princomp() uses eigenvalues of covariance data. prcomp() uses the SVD method. yet when I run the (eg., USArrests) data example and compare with my own "hand-written" versions of PCA I get what looks like the opposite. Example: comparing the variances I see: Using prcomp(USArrests) ------------------------------------- Standard deviations: [1] 83.732400 14.212402
2010 May 06
1
how to get components / factors in factanal / princomp not loadings
Dear all, i wonder if there?s a command to obtain the actual values of a principal component or a factor (not as.factor, but factanal) . test=princomp(USArrests, cor = TRUE) summary(test) just outputs, standard deviation, Prop of Variance and cumulative proportion of variance. test$loadings offers yet another proportion of variance scheme. why is that? Apart from that: Is there a
2010 Nov 25
1
RODBC
Hi, I am running the RODBC examples form the help guide. I am trying to UPDATE a table in an Access data base but I am having an error. library(RODBC) library(termstrc) path = getwd() setwd(getwd()) dbName = "data.mdb" pathdbname = paste(path,"/",dbName,sep="") accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "")
2004 Nov 25
3
Searching for a string in RSQLite
I'd like to search for a particular string in an SQLite database using RSQLite, but I'm running into problems constructing the query properly, because of embedded quotes and parens in the string. Is there a function that escapes these for me, or some other fixup that would let me do the queries below? In the real situation I don't have control over what strings get searched for.
2003 Apr 02
1
RODBC sqlSave problem.
Dear list, Being new to both the postgres database, ODBC and the RODBC interface, I am somewhat confused by some of the problems I am experiencing trying to connect R to the database. Whai I am trying is basically the example part of the help file for the sqlSave function: > library(RODBC) > odbcConnect("theodor") -> channel > data(USArrests) > sqlSave(channel,
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
2008 Jul 15
3
playwith package crashes on Mac
Dear R-helpers, I tried the playwith packages for the first time, and it crashed R: > require(playwith) Loading required package: playwith Loading required package: lattice Loading required package: grid Loading required package: gWidgets Loading required package: gWidgetsRGtk2 Loading required package: RGtk2 Loading required package: cairoDevice > sessionInfo() R version 2.7.1
2009 Apr 30
1
Creating datasets in packages
I am developing an R package which includes datasets. The build and install works correctly. However, when I access the dataset ("BowRiver"), I get: > data(BowRiver) > BowRiver Error: object "BowRiver" not found. However, I can access the dataset from > data Example R datasets (such as USArrests) are loaded and can be accessed by the dataset name: >
2006 Sep 06
2
biplot label size
Which is the parameter that is used to decrease the size of ylabs plotted in biplot? I tried playing with cex and cex.lab I am not getting it right pc <- princomp(USArrests) biplot(pc, xlabs = rep("", nrow(USArrests)),ylabs=(colnames(USArrests))) Thanks../Murli [[alternative HTML version deleted]]
2003 Apr 04
2
biplot
Dear list, I want to perform a biplot, using customized titels for the x and y axis. Setting xlab="" and ylab="" resulted in an error, e.g.: > data(USArrests) > biplot(princomp(USArrests),xlab="",ylab="") Error in biplot.default(t(t(scores[, choices])/lam), t(t(x$loadings[, : length of dimnames[1] not equal to array extent > How do I
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 Apr 20
1
Quick question about princomp/biplot
Hi everyone. I performing a simple PCA using the princomp function. Then, I use the biplot function to show it. However, the function use line number to represent samples. I would like to know if there's a way to use a dot (point) instead of the line number when using the biplot function. With regards, Phil -- View this message in context:
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
2017 Aug 09
1
arithmetic with zero-column data.frames
So as often there is more to it than you first think. Let's consider this an RFC (for experienced long time R users) : >>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Wed, 9 Aug 2017 10:45:56 +0200 writes: >>>>> William Dunlap via R-devel <r-devel at r-project.org> >>>>> on Tue, 8 Aug 2017 11:59:45