similar to: chisq.test vs manual calculation - why are different results produced?

Displaying 20 results from an estimated 3000 matches similar to: "chisq.test vs manual calculation - why are different results produced?"

2012 Mar 14
2
Creating polygons from scattered points
Hello, I have a distribution dataset for species consisting of xy coordinates at the 1km resolution, with only presence data. So a simplified example of a species distribution might be: y <- rbind(as.integer(rnorm(100,50,20)), as.integer(rnorm(200,100,30)), as.integer(rnorm(100,180,15))) x <- rbind(as.integer(rnorm(200,50,20)), as.integer(rnorm(200,100,20)), as.integer(rnorm(100,200,15)))
2011 Jan 27
2
creating categorical frequency tables from continuous data
Hello, I am working with a dataset which essentially has only one column - a list of distances in metres, accurate to several decimal places. eg distance 1000 6403.124 1000 1414.214 1414.214 1000 I want to organise this into a frequency table, grouping into categories of 0 - 999, 1000 - 1999, 2000-2999 etc. I'd also like the rows where there are no data points in that category to
2011 Mar 15
1
indeterminate for loop
Hello, I have written a 'for' loop which on the first run makes nearest neighbour calculations for my dataset 'A' in relation to dataset 'B', then based on these results, some of the rows from A are moved into dataset B, and the calculation is repeated on the remaining rows in A. Therefore a smaller and smaller amount of data is analysed as the loop proceeds, since A
2003 Jul 15
1
Why two chisq.test p values differ when the contingency table is transposed?
I'm using R1.7.0 runing with Win XP. Thanks, ...Tao ???????????????????????????????????????????????????????? >x [,1] [,2] [1,] 149 151 [2,] 1 8 >t(x) [,1] [,2] [1,] 149 1 [2,] 151 8 >chisq.test(x, simulate.p.value=T, B=100000) Pearson's Chi-squared test with simulated p-value (based on 1e+05 replicates) data: x X-squared = 5.2001, df =
2005 Jun 26
2
chisq.test using amalgamation automatically (possible ?!?)
Dear List, If any of observed and/or expected data has less than 5 frequencies, then chisq.test (Pearson's Chi-squared Test for Count Data from package:stats) gives warning messages. For example, x<-c(10, 14, 10, 11, 11, 7, 8, 4, 1, 4, 4, 2, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) y<-c(9.13112391745095, 13.1626482033341, 12.6623267638188, 11.0130706413029, 9.16415925139016,
2003 Dec 09
2
p-value from chisq.test working strangely on 1.8.1
Hello everybody, I'm seeing some strange behavior on R 1.8.1 on Intel/Linux compiled with gcc 3.2.2. The p-value calculated from the chisq.test function is incorrect for some input values: > chisq.test(matrix(c(0, 1, 1, 12555), 2, 2), simulate.p.value=TRUE) Pearson's Chi-squared test with simulated p-value (based on 2000 replicates) data: matrix(c(0, 1, 1,
2010 Aug 12
2
Difference in Monte Carlo calculation between chisq.test and fisher.test
Hello all, I would like to know what the difference is between chisq.test and fisher.test when using the Monte Carlo method with simulate.p.value=TRUE? Thank you -- View this message in context: http://r.789695.n4.nabble.com/Difference-in-Monte-Carlo-calculation-between-chisq-test-and-fisher-test-tp2322494p2322494.html Sent from the R help mailing list archive at Nabble.com.
2013 Jul 09
0
probable bugs in stats::loglin calculation of pearson chisq
In running the following example of a loglinear model for the Titanic data, I was surprised to see NaN reported for the Pearson chisq > loglin(Titanic, margin=list(1:3, 4)) 2 iterations: deviation 2.273737e-13 $lrt [1] 671.9622 $pearson [1] NaN $df [1] 15 $margin $margin[[1]] [1] "Class" "Sex" "Age" $margin[[2]] [1] "Survived" Tracing it back,
2008 Nov 16
3
chisq.test with simulate.p.value=TRUE (PR#13292)
Full_Name: Reginaldo Constantino Version: 2.8.0 OS: Ubuntu Hardy (32 bit, kernel 2.6.24) Submission from: (NULL) (189.61.88.2) For many tables, chisq.test with simulate.p.value=TRUE gives a p value that is obviously incorrect and inversely proportional to the number of replicates: > data(HairEyeColor) > x <- margin.table(HairEyeColor, c(1, 2)) >
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
2003 Jul 15
0
Why two chisq.test p values differ when the contingency
Hi Tao: The P-values for 2x2 table are generated based on a random (discrete uniform distribution) sampling of all possible 2x2 tables, conditioning on the observed margin totals. If one of the cells is extremely small, as in your case, you get a big difference in P-values. Suppose, you changed the cell with value 1 to, say, 5 or 6, then the two P-values are nearly the same. However, I
2019 Feb 24
4
Samba Won't start after upgrading Operating system
I ungraded my Linux Operating system from Ubuntu 16.04 LTS to 8.04 LTS Samba will not start after an upgrade to 18.04. My samba is running as an NT style member server server with smbd nmbd and winbindd all running. None of them will start. It worked this morning. This morning it was running Version 4.3.11-Ubuntu This afternoon after the upgrade it's Version 4.7.6-Ubuntu The logs in
2006 Dec 02
1
Chi-squared approximation may be incorrect in: chisq.test(x)
I am getting "Chi-squared approximation may be incorrect in: chisq.test(x)" with the data bleow. Frequency distribution of number of male offspring in families of size 5. Number of Male Offspring N 0 518 1 2245 2 4621 3 4753 4 2476 5
2008 Apr 30
2
Can R do rts (Regular Time Series) like S-Plus?
Dear readers, S-Plus have a rts function (Regular Time Series), which is used like so: fveks<-read.csv('http://louise.hoffman.googlepages.com/veks.csv',header=TRUE,sep=',') attach(fveks) acf(ts.intersect(rts(HC.f),rts(Ta.f),rts(GR.f),rts(W.f))) Warning the csv file is 750kB. Can the same be done in R? Lots of love =) Louise
2012 Aug 29
3
Bonferroni correction for multiple correlation tests
Please can someone advise me how I can adjust correlations using bonferroni's correction? I am doing manny correlation tests as part of an investigation of the validity/reliability of a psychometric measure. Help would be so appreciated! Cheers, Louise
2005 Jun 22
1
chisq test and fisher exact test
Hi, I have a text mining project and currently I am working on feature generation/selection part. My plan is selecting a set of words or word combinations which have better discriminant capability than other words in telling the group id's (2 classes in this case) for a dataset which has 2,000,000 documents. One approach is using "contrast-set association rule mining" while the
2002 Nov 06
2
chisq.test on a matrix
Hello! What kind of calculation perform 'chisq.test', if its argument is a matrix? Thanks for any suggestion! ------------------------------------------------------------ Sincerely yours. Dr. Alessandro Semeria Tel. +39 544 536811 Models and Simulation Lab of Fax. +39 544 538663 The Environment Research Center - Montecatini
2008 Aug 21
0
how to use chisq.test with 2 row matrix having 0 in it?
Hi, I am working on calculating X^2 for some matrix (most of them have either two rows or 2 columns) by using chisq.test in R. However when there are 0s in the matrix, chisq.test does not work. For example: ==================== > elements <- matrix( c( 0, 0, 9, 5, 71, 168), nr = 2 ) > elements [,1] [,2] [,3] [1,] 0 9 71 [2,] 0 5 168 > chisq.test( elements )
2012 Oct 12
1
ks.test not working?
Hi, I am performing GEV analysis on temperature/precipitation data and want to use the ks.boot function but I am unsure of how to implement it using the pgev distribution. For example: ks.test(data,pgev,shape,location,scale) ks.boot(data,(distribution parameters?),alternative="pgev",nboots=1000) Any advice? Apologies in advance if I have used the wrong email address. Regards, Louise
2011 Feb 03
1
Double user name
I have two samba servers running Ubuntu 10.04 Samba Version 3.4.7 One server acts as domain controller and stores user ids in a .tdb Somehow I've ended up with a duplicate user name. On the Domain Controller # pdbedit -w -L|grep debbie debbie:1005:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:84DEC6FE3B018B0FB977EDDF5009742C:[U ]:LCT-4D4B086F: On the other Server running winbind I get #