similar to: searching through a matrix

Displaying 20 results from an estimated 10000 matches similar to: "searching through a matrix"

2005 Feb 07
5
Creating a correlation Matrix
Hi all: I have a question on how to go about creating a correlation matrix. I have a huge amount of data....21 variables for 3471 times. I want to see how each of the variables correlate to each other. Any help would be appreciated, including which package and which functions I should use to do this. Thanks, Jessica Higgs Masters Student Department of Meteorology Penn State University
2005 Jan 28
2
using RODBC
I am trying to bring data into R from an excel spreadsheet in order to perform several statistical tests on it. I was trying to use odbcConnectExcel in the RODBC package. Once I am connected to the excel file, how do I select rows and columns from the file in order to analysis them in R.
2012 Jun 28
1
plot.prcomp() call/eval
Hi! I am getting a lot of numbers in the background of the pca screeplots if i use call("plot") and eval(somecall). Til now, creating the calls and plotting later on this way worked fine. Example: pcaI<-prcomp(iris[,1:4]) plot(pcaI) x<-call("plot",pcaI) eval(x) Anyone got an idea how i can avoid that? (also it might take a second or so for the numbers to appear,
2012 May 07
3
How to plot PCA output?
I have a decent sized matrix (36 x 11,000) that I have preformed a PCA on with prcomp(), but due to the large number of variables I can't plot the result with biplot(). How else can I plot the PCA output? I tried posting this before, but got no responses so I'm trying again. Surely this is a common problem, but I can't find a solution with google? The University of Dundee is a
2005 Apr 22
1
dr ()
Hi all-- A quick question about the dr () function. I am using this function to reduce the dimensions of a data set I have that involves 14 predictor variables and one predictant or response. The goal is to discover which variables play the most important role in determining the response and, thus, to reduce the variables. I would like to use the sliced inverse regression method (SIR) within
2013 Oct 03
1
prcomp - surprising structure
Hello, I did a pca with over 200000 snps for 340 observations (ids). If I plot the eigenvectors (called rotation in prcomp) 2,3 and 4 (e.g. plot (rotation[,2]) I see a strange "column" in my data (see attachment). I suggest it is an artefact (but of what?). Suggestion: I used prcomp this way: prcomp (mat), where mat is a matrix with the column means already substracted followed by a
2011 Mar 09
1
biplot breakdown help
Hi, I am trying to understand how the biplot.prcomp is constructed so I can manipulate it to emphasise particular observations and reduce the number of variables shown. The prcomp model I have ran has cor=TRUE and scale=TRUE I have worked out from looking at str(prcomp.model) that... prcomp.model$x = the observations ploted in the biplot prcomp.model$rotation = the variables that form the
2009 Mar 08
2
prcomp(X,center=F) ??
I do not understand, from a PCA point of view, the option center=F of prcomp() According to the help page, the calculation in prcomp() "is done by a singular value decomposition of the (centered and possibly scaled) data matrix, not by using eigen on the covariance matrix" (as it's done by princomp()) . "This is generally the preferred method for numerical accuracy"
2005 Oct 18
3
Finding code for R functions
Greetings, I am trying to figure out how to find the source code for R functions. I am specifically interested in finding the code for the "prcomp" function. I know that typing the function name without parenthesis will lead to the code (or to a .Internal or .FORTRAN or .C call). However, I don't really understand what is going on. For example, typing "mean" gives a
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
2008 Mar 06
2
Clustering large data matrix
Hello, I have a large data matrix (68x13112), each row corresponding to one observation (patients) and each column corresponding to the variables (points within an NMR spectrum). I would like to carry out some kind of clustering on these data to see how many clusters are there. I have tried the function clara() from the package cluster. If I use the matrix as is, I can perform the clara
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)
2005 Feb 17
1
eigen vector question
Sorry to bother everyone, but I've looked in all of the help files and manuals I have and I can't find the answer to this question. I'm doing principle component analysis by calculating the eigen vectors of a correlation matrix that I have that is composed of 21 parameters. I have the eigen vectors and their values that R produced for me but I'm not sure how to tell which
2006 Mar 25
1
Suggest patch for princomp.formula and prcomp.formula
Dear all, perhaps I am using princomp.formula and prcomp.formula in a way that is not documented to work, but then the documentation just says: formula: a formula with no response variable. Thus, to avoid a lot of typing, it would be nice if one could use '.' and '-' in the formula, e.g. > library(DAAG) > res <- prcomp(~ . - case - site - Pop - sex, possum)
2010 Nov 10
2
prcomp function
Hello, I have a short question about the prcomp function. First I cite the associated help page (help(prcomp)): "Value: ... SDEV 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). ROTATION the matrix of variable loadings
2006 Jun 16
2
bug in prcomp (PR#8994)
The following seems to be an bug in prcomp(): > test <- ts( matrix( c(NA, 2:5, NA, 7:10), 5, 2)) > test Time Series: Start = 1 End = 5 Frequency = 1 Series 1 Series 2 1 NA NA 2 2 7 3 3 8 4 4 9 5 5 10 > prcomp(test, scale.=TRUE, na.action=na.omit) Erro en svd(x, nu = 0) : infinite or missing values in 'x'
2004 Jan 15
2
prcomp scale error (PR#6433)
Full_Name: Ryszard Czerminski Version: 1.8.1 OS: GNU/Linux Submission from: (NULL) (205.181.102.120) prcomp(..., scale = TRUE) does not work correctly: $ uname -a Linux 2.4.20-28.9bigmem #1 SMP Thu Dec 18 13:27:33 EST 2003 i686 i686 i386 GNU/Linux $ gcc --version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > a <- matrix(rnorm(6), nrow = 3) > sum((scale(a %*% svd(cov(a))$u, scale
2016 Mar 22
3
Memory usage in prcomp
Hi All: I am running prcomp on a very large array, roughly [500000, 3650]. The array itself is 16GB. I am running on a Unix machine and am running ?top? at the same time and am quite surprised to see that the application memory usage is 76GB. I have the ?tol? set very high (.8) so that it should only pull out a few components. I am surprised at this memory usage because prcomp uses the SVD
2016 Mar 22
3
Memory usage in prcomp
Hi All: I am running prcomp on a very large array, roughly [500000, 3650]. The array itself is 16GB. I am running on a Unix machine and am running ?top? at the same time and am quite surprised to see that the application memory usage is 76GB. I have the ?tol? set very high (.8) so that it should only pull out a few components. I am surprised at this memory usage because prcomp uses the SVD
2005 Nov 18
1
pr[in]comp: predict single observation when data has colnames (PR#8324)
To my knowledge, this has not been reported previously, and doesn't seem to have been changed in R-devel or R-patched. If M is a matrix with coloumn names, and mod <- prcomp(M) # or princomp then predicting a single observation (row) with predict() gives the error Error in scale.default(newdata, object$center, object$scale) : length of 'center' must equal the number of