similar to: applying cor.test to a (m, n) matrix

Displaying 20 results from an estimated 9000 matches similar to: "applying cor.test to a (m, n) matrix"

2008 Jul 23
2
Warning message in if else statement
Hi, I am using an if else statement inside a function ?. If I use that function I have no problems ?. If I use the function with the if else statement inside a second function I get the following waring: Warning message: In if (pval == 0) p_value <- "< 2.2e-16" else p_value <- pval : the condition has length> 1 and only the first element will be used Using the second
2007 Dec 17
1
cor.test formula
Hi everybody, I am interested in seeing how the p value is calculated for a t test for a correlation coefficient. I know that cor.test delivers the correlation coefficient and the t-test, p-value and the 95 confidence interval. I am interested in how the p-value is calculated. Usually if i type the name of the function i get explicitly the coding of that function, but if i type >
2008 May 09
0
applying cor.test to a (m, n) matrix - SUMMARY
Hi again, I've got few very good options from the list and since they were not posted to the list, I will provide a summary. Thank you very much to all who answered and I hope this summary will benefit others interested in solving similar problems like that. Yasir Kaheil re-wrote my original code in a more streamlined way: pr<-array(0,c(dim(x)[2],dim(x)[2])); for (i in 1:dim(x)[2]) for
2008 Mar 27
1
dreaded p-val for d^2 of a glm / gam
OK, I really dread to ask that .... much more that I know some discussion about p-values and if they are relevant for regressions were already on the list. I know to get p-val of regression coefficients - this is not a problem. But unfortunately one editor of a journal where i would like to publish some results insists in giving p-values for the squared deviance i get out from different glm and
2011 May 16
2
about spearman and kendal correlation coefficient calculation in "cor"
Hi, I have the following two measurements stored in mat: > print(mat) [,1] [,2] [1,] -14.80976 -265.786 [2,] -14.92417 -54.724 [3,] -13.92087 -58.912 [4,] -9.11503 -115.580 [5,] -17.05970 -278.749 [6,] -25.23313 -219.513 [7,] -19.62465 -497.873 [8,] -13.92087 -659.486 [9,] -14.24629 -131.680 [10,] -20.81758 -604.961 [11,] -15.32194 -18.735 To calculate the ranking
2006 May 24
0
the computation of exact p-value for the nonparametric cor-test with ties
Hello, I wuold like to propose my modifications of the original cor.test to you : I tried to calcolate the correct p-value for Spearman and Kendall's test with ties. Let me know what you think. Thanks you for your time. Antonietta di Salvatore test <- function(x, ...) UseMethod("test") test.default <- function(x, y, alternative = c("two.sided",
2007 Aug 02
6
- round() strange behaviour
Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even .... For example: > round(1.5)[1] 2> round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you have any explanation for that? I really appreciate your input, Monica
2009 Aug 06
1
adding color bar to a graph
Hi everybody, I am wondering how i can add a "stretch" color bar / legend to a graph that uses colorBrewer to define the colors in it. I will try to explain my graph, but i also uploaded it at: ftp://ftpext.usgs.gov/pub/er/fl/st.petersburg/Monica_pal/ The file is: robcor_training_pca.pdf - i will also attach this file in case some people accept attachments. So i took apart the
2007 Dec 13
6
spliting strings ...
Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this: str <- c('aaa bbb', 'cc', 'd eee aa', 'mmm o n') str1 <- rep(1, length(str)) for (i in 1:length(str)) { str1[i] <- strsplit(str, "
2008 May 22
15
Pros and Cons of R
Hi, I am doing a very informal presentation for my office about R capabilities to deal with and analyze spatial data, display data and maps, and connections with GIS. I've used in my presentation info from the CRAN, the spatial Task view, and the more striking graphics examples from http://addictedtor.free.fr/graphiques/thumbs.php and NCEAS
2011 May 31
2
correlatation matrix
Hi there, I wonder if there is a way of efficiently generating a correlation matrix of two expression matrices. I want to correlate miRNA and mRNA expression and used the following code: ##dat.mi miRNA expression matrix, dat.m mRNA expression matrix nc <- nrow(dat.mi) cor.mat <- data.frame(rep(NA,nrow(dat.m))) pval.mat <- data.frame(rep(NA,nrow(dat.m))) for(i in 1:nc) { cr <- vector()
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((min(k1)-5),
2005 Aug 18
2
kendall tau correlation test for ties: Potential error (PR#8076)
Full_Name: Dirk Koschuetzki Version: 2.1.1 OS: source code Submission from: (NULL) (194.94.136.34) Hello, >From the source code (R-2.1.1, file: .../R-2.1.1/src/library/stats/R/) ****************************** cor.test.default <- function(x, y, alternative = c("two.sided", "less", "greater"), method = c("pearson", "kendall",
2009 May 26
3
split strings
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.tif" And i would like to extract BE, CH, CRR, and HOME in a
2009 May 26
3
split strings
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.tif" And i would like to extract BE, CH, CRR, and HOME in a
2006 Aug 31
4
problems with plot.data.frame
Hi list, I have a question about 'plot'. I am trying to plot values registered every month - or every other month. If i build a data.frame called mydata like this (as an example) jan 3 1 7 mar 2 4 2 may 1 3 2 jul 3 7 4 sep 5 2 3 nov 3 1 5 and use the command line: plot(mydata[c(1,3)]) I get a graph that has on the x axis my months in alphabetical
2005 Apr 15
5
Pearson corelation and p-value for matrix
Hi, I was trying to evaluate the pearson correlation and the p-values for an nxm matrix, where each row represents a vector. One way to do it would be to iterate through each row, and find its correlation value( and the p-value) with respect to the other rows. Is there some function by which I can use the matrix as input? Ideally, the output would be an nxn matrix, containing the p-values
2008 Mar 13
4
a more elegant way to get percentages?
Hi, I am trying to get percentages in a more elegant way. I have a data.frame with locations and values (counts) of species at that location. Each location is repeated for each species i have values for and i would like to get percentages of each species at that location. I am not sure if i am clear in my explanations so i will paste my code below: ##################### > x locat val 1
2009 Feb 12
3
Aggregrate function
Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total for the species. Each location is repeated, once for every species present at that location. For each location i want to find out which species has the maximum total ... so i've tried different ways to
2004 Jul 21
2
RE: Comparison of correlation coefficients - Details
Dear all I apologize for cross-posting, but first it is accepted custom to thank the repliers and give a summary, and second I have still the feeling that this problem might be a general statistical problem and not necessarily related to microarrays only, but I might be wrong. First, I want to thank Robert Gentleman, Mark Kimpel and Mark Reiners for their kind replies. Robert Gentleman kindly