Displaying 20 results from an estimated 600 matches similar to: "extract prop. of. var in pca"
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
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
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
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
2005 Aug 15
1
error in predict glm (new levels cause problems)
Dear R-helpers,
I try to perform glm's with negative binomial distributed data.
So I use the MASS library and the commands:
model_1 = glm.nb(response ~ y1 + y2 + ...+ yi, data = data.frame)
and
predict(model_1, newdata = data.frame)
So far, I think everything should be ok.
But when I want to perform a glm with a subset of the data,
I run into an error message as soon as I want to predict
2005 Feb 23
3
bias of a boot statistic
Question:
How can I get access to the bias value of a boot statistic?
Details:
Boot function:
boot(data, statistic, R, sim="ordinary", stype="i",
strata=rep(1,n), L=NULL, m=0, weights=NULL,
ran.gen=function(d, p) d, mle=NULL, ...)
When I create an object, containing the bootstrap statistic (object <- boot
(....))I can call it and will get an output
2005 Aug 16
1
predict nbinomial glm
Dear R-helpers,
let us assume, that I have the following dataset:
a <- rnbinom(200, 1, 0.5)
b <- (1:200)
c <- (30:229)
d <- rep(c("q", "r", "s", "t"), rep(50,4))
data_frame <- data.frame(a,b,c,d)
In a first step I run a glm.nb (full code is given at the end of this mail) and
want to predict my response variable a.
In a second step, I would
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 = "")
2002 Jan 27
5
EPS->LaTeX problem
Greetings-
I have a strange problem displaying a graph from R (1.3.1, linux) in a
LaTeX document of documentclass seminar.
I'm using graphicx to include the file:
\usepackage{graphicx}
...
\resizebox{\textwidth}{\textheight}{\includegraphics{crime.eps}}
When I do this, the entire slide (including the page number) is rotated
180 degrees. Any ideas why this happens?
The graph was created
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 =
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 Dec 17
2
Easiest way to get the mean of a row of a data.frame?
Dear r-helpers!
I am kind of new to R.
I would like to calculate the mean of the numbers of this expression:
data(USArrests)
USArrests[row.names(M) == "Alabama",]
class() tells me it's a ``data.frame,'' what I actually desire is to get
all numbers of a row as a vector or a list to let mean() calculate the mean
of the whole row. (I know this doesn't make sense
2009 Dec 23
1
prcomp : plotting only explanatory axis arrows
Dear all,
I have a very large dataset (1712351 , 20) and would like
to plot only the arrows that represent the
contribution of each variables.
On the sample below I woild like to plot
only the explanatory variables (Murder, Assault..)
and not the sites.
prcomp(USArrests) # inappropriate
prcomp(USArrests, scale = TRUE)
prcomp(~ Murder + Assault + Rape, data = USArrests, scale = TRUE)
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
2005 Sep 16
1
About princomp
Hi,
I run the example for princomp for R211
I got the following error for biplot
> ## The variances of the variables in the
> ## USArrests data vary by orders of magnitude, so scaling is appropriate
> (pc.cr <http://pc.cr> <- princomp(USArrests)) # inappropriate
Erreur dans cov.wt(z) : 'x' must contain finite values only
> princomp(USArrests, cor = TRUE) # =^=
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 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,
2002 Mar 20
1
RODBC under Windows
Hi,
I have been just playing with the ODBC connectivity under Windows. I have
never done this before and I thought I would go through some examples in
the "Data Import/Export" manual and learn how to setup data connections
while doing that. I ran into a small problem and I am not sure if this is
something I am doing wrong or a bug or, perhaps, a feature of the RODBC
package.
Here is
2010 Jun 16
2
Accessing the elements of summary(prcomp(USArrests))
Hello again,
I was hoping one of you could help me with this problem. Consider the sample data from R:
> summary(prcomp(USArrests))
Importance of components:
PC1 PC2 PC3 PC4
Standard deviation 83.732 14.2124 6.4894 2.48279
Proportion of Variance 0.966 0.0278 0.0058 0.00085
Cumulative Proportion 0.966 0.9933 0.9991 1.00000
How do I access the