Displaying 20 results from an estimated 10000 matches similar to: "Creating a correlation Matrix"
2005 Feb 07
0
R: Creating a correlation Matrix
Hi,
see ?cor in base package to get correlation matrix for
your data. Maybe it could be usefull getting principal
components (give a look to: ? princomp (base)) to
reduce the number of variables.
Hoping I helped you.
Best regards,
Vito
You wrote:
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
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.
2008 Feb 08
2
correlation
Dear list
I would like to compare two measurements of disease severity (M1 and
M2), one of the is continuous (M1 ranging from 1 to 10) and the other
is ordinal (M2 takes Low, Medium, high and very high). Do you think is
ok to use cor() function to test whether the two agree, i.e correlate?
I am afraid that if I set M2 to 1,2,3 and 4, the function cor() will
take them as continuous and
2012 Dec 03
4
How to calculate the spatial correlation of several files?
dir1 <- list.files("C:\\Users\\aalyaari\\Desktop\\cor", "*.bin",
full.names = TRUE)
dir2 <- list.files("C:\\Users\\aalyaari\\Desktop\\cor2", "*.bin",
full.names = TRUE)
results <- list()
for (.files in dir1){ # read in the 365 files as a vector of
numbers for dir1
file1 <- do.call(rbind,(lapply(.files, readBin ,
2007 Jun 12
2
Stock Price Correlation to Index Price Levels
Hi,
This is probably trivial to most people out there, but I'm struggling with this.
I have a data set which contains the closing prices (properly adjusted for dividends and splits) for several hundred securities and the closing prices for a general stock market index (S&P 500). I have no problem getting it into R with RODBC and manipulating it. There are no missing values. I can
2017 Jul 05
3
Question about correlation
Greeting.
Dear Mr/Mrs/Miss,
OTU ID Health Disease
Bacterial 1 0.29 0.34
Bacterial 2 0.25 0.07
Bacterial 3 0.06 0.06
Bacterial 4 0.07 0.09
Bacterial 5 0.02 0.05
Above show the first 6 data sets, may I ask that the reason of R show the
error like "Error in cor(data) : 'x' must be numeric" ? And how to solve
it? Besides, isn't this data can conduct correlation matrix?
2011 Apr 09
3
In need of help with correlations
I am in need of someone's help in correlating gene expression. I'm somewhat
new to R, and can't seem to find anyone local to help me with what I think
is a simple problem.
I need to obtain pearson and spearman correlation coefficients, and
corresponding p-values for all of the genes in my dataset that correlate to
one specific gene of interest. I'm working with mouse Affymetrix
2005 Jun 29
3
moving correlation coef ?
Hello,
R gives us the correlation functions cor(). (Many thanks ;-))
Does it also exist a "moving correlation" coefficient ?
(like the moving average).
If not, could someone give me some infos or link
on how to practically implement such a function in R.
(I did search for "moving correlation" on the R homepage
but didn't find anything.)
Thank you.
Vincent
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
2017 Jul 05
0
Question about correlation
Hi Chin Yi,
If you are trying to correlate "Health" with "Disease", i.e.
cydf<-read.table(text="OTU ID Health Disease
Bacterial 1 0.29 0.34
Bacterial 2 0.25 0.07
Bacterial 3 0.06 0.06
Bacterial 4 0.07 0.09
Bacterial 5 0.02 0.05",
header=TRUE)
print(cor(cydf$Health,cydf$Disease))
[1] 0.7103517
If you are getting that error, it probably means that
2017 Jul 05
2
Question about correlation
On 2017-07-05 11:56, Jim Lemon wrote:
> Hi Chin Yi,
> If you are trying to correlate "Health" with "Disease", i.e.
>
> cydf<-read.table(text="OTU ID Health Disease
> Bacterial 1 0.29 0.34
> Bacterial 2 0.25 0.07
> Bacterial 3 0.06 0.06
> Bacterial 4 0.07 0.09
> Bacterial 5 0.02 0.05",
> header=TRUE)
>
2012 Jul 16
2
Help with correlation matrices, thresholding
Hello, I am new to R and have a problem I have had some trouble with.
Basically I have a list of some 80000 genes or so with data points for
expression levels at various time points/conditions. I also have subsets of
these, usually only a few hundred genes in size, known to be associated with
some biological process.
What I want to do is correlate the entire list with my subset and then
2011 Aug 13
3
Excluding NAs from round correlation
Hello,
I am quite new to R and I am trying to get a round correlation from a table
with dozens of columns. However, all the columns contain several blank
places which show to me as NAs. Then, when I type round(cor(data),2), I get
no results - everything (except correlation of one column with the same one,
of course) is NA.
I do not want to replace NA with zero, because it would ruin the results. I
2011 Nov 16
4
Pairwise correlation
Dear All,
I am not familiar with R yet I want to use it to perform some task, hence my
posting here. I hope someone can help.
I have a set of data, genes (rows) and samples (columns). I want to do a
Pearson correlation on all the possible pairwise combinations of all the
genes (2000). Does anyone have an idea of how to execute this in R?
Thanks in advance.
--
View this message in context:
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
2010 Mar 16
1
Correlation coefficient of large data sets
So I am very new to R. Have been using python for a project and need to
calculate the correlation coefficient matrix for my data set. the data is in
the range of 10-15 observations of 230,000 variables. ie the correlation
matrix would be 230,000X230,000 Using python and the numpy.corrcoef() I run
out of memory if I try to do this with more than ~30,000 variables.
I was able to load the data into
2004 Oct 14
1
correlating between two vectors of numbers
Hi, R!
Question1:
I am trying to correlate two vectors of numbers (two columns of microarray
signal values) by using the non-parametric Spearman's rank correlation
coefficient rho:
> cor.test(V2.Signal,V3.Signal,method="spearman")
but I get the error message:
Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else
pspearman(q, :
missing value
2008 Oct 10
1
Correlation among correlation matrices cor() - Interpretation
Hello,
If I have two correlation matrices (e.g. one for each of two treatments) and
then perform cor() on those two correlation matrices is this third
correlation matrix interpreted as the correlation between the two
treatments?
In my sample below I would interpret that the treatments are 0.28
correlated. Is this correct?
> var1<- c(.000000000008, .09, .1234, .5670008, .00110011002200,
2009 Feb 12
3
get top 50 correlated item from a correlation matrix for each item
Hi,
I have a correlation matrix of about 3000 items, i.e., a 3000*3000
matrix. For each of the 3000 items, I want to get the top 50 items that
have the highest correlation with it (excluding itself) and generate a
data frame with 3 columns like ("ID", "ID2", "cor"), where ID is those
3000 items each repeat 50 times, and ID2 is the top 50 correlated items
with ID,
2007 Jul 30
1
correlation and matrix
Dear everyone,
I am new in R and I've got difficulties in realizing the following
tasks:
-I have variables (factors) with different numbers of levels, either 1,
2 or 3.
-I have a matrix containing these 204 factors and I have to correlate
them by groups of 4 variables.
-I have to delete the factors just having one level ( because when
correlating one-level factors, the output is NA)
here