similar to: Please help on correlation matrix

Displaying 20 results from an estimated 6000 matches similar to: "Please help on correlation matrix"

2009 Aug 16
2
bootstrapped correlation confint lower than -1 ?
Dear R users, Does the results below make any sense? Can the the interval of the correlation coefficient be between *-1.0185* and -0.8265 at 95% confidence level? Liviu > library(boot) > data(mtcars) > with(mtcars, cor.test(mpg, wt, met="spearman")) Spearman's rank correlation rho data: mpg and wt S = 10292, p-value = 1.488e-11 alternative hypothesis: true rho is not
2005 Dec 03
1
Correlation matrix from a vector of pairwise correlations
I've a vector of pairwise correlations in the order low-index element precedes the high-index element, say: corr(1,2)=0.1, corr(1,3)=0.2, corr(2,3)=0.3, corr(3,4)=0.4 How can I construct the corresponding correlation matrix? I tried using the "combn"-function in "combinat" package: library(combinat) combn(c(0.1,0.2,0.3,0.4),2) , but to no avail... Thank you for your
2007 Aug 02
1
Multivariable correlation
Given a square matrix of variables X, is there any way to compute a multivariable correlation among all the variables in the array? It is possible to calculate the correlation of all pairs of variables in the array, but I want to know the correlation of all the variables taken together, i.e. for the matrix X=x1 x2 x3 x4 x5 x6 x7 x8 x9 I don't want the pair-wise correlations
2008 Sep 02
1
correlation with boot
Hi R users, I have one simple question but I really don't know why I can't get it work. The data was adopted from Efron's An introduction to the bootstrap book. > nlaw LSAT GPA [1,] 576 3.39 [2,] 635 3.30 [3,] 558 2.81 [4,] 578 3.03 [5,] 666 3.44 [6,] 580 3.07 [7,] 555 3.00 [8,] 661 3.43 [9,] 651 3.36 [10,] 605 3.13 [11,] 653 3.12 [12,] 575 2.74
2002 Dec 20
1
Printing correlation matrices (lm/glm)
Hi Folks, I'm analysing some data which, in its simplest aspect, has 3 factors A, B, C each at 2 levels. If I do lm1 <- lm(y ~ A*B) say, and then summary(lm1, corr=T) I get the correlation matrix of the estimated coeffcients with numerical values for the correlations (3 coeffs in this case). Likewise with 'glm' instead of 'lm'. However, if I do lm2 <- lm(y ~
2009 Aug 24
2
robust method to obtain a correlation coeff?
Hi, Being a R-newbie I am wondering how to calculate a correlation coefficient (preferably with an associated p-value) for data like: > d[,1] [1] 25.5 25.3 25.1 NA 23.3 21.5 23.8 23.2 24.2 22.7 27.6 24.2 ... > d[,2] [1] 0.0 11.1 0.0 NA 0.0 10.1 10.6 9.5 0.0 57.9 0.0 0.0 ... Apparently corr(d) from the boot-library fails with NAs in the data, also cor.test cannot cope with a
2004 Jul 13
2
Is there a statistics that can summarize the correlation for more than two random variables?
Hi, R people, I wonder if there is a statistics than can measure the correlation for more than two random variables, instead of computing the correlation coefficient matrix. If so, what R package should I use? Right now I can only think of the mean of all pair-wise correlation coefficients, e.g., (corr(x,y) + corr(x,z) + corr(y,z)) / 3 for three random variables (x, y, z). Thanks a
2010 Jun 08
1
Deleting duplicate values in a correlation matrix
I have a large correlation matrix that I'm trying to convert to a list of every connection (edge) between every two nodes with its accompanying correlation value (for Cytoscape). I figured out how to do this and to remove the connections that nodes have to themselves but I can't figure out how to get rid of the duplicate pairs (e.g. the edge b-a is a duplicate of a-b).
2008 Mar 08
1
how to compute uncentered (pearson correlation) correlation efficiently
Hi, Seeking suggestions to compute uncentered (pearson correlation) correlation efficiently. corr from stats library works on x and y columns. dist from amap library works on x and y rows. My data layout is slightly different such that row(i) of matrix x is compared to row(i) of matrix y. Thanks [[alternative HTML version deleted]]
2006 Sep 06
1
Covariance/Correlation matrix for repeated measures data frame
All, I have a repeated measures data frame and was wondering if the covariance matrix can be calculated via some created indexing or built-in R function. Specifically, say there are 3 variables, where potassium concentration is measured 6 times on each patient. Patient number (discrete) Time (1 to 6, discrete) Potassium (continuous variable) I want the covariance/correlation matrix for the
2007 May 08
2
statistics/correlation question NOT R question
This is not an R question but if anyone can help me, it's much appreciated. Suppose I have a series ( stationary ) y_t and a series x_t ( stationary )and x_t has variance sigma^2_x and epsilon is normal (0, sigma^2_epsilon ) and the two series have the relation y_t = Beta*x_t + epsilon My question is if there are particular values that sigma^2_x and sigma^2_epsilon have to take in
2009 Mar 09
1
Zero distance error in corSpatial - correlation structure using lme
Hello, I am having a problem specifying the correlation structure in lme which leads to the error: Error in getCovariate.corSpatial(object, data = data) : Cannot have zero distances in "corSpatial". I have specified a grouping variable which is the only fix I could find by searching this error on R-help. ISee the below example. When my samples (tran) - which are transects
2011 Jan 30
1
Finding the correlation coefficient of two stocks
veepsirtt wrote: > > corr <- cor(s1,s2) > Error in cor(s1, s2) : incompatible dimensions > > Check lenghts of your series. cor(c(1,2),c(1,2,3)) #Error in cor(c(1, 2), c(1, 2, 3)) : incompatible dimensions Dieter -- View this message in context: http://r.789695.n4.nabble.com/Finding-the-correlation-coefficient-of-two-stocks-tp3246992p3247042.html Sent from the R help
2006 Jun 28
1
Simulate dichotomous correlation matrix
Newsgroup members, Does anyone have a clever way to simulate a correlation matrix such that each column contains dichotomous variables (0,1) and where each column has different prevalence rates. For instance, I would like to simulate the following correlation matrix: > CORMAT[1:4,1:4] PUREPT PTCUT2 PHQCUT2T ALCCUTT2 PUREPT 1.0000000 0.5141552 0.1913139 0.1917923 PTCUT2
2011 Jun 26
2
Ordering a matrix based on cluster no
Hi All I have a symmetric matrix of genes ( 100x100 matrix). I also have a matrix (100x2) of two columns where column 1 has the gene names and column 2 has the cluster it belongs to (they are sorted and grouped based on the cluster no). I would like to order the rows and columns of the 100x 100 matrix such that the first n genes correspond to cluster 1 and next n genes correspond to cluster 2
2010 Nov 23
2
Calculating correlation
Hi guys I have an input file with multiple columns and and rows. Is it possible to calculate correlation of certain value of certain No (For example x of S1 = 112) with all other values (for example start with x 112 corr a 3 of S1 = x-a 0.2 ) INPUT ******* No S1 S2 S3 S4 Sn a 3 4 45 34 23 x 112 0 12 23 0 b 0 1 23 12 1 n 0 1 0 1 1
2006 Oct 19
2
How to get multiple Correlation Coefficients
Hi I have used a polycor package for categorical correlation coefficients. I run the following script. But there were no results. Could you tell me how to correct the script? Thanks in advance, vars <- names(sdi) for (i in 1:length(vars)) { for (j in 1:length(vars)) { paste(vars[i]," and ", vars[j]) polychor(vars[i], vars[j]) # corr } } -- Kum-Hoe Hwang, Ph.D.Phone :
2006 Sep 23
1
variance-covariance structure of random effects in lme
Dear R users, I have a question about the patterned variance-covariance structure for the random effects in linear mixed effect model. I am reading section 4.2.2 of "Mixed-Effects Models in S and S-Plus" by Jose Pinheiro and Douglas Bates. There is an example of defining a compound symmetry variance-covariance structure for the random effects in a split-plot experiment on varieties of
2011 Nov 29
3
Matrix for correlation
hi @ all, I have problem with creating a matrix for a cor() function. I try to use the cor() function on a matrix to test the correlation between each value in a column. Maybe like corr(x, method = xyz). My x has two columns maybe like this: MEDIA VALUE Car 23 Train 26 Plane 25 Cab 22 Bike 15 .... and so on. Now I want to calculate the correlation between Car and Train, Car
2010 Jul 07
1
ifelse statement
Hi, I am a newbie of R, and playing with the "ifelse" statement. I have the following codes: ## first, for(i in 1:3) { for(j in 2:4) { cor.temp <- cor(iris.allnum[,i], iris.allnum[,j]) if(i==1 & j==2) corr.iris <- cor.temp else corr.iris <- c(corr.iris, cor.temp) } } this code is working fine. I also tried to perform the same thing in another way with "ifelse":