similar to: correlation

Displaying 20 results from an estimated 10000 matches similar to: "correlation"

2006 Aug 24
2
Why are lagged correlations typically negative?
Recently, I was working with some lagged designs where a vector of observations at one time was used to predict a vector of observations at another time using a lag 1 design. In the work, I noticed a lot of negative correlations, so I ran a simple simulation with 2 matched points. The crude simulation example below shows that the correlation can be -1 or +1, but interestingly if you do this
2004 Dec 21
3
R code for var-cov matrix given variances and correlations
Dear list members, Where can I find code for computing the p*p variance-covariance matrix given a vector of p variances (ordered varA, varB, ..., varp) and a vector of all possible correlations (ordered corAB, corAC, ..., corp-1,p)? I know that the covariance between 2 variables is equal to the product of their correlation and their standard deviations: corAB * varA^.5 * varB^.5 and so:
2003 Sep 13
2
what does this error mean?
Dear R-users: I am runing R 1.6.2 with Windows XP. I try to calculate Pearson correlation and Spearman correlation of any pairwise columns of 8000 x 80 data matrix with missing values and randomize the matix 1000 times and calculate this two correlations again. The code bellow for Pearson is working fine but for Spearman got the error bellow for randomized data matrix and R console is stop
2000 Jan 04
1
correlation matricies: getting p-values?
I have to admit that I'm at a bit of a loss here; any pointers would be greatly appreciated. I've been making correlation matricies from some of my datasets, and have been instructed to get the probability values for each of these correlations. I've checked the online help for info on both the cor and cov functions, but I was unable to find any relevant info on finding how to obtain
2001 Nov 01
1
cor.test for a correlation matrix
Is there a simple way to run cor.test on for a matrix of correlations? Of course, cor on a data frame produces a correlation matrix, but cor.test will only take two variables at a time. Is there a way to get behavior similar to that of cor with cor.test? I suppose the programming alternative would be to run two for loops with the number of items and cor test embedded accessing the columns of
2007 Jul 13
2
nearest correlation to polychoric
Dear all, Has someone implemented in R (or any other language) Knol DL, ten Berge JMF. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 1989, 54, 53-61. or any other similar algorithm? Best regards Jens Oehlschl?gel Background: I want to factanal() matrices of polychoric correlations which have negative eigenvalue. I coded Highham 2002
2004 Oct 22
1
cor, cov, method "pairwise.complete.obs"
Hi UseRs, I don't want to die beeing idiot... I dont understand the different results between: cor() and cov2cov(cov()). See this little example: > x=matrix(c(0.5,0.2,0.3,0.1,0.4,NA,0.7,0.2,0.6,0.1,0.4,0.9),ncol=3) > cov2cor(cov(x,use="pairwise.complete.obs")) [,1] [,2] [,3] [1,] 1.0000000 0.4653400 -0.1159542 [2,] 0.4653400 1.0000000
2008 Apr 05
2
pearson's correlation
Hello, I used the function cor to calculate the pearson correlation coefficient between variables. However, the resulting values do not correspond to the outcome of my excel-calculations, for which I used the formula Cor(x,y)=Cov(x,y)/(SD(x)*SD(y)) So my question is: How does the function "cor" compute the pearson correlation coefficient? Thank you in advance, Ake Nauta
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
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
2004 May 27
2
Stats package
Hi The cor function in the stats package calculates the correlation between columns of data, does anyone know if it is at all possible to calculate the correlation between rows instead ? Or is there an appropriate package or function that is more appropriate I'd like to calculate spearman & pearson correlations between rows. Many thanks Jason -- --------------------------------
2007 Jul 30
3
Constructing correlation matrices
Greetings, I have a seemingly simple task which I have not been able to solve today and I checked all of the help archives on this and have been unable to find anything useful. I want to construct a symmetric matrix of arbtriray size w/o using loops. The following I thought would do it: p <- 6 Rmat <- diag(p) dat.cor <- rnorm(p*(p-1)/2) Rmat[outer(1:p, 1:p, "<")] <-
2004 Sep 11
4
Cancor
Dear R's! I am strugling with cancor procedure in R. I cannot figure out the meaning of xcoef and of yxcoef. Are these: 1. standardized coefficients 2. structural coefficients 3. something else? I have tried to simulate canonical correlation analysis by checking the eigenstructure of the expression: Sigma_xx %*% Sigma_xy %*% Sigma_yy %*% t(Sigma_xy). The resulting eigenvalues were the same
2008 Jun 23
2
Correlation Help
Hi, I have recently been using the R program and encountered a recurring problem. I have been trying calculate the correlation of a 16 column table. Everytime I type in cor(test), where test is data that I uploaded into R using the read.table function, I get an error: Error in cor(test) : missing observations in cov/cor In addition: Warning message: In cor(test) : NAs introduced by coercion
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
2009 Sep 18
1
Within-group correlation confidence intervals
I'm trying to obtain within-group correlations on a subset of variables. I first selected my variables using the following command: mydata$x<-mydata[c("iq","education","achievement")] I'd like to look at correlations among those variables separately for men and women. My gender variable in mydata is coded 1 (women) and 0 (men). I have successfully used
2005 Sep 27
1
Simulate phi-coefficient (correlation between dichotomous vars)
Newsgroup members, I appreciate the help on this topic. David Duffy provided a solution (below) that was quite helpful, and came close to what I needed. It did a great job creating two vectors of dichotomous variables with a known correlation (what I referred to as a phi-coefficient). My situation is a bit more complicated and I'm not sure it is easily solved. The problem is that I must
2008 Oct 30
1
A question about pairs()
Greetings R users, I am an R graphics newbie trying to produce a custom trellis plot using pairs() with R 2.7.2. I have spatial data on which I run a geographically weighted regression (gwr, using the -spgwr- package). I want to check the gwr coefficients for multicollinearity and spatial association, following Wheeler and Tiefelsdorf (2005), and I would like to summarize the results of this
2001 Feb 26
1
trimmed correlations
Dear R users: Does anyone know if there are any R library functions for computing trimmed correlations, similar to the trim option in Splus's cor function? Also, does anyone know if there are any R library functions for computing a Euclidean distance matrix which can handle missing values, similar to Splus's dist function? Please reply directly to me, as I am not currently a list
2011 Mar 01
3
Is there any Command showing correlation of all variables in a dataset?
Thanks in advance. I want to derive correlations of variables in a dataset Specifically library(Ecdat) data(Housing) attach(Housing) cor(lotsize, bathrooms) this code results only the correlationship between two variables. But I want to examine all the combinations of variables in this dataset. And I will finally make a table in Latex. How can I test correlations for all combinations of