Displaying 20 results from an estimated 300 matches similar to: "Bug in cor function (PR#7689)"
2005 Dec 20
2
2 x 2 chisq.test (PR#8415)
Full_Name: nobody
Version: 2.2.0
OS: any
Submission from: (NULL) (219.66.34.183)
2 x 2 table, such as
> x
[,1] [,2]
[1,] 10 12
[2,] 11 13
> chisq.test(x)
Pearson's Chi-squared test with Yates'
continuity correction
data: x
X-squared = 0.0732, df = 1, p-value = 0.7868
but, X-squared = 0.0732 is over corrected.
when abs(a*d-b*c) <= sum(a,b,c,d), chisq.value
2010 Jun 09
1
bug? in stats::cor for use=complete.obs with NAs
Arrrrr,
I think I've found a bug in the behavior of the stats::cor function when
NAs are present, but in case I'm missing something, could you look over
this example and let me know what you think:
> a = c(1,3,NA,1,2)
> b = c(1,2,1,1,4)
> cor(a,b,method="spearman", use="complete.obs")
[1] 0.8164966
> cor(a,b,method="spearman",
2005 Oct 30
4
Yates' correction for continuity in chisq.test (PR#8265)
Full_Name: foo ba baz
Version: R2.2.0
OS: Mac OS X (10.4)
Submission from: (NULL) (219.66.32.183)
chisq.test(matrix(c(9,10,9,11),2,2))
Chi-square value must be 0, and, P value must be 0
R does over correction
when | a d - b c | < n / 2 ,chi-sq must be 0
2007 Oct 19
1
Managing a lopsided has_and_belongs_to_many relationship
I''ve got a fixed list of several thousand Things, and a User base that
may grow to who knows how big (we can only hope ,right?) Users have and
belong to many Things. I want to display a list of top Things, based on
how many users each has. Things with 0 users are not displayed.
Two questions. First, I expect the density of the relatioships to focus
on a small percentage of the
2018 Mar 23
3
GSoC aspirant - guruprasad hegde
Hi,
I plan to propose 'Math Aware search' project.
After the literature review on the topic, I found Tangent or MIaS system
would be a good start. With that, I studied both of the systems well.
I plan to pick Tangent because it performs better. Also, it has a good
literature(thesis report and few papers available) and reference code
available.
I keep the summary of both the system, I
2016 Jun 29
2
xapian-letor: FeatureVector discussion
>
>
>
> The approach I was thinking would look something like this:
>
> * instead of Features, which is really a namespace implemented as a
> class, we separate out the calculation of the different features
> into distinct subclasses of Feature, whose only job is to calculate
> a single feature. Currently the FeatureManager calls these (via
>
2016 Jul 31
2
Letor: returning MSet after re-ranking
On Sun, Jul 31, 2016 at 12:44:16AM +0100, Olly Betts wrote:
> Would a method which swapped two elements of an MSet provide what you
> need? That would provide a more generic way to adjust the ranking of
> an MSet which for example could be used to implement a diversification
> feature or something like SQL "GROUP BY".
Isn't the most common use going to be that the
2018 Mar 09
2
GSoC aspirant - guruprasad hegde
Dear All,
I'm guruprasad hegde. I would like to contribute to Xapian through
GSOC-2018.
Thank you for this wonderful opportunity.
My Introduction:
I study MSc in Computer science at the University of Saarland. I finished
my 4th semester. Some of the courses I took include NLP, Information
Retrieval & Data mining, statistical learning. These courses helped me
develop the interest in
2005 May 25
2
cor vs cor.test
Using Windows System, R 2.1.0
d is a data frame, 48 rows, 10 columns
cor(d) works properly providing all pairwise Pearson correlation
coefficients among columns
cor.test(d) gives error message "Error in cor.test.default(d) : argument
"y" is missing, with no default"
Why?
Thanks,
MCG
2004 Mar 03
1
cor(..., method="spearman") or cor(..., method="kendall") (PR#6641)
Dear R maintainers,
R is great. Now that I have that out of the way, I believe I have
encountered a bug, or at least an inconsistency, in how Spearman and
Kendall rank correlations are handled. Specifically, cor() and
cor.test() do not produce the same answer when the data contain NAs.
cor() treats the NAs as data, while cor.test() eliminates them. The
option
use="complete.obs" has
2008 May 02
1
cor.test like cor?
Hi,
Is there a simple way to do correlation coefficient tests with
"cor.test" like I would do with "cor" function? I have a data frame
where each column is a list.
================================================
y <- data.frame(a=sample(30, 20), b=sample(30, 20), c=sample(30,20))
cor(y)
================================================
But, cor.test does not take y
2007 Jul 05
1
cor() and cor.test() (PR#9781)
Hello,
I am trying to make a correlation matrix in R using cor() and also to get
the p-value for each correlation using cor.test(). I can't get these
commands to work. I'm getting errors like the following:
cor(Pollution, Wet.days)
Error in inherits(x, "data.frame") : Object "Wet.days" not found
cor("Pollution", "Wet.days")
Error in
2009 Jul 07
1
cor vs cor.test
Hi,
I am trying to use R for some survey analysis, and need to compute the
significance of some correlations. I read the man pages for cor and
cor.test, but I am confused about
- whether these functions are intended to work the same way
- about how these functions handle NA values
- whether cor.test supports 'use = complete.obs'.
Some example output may explain why I am confused:
2008 Feb 27
4
Error in cor.default(x1, x2) : missing observations in cov/cor
Hello,
I'm trying to do cor(x1,x2) and I get the following error:
Error in cor.default(x1, x2) : missing observations in cov/cor
A few things:
1. I've used cor() many times and have never encountered this error.
2. length(x1) = length(x2)
3. is.numeric(x1) = is.numeric(x2) = TRUE
4. which(is.na(x1)) = which(is.na(x2)) = integer(0) {the same goes for
is.nan()}
5. I also try
2004 Mar 05
0
a question regarding 'cor' function
I'm a little bit confused with how exactly the 'cor' function handles
missing values. Should the last two function calls give the same results?
Thanks,
...Tao
==========================================
>x=rnorm(10)
>y=rnorm(10)
>x[1]=NA
>y[2]=NA
>cor(x,y,method="spearman")
[1] -0.006060606
2004 Aug 30
1
Wrong result with cor(x, y, method="spearman", use="complete.obs") with NA's???
Hallo!
Is there an error in cor to calculate Spearman
correlation with cor if there are NA's? cor.test gives
the correct result. At least there is a difference.
Or am I doing something wrong???
Does anybody know something about this?
a<-c(2,4,3,NA)
b<-c(4,1,2,3)
cor(a, b, method="spearman", use="complete.obs")
# -0.9819805
cor.test(a, b,
2004 Mar 11
0
A question about function "cor" in code C
Dear Sir:
I am interesting in to call function "cor" from C code. The reason for
this, is that I need to obtain a matrix of correlation in a C program, and I
have think to link my program in C code with R. But I don?t know make this
link. I have read R-exts.pdf document, but I have not found a direct way to
link.
But I have a problem which I have not found information in
2007 Apr 10
0
Multiple output from cor.test
Hello all,
I'm trying to use cor.test across a range of values via the apply command,
c <- apply(X,1,cor.test,y)
where X is an array, giving me multiple output from cor.test. I can
access individual elements of this by e.g. c[[1]] or c[[1]]$estimate or
c[[n]] or whatever, but is there a way to get out the vector of all
estimates, or all p-values?
i.e. if I want to get out a vector p
2002 Feb 13
1
cor() and lagged ts objects
The following is internally consistent, but not intuitive:
R : Copyright 2002, The R Development Core Team
Version 1.4.1 (2002-01-30)
[...]
> library(ts)
> x<-rnorm(100) # white noise
> xTS<-ts(x,start=1) # as time series
> xTSl<-lag(xTS,lag=-1) # lagged once
> cor(xTS,xTSl) # Big surprise
[1] 1
> cor(cbind(xTS,xTSl),use="pairwise") # what was really
2007 Jun 14
0
How to set degrees of freedom in cor.test?
Hello,
I want to compute a correlation test but I do not want to use the
degrees of freedom that are calculated by default but I want to set a
particular number of degrees of freedom.
I looked in the manual, different other functions but I did not found
how to do it
Thanks in advance for your answers
Yours
Florence Dufour
PhD Student
AZTI Tecnalia - Spain