similar to: the computation of exact p-value for the nonparametric cor-test with ties

Displaying 20 results from an estimated 2000 matches similar to: "the computation of exact p-value for the nonparametric cor-test with ties"

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",
2012 May 22
4
“For” calculation is so slow
Dear All, The function I wrote can run well with the small data, but with the large data, the function runs very very slowly. How can I correct it? Thank you very much. My function as below: a<-c(1:240) b<-c(1:240) l=function(a,b){ v=0 u=0 uv=0 v[1]=0 u[1]=0 uv[1]=0 for (i in 1:(length(s)-1)){ v[i]<-((gx[[i]][b,(gx[[i]][a,1]+1)])-(gx[[i]][a,gx[[i]][a,1]+1]))/(gx[[i]][a,gx[[i]][a,1]+1])
2009 Jul 06
1
how to apply a self-written function to a data frame
Hello, I have written a function in order to analyse gaze paths. It works with the test data but when I try to apply the function to a data frame that stores "the real data" in columns I receive the error message that the " In if (pp > 1) { : condition has length > 1 only the first element will be used " I interpret this error message as saying that only the first
1998 Feb 19
1
R-beta: t.test
As a very new user of R, and a user of S with very limited experience, I thought I would start humbly with a simple t.test. The response to the command sequence sample <- scan() 4 5 6 7 8 9 t.test(sample,mu=20) rather surprised me, because of the idiosyncratic choice of a confidence interval for the mean of the population from which the sample was drawn. I asked my colleague Bob Henery
2011 Nov 25
1
Multiple selection, renaming and saving the results
Dear all, I have a big data frame: str(data1) 'data.frame': 18272 obs. of 11 variables: $ tag : int 100001 100002 100003 100005 100007 100008 100009 100011 100012 100014 ... $ sp : Factor w/ 18 levels "acassp","acocar",..: 13 5 7 14 14 18 3 11 13 10 ... $ gx : num 20 10 35 68 88 63 123 115 137 136 ... $ gy : num 30 25 24 1 10 40 45 25 23 45 ...
2007 Sep 23
2
return(x=x,y=y,prob=prob) hasn't been used in R now?
Dear friends, Now, when i use the argument return(x=x,y=y,prob=prob) , R displays the waring message: Warning message: The return value for multiple variables wasn't used in: return(x = x, y = gy, prob = prob) I used the methods of "help.search("return")" and "?return" to get some help, but didn't find info on it. Anybody knows how it should be used
2011 Jun 20
1
requesting a mentor for R development
I'd like to learn the process of revising R functions & packages and then submitting proposed patches to the R Core team. Would someone be willing to mentor me through one example? For starters, consider an example. I'd like to revise the t.test function to return the stderr value to the user. We only need to change the "rval" in the third-from-the end line of
2004 Apr 30
1
Exact Binomial test feature or bug?
Dear R Users, Is the p-value reported in a two-tailed binomial exact test in error or is it a feature? If it is a feature, could someone provide a reference for its two-tailed p-value computations? Using Blaker's (2000 - Canad. J. Statist 28: 783-798) approach,the p-value is the minimum of the two-tailed probabilities $P \left(Y\geq y_{obs}\right)$ and $P\left(Y\leq y_{obs}\right)$
2004 Dec 22
0
weighted kernel density estimation
Dear wizaRds, I use the MASS::kde2d function to estimate density of the two first principal components. I do that to have a graphic visualisation of a "group structure" in my dataset. So far, no problem. But i would like to estimate that density using weights according to the COS?? values that tells me if my observation is well represented on the factorial plan 1-2. I would like to
2006 Jun 14
1
Estimate region of highest probabilty density
Estimate region of highest probabilty density Dear R-community I have data consisting of x and y. To each pair (x,y) a z value (weight) is assigned. With kde2d I can estimate the densities on a regular grid and based on this make a contour plot (not considering the z-values). According to an earlier post in the list I adjusted the kde2d to kde2d.weighted (see code below) to estimate the
2005 Aug 23
0
NAs by integer overflow in Spearman's test p-value (PR#8087)
Full_Name: Jan T. Kim Version: 2.1.0 (and better) OS: Linux Submission from: (NULL) (139.222.3.229) The p value in Spearman's test is NA if the length of x exceeds 46340, due to an integer overflow, occurring if length(n) > sqrt(2^31): > n <- 46341; > set.seed(1); > x <- runif(n); > y <- runif(n); > cor.test(x, y, method =
2005 Aug 23
0
(PR#8087) NAs by integer overflow in Spearman's test p-value
There is an even simpler way: someone wrote n*(n^2-1) as n*(n-1)*(n+1) and caused the problem. Your superfluous semicolons do definitely make your code harder to read. On Tue, 23 Aug 2005 jtk at cmp.uea.ac.uk wrote: > Full_Name: Jan T. Kim > Version: 2.1.0 (and better) > OS: Linux > Submission from: (NULL) (139.222.3.229) > > > The p value in Spearman's test is NA if
2011 Feb 15
1
gList and gTree methods of grid::grobX
Dear all, In an attempt to draw fill patterns in grid graphics, I have encountered a behavior of grobX that I cannot understand from the documentation. Consider this, library(grid) ## gTree g1 <- gTree(children=gList( rectGrob(0.5,0.5, width=unit(0.8,"npc"), height=unit(2,"cm")), circleGrob(r=0.3)), vp=viewport(0.5,0.5)) ##
2009 Jun 26
1
gradient fill of a grid.polygon
Dear list, Following a recent enquiry, I've been playing with the idea of creating a colour gradient for a polygon, using the Grid package. The idea is to draw a number of stripes of different colours, using the grid.clip function. Below is my current attempt at this, library(grid) rotate.polygon <- function(g, angle=0){ # utility function, works fine matR <- matrix(c(cos(angle),
2003 Apr 01
2
cor.test observations limit
Hi, Is there a limit on the number of observations for using cor.test. For example, > library(ctest) > cor.test(rnorm(3000), rnorm(3000), method="spearman") Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else pspearman(q, : missing value where logical needed In addition: Warning message: NAs introduced by coercion I mainly want to calculate
2009 May 14
1
will one of you help me advocate a change in t.test (patch attached)
I wish the t.test function in stats would return the standard error. It would be nicer for students if R simply reported the standard error used to calculate the t value. I trolled for this in r-help and got no answers, which I interpreted to mean that this is boring but possibly not wrong. Hopefully. I believe only simple changes are needed. In the source code src/library/stats/t.test.R file:
2005 Apr 29
0
Anscombe-Glynn, Bonett-Seier, D'Agostino
Dear useRs, I was searching CRAN for implementation of kurtosis and skewness tests, and found that there is some kind of lack on it. So, I have written three functions: 1. Anscombe-Glynn test for kurtosis 2. Bonett-Seier test based on Geary's kurtosis (which is not widely known, but I was inspired by original paper describing it, found coincidentally in Elsevier database) 3.
2004 Aug 02
3
Title with substitute and paste
Hello All, I am generating some plots where the title is generated with substitute and paste. An example: nval <- 20 plot(0,0) title(substitute(paste("n = ", n), list(n = nval))) But when compared to: plot(0,0) title("n = 20") the title in the first plot looks slightly different (it is not in bold). How can I get the two titles to look exactly the same? Also, how can I
2008 May 08
2
applying cor.test to a (m, n) matrix
Hi everybody, I would like to apply cor.test to a matrix with m rows and n columns and get the results in a list of matrices , one matrix for p.val, one for the statistic, one for the correlation and 2 for upper and lower confidence intervals, something analog with cor() applied to a matrix. I have done my own function to get a matrix of p.values and i suppose i can build similar functions for
2001 Feb 18
1
confused about names()
Hi all .. there is no doubt a simple answer to this, but it eludes me. In the first session below ( with jarque.bera.test) you will see that p.value prints with a name of X-squared . This is easily fixed by changing the source to assign a more appropriate name - no name is assigned in the source listing below (the original source code of jarque.bera.test() from tseries).. but what I