similar to: please help generate a square correlation matrix

Displaying 20 results from an estimated 2000 matches similar to: "please help generate a square correlation matrix"

2024 Jul 25
1
please help generate a square correlation matrix
?s 17:39 de 25/07/2024, Yuan Chun Ding via R-help escreveu: > Hi R users, > > I generated a square correlation matrix for the dat dataframe below; > dat<-data.frame(g1=c(1,0,0,1,1,1,0,0,0), > g2=c(0,1,0,1,0,1,1,0,0), > g3=c(1,1,0,0,0,1,0,0,0), > g4=c(0,1,0,1,1,1,1,1,0)) > library("Hmisc") > dat.rcorr =
2024 Jul 25
1
please help generate a square correlation matrix
HI Rui, Thank you for the help! You did not remove a row if zero values exist in both column pair, right? Ding From: Rui Barradas <ruipbarradas at sapo.pt> Sent: Thursday, July 25, 2024 11:15 AM To: Yuan Chun Ding <ycding at coh.org>; r-help at r-project.org Subject: Re: [R] please help generate a square correlation matrix ?s 17:?39 de 25/07/2024, Yuan Chun Ding via R-help
2024 Jul 25
1
please help generate a square correlation matrix
Hi Rui, You are always very helpful!! Thank you, I just modified your R codes to remove a row with zero values in both column pair as below for my real data. Ding dat<-gene22mut.coded r <- P <- matrix(NA, nrow = 22L, ncol = 22L, dimnames = list(names(dat), names(dat))) for(i in 1:22) { #i=1 x <- dat[[i]] for(j in (1:22)) { #j=2 if(i == j) { #
2024 Jul 25
1
please help generate a square correlation matrix
?s 20:47 de 25/07/2024, Yuan Chun Ding escreveu: > Hi Rui, > > You are always very helpful!! Thank you, > > I just modified your R codes to remove a row with zero values in both column pair as below for my real data. > > Ding > > dat<-gene22mut.coded > r <- P <- matrix(NA, nrow = 22L, ncol = 22L, > dimnames = list(names(dat),
2024 Jul 26
1
please help generate a square correlation matrix
If I have understood the request, I'm not sure that omitting all 0 pairs for each pair of columns makes much sense, but be that as it may, here's another way to do it by using the 'FUN' argument of combn to encapsulate any calculations that you do. I just use cor() as the calculation -- you can use anything you like that takes two vectors of 0's and 1's and produces fixed
2024 Jul 27
1
please help generate a square correlation matrix
Let's go back to the original posting. > > > >> in each column, less than 10% values are 1, most of them are 0; > > > > > > > >> so I want to remove a row with value of zero in both columns when calculate correlation between two columns. > > So we're talking about correlations between binary variables. Suppose we have two 0-1-valued
2024 Jul 27
1
please help generate a square correlation matrix
Curses, my laptop is hallucinating again. Hope I can get through this. So we're talking about correlations between binary variables. Suppose we have two 0-1-valued variables, x and y. Let A <- sum(x*y) # number of cases where x and y are both 1. Let B <- sum(x)-A # number of cases where x is 1 and y is 0 Let C <- sum(y)-A # number of cases where y is 1 and x is 0 Let D <- sum(!x
2024 Jul 27
1
please help generate a square correlation matrix
Hi Richard, Nice to know you had similar experience. Yes, your understanding is right. all correlations are negative after removing double-zero rows. It is consistent with a heatmap we generated. 1 is for a cancer patient with a specific mutation. 0 is no mutation for the same mutation type in a patient. a pair of mutation type (two different mutations) are exclusive for most of patients in
2024 Jul 27
1
please help generate a square correlation matrix
Your expanded explanation helps clarify your intent. Herewith some comments. Of course, feel free to ignore and not respond. And, as always, my apologies if I have failed to comprehend your intent. 1. I would avoid any notion of "statistical significance" like the plague. This is a purely exploratory exercise. 2. My understanding is that you want to know the proportion of rows in a
2024 Jul 28
1
please help generate a square correlation matrix
HI Bert, Thank you for extra help!! Yes, exactly, your interpretation is perfectly correct and your R code is what I should look for. after generated all those negative values of correlation, I thought about the extremely small p values associated with those negative correlation, which is not meaningful as I truncated my data. When examining the exclusiveness of mutation pairs, what I first
2010 May 05
1
rcorr p-values for pearson's correlation coefficients
Hi! All, To find co-expressed genes from a expression matrix of dimension (9275 X 569), I used rcorr function from library(Hmisc) to calculate pearson correlation coefficient (PCC) and their corresponding p-values. From the correlation matrix (9275 X 9275) and pvalue matrix (9275 X 9275) obtained using rcorr function, I wanted to select those pairs whose PCC's are above 0.8 cut-off and then
2013 Feb 13
5
spearman correlation and p-value as a matrix
I have two data matrices that I want to make the correlation between each column from data1 and each column from data 2 and also calculate the p-value Matrices dont have the same size and I tried such a script. > bg <- read.table (file.choose(), header=T, row.names) > bg > Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172
2011 May 22
1
How to calculate confidence interval of C statistic by rcorr.cens
Hi, I'm trying to calculate 95% confidence interval of C statistic of logistic regression model using rcorr.cens in rms package. I wrote a brief function for this purpose as the followings; CstatisticCI <- function(x) # x is object of rcorr.cens. { se <- x["S.D."]/sqrt(x["n"]) Low95 <- x["C Index"] - 1.96*se Upper95 <- x["C
2012 Sep 12
2
How to resolve the following error: (list) object cannot be coerced to type 'double'
Hello, I'd like to test a significance of two variables in their correlation using rcorr, which gave me an error of format incompatibility. Below are the lines that I typed in the R window and let me know if anyone knows how to resolve this. Var=read.csv("03apr10ab_corr_matrix_in_overlaps.csv",header=F) colnames(Var)=c("D Prime","T statistics") D Prime
2012 Sep 12
1
digit precision in p value of rcorr
Hi all, Sorry about posting a really novice question. I was able to run rcorr after converting the list to a matrix by your help. I'm though wondering if there is any way to find out an exact p value as the output only gave me 0 for P value as shown below. I've added options(digits=10), which doesn't seem to help at all. Any help would be appreciated. P D Prime T
2011 Aug 19
1
Hmisc::rcorr on a 'data.frame'?
Dear all ?Hmisc::rcorr states that it takes as main argument "a numeric matrix". But is it normal that it fails in such an ugly way on a data frame? (See below.) If the function didn't attempt any conversion to a matrix, I would have expected it to state that in the error message that it didn't accept 'data.frame' objects in its input. Also, I vaguely remember having used
2017 Sep 21
2
rcorr error in R stat
Hello, Please keep this on the list, always cc r-help. One of the files in your attachment is empty: y <- read.csv(file.choose("GT.csv")) Error in read.table(file = file, header = header, sep = sep, quote = quote,? : ? no lines available in input Rui Barradas ? Citando Chaitanya Ganne <Chaitanya.Ganne at jefferson.edu>: > Thank you so much for your input. > > I am
2011 Mar 01
1
which does the "S.D." returned by {Hmisc} rcorr.cens measure?
Dear R-help, This is an example in the {Hmisc} manual under rcorr.cens function: > set.seed(1) > x <- round(rnorm(200)) > y <- rnorm(200) > round(rcorr.cens(x, y, outx=F),4) C Index Dxy S.D. n missing uncensored Relevant Pairs Concordant Uncertain 0.4831 -0.0338 0.0462 200.0000
2005 Jan 11
1
Standard error for the area under a smoothed ROC curve?
Hello, I am making some use of ROC curve analysis. I find much help on the mailing list, and I have used the Area Under the Curve (AUC) functions from the ROC function in the bioconductor project... http://www.bioconductor.org/repository/release1.5/package/Source/ ROC_1.0.13.tar.gz However, I read here... http://www.medcalc.be/manual/mpage06-13b.php "The 95% confidence interval for
2008 Nov 11
1
how to export results of rcorr into excel
Hi, I try to export the outputs of rcorr into excel. but I got error message,"cannot coerce class "rcorr" into a data.frame". Actually i just need export part of results of this analysis,e.g. p-values or stat-values. Does anyone have sort of exprience before or you can help on how to export subset of results of analysis? Many Thanks! Xin