Displaying 20 results from an estimated 4000 matches similar to: "Mid-P value for a chi-squared test"
2008 Apr 09
1
chi-square test
Hi R-users,
I would like to find the goodness of fit using Chi-suare test for my data below:
xobs=observed data, xtwe=predicted data using tweedie, xgam=predicted data using gamma
> xobs <- c(223,46,12,5,7,17)
> xtwe <- c(217.33,39,14,18.33,6.67,14.67)
> xgam <- c(224.67,37.33,12.33,15.33,5.33,15)
> chisq.test(xobs, xtwe = xtwe, rescale.p = TRUE)
Error in chisq.test(xobs,
2001 Dec 18
4
chi-squared test
I don't quite understand the difference between the two methods for
performing a chi-squared test on contingency tables: summary(table())
and chisq.test()
They may different results. E.g.:
aa <- gl(2, 10)
bb <- as.factor(c(1,2,2,2,1,2,1,2,2,2,1,2,2,2,1,1,1,2,1,1))
aa <- c(aa, aa)
bb <- c(bb, bb)
table(aa, bb)
summary(table(aa, bb))
chisq.test(aa, bb)
Could somebody give me
2012 Dec 03
4
Chi-squared test when observed near expected
Dear UseRs,
I'm running a chi-squared test where the expected matrix is the same as the
observed, after rounding. R reports a X-squared of zero with a p value of
one. I can justify this because any other result will deviate at least as
much from the expected because what we observe is the expected, after
rounding. But the formula for X-squared, sum (O-E)^2/E gives a positive
value. What
2008 Jan 15
2
In chisq.test(x) : Chi-squared approximation may be incorrect
Hello,
I received the following warning when running chi-square;
n Is there a way to catch the 'error' code of 'warning' after run
chisq.test(x)?
n What does this error mean?
Thank you for your help.
[[alternative HTML version deleted]]
2005 Nov 24
2
Chi-squared test
Hello,
I'm trying to calculate a chi-squared test to see if my data are
different from the theoretical distribution or not:
chisq.test(rbind(c(79, 52, 69, 71, 82, 87, 95, 74, 55, 78, 49,
60),c(80,80,80, 80, 80, 80, 80, 80, 80, 80, 80, 80)))
Pearson's Chi-squared test
data: rbind(c(79, 52, 69, 71, 82, 87, 95, 74, 55, 78, 49, 60), c(80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
2005 Jan 21
2
chi-Squared distribution
Dear Rs:
outer(1:3, 1:3, function(df1, df2) qf(0.95, df1, df2))
I compare this F distribution results with the table, the answers were perfect. But I need to see for chi-sqaured distribution. When I employed the similar formula
outer(1:3, 1:3, function(df1, df2) qchisq(0.95, df1, df2)) , I am getting unexpected results. I need to see the following values:
p=0.750 .....
1 1.323
2009 Jul 23
1
goodfit() in vcd package: computation of chi-squared
I have troubles understanding how goodfit() function in the vcd package
computes the Pearson coefficient. Can anybody provide more information
on the computation?
In particular, for HorseKicks data in vcd package, goodfit() yields
> oo <- goodfit(HorseKicks,type="poisson",method="MinChisq")
> summary(oo)
Goodness-of-fit test for poisson distribution
2013 Jan 07
2
Have problem to do loop to generate transformed chi-squared variates
Hello R-helpers,
I need to generate standard variates normal to 'create' chi-squared variates. To make you more understand,
(1) a<-rnorm(3,0,1)
*after do (1), I need to squared and summed the three values. My problem is, how am I going to continue the programming if I had to repeat the process for 15 times, which in the end I will get 15 values from the whole programme.Hope you can
2009 Feb 04
3
chi squared goodness of fit test with R
Dear R users,
I am a master student in Mathematics and I am writing my thesis in
statistics. I need to use R and unfortunately I do not have any experience
with a computer program. Could you please help me about chi squared goodness
of fit test with R? In R-help website I saw a message about how to do that
but I do not know how to cut the data into bins and calculate the expected
numbers in each
2011 Apr 22
1
Create 2x2 table from summary data and run chi square test.
R 2.12
windows 7
I am summary data that I would like to make into a 2x2 table representing counts positive vs. negative counts:
28/289 20/276
My table should look something like the following:
group1 group2
Positive 28 20
Negative 289 276
How can a (1) create the 2x2 table
(2) run a chi square test on the table?
I have tried the following code, but I
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
2009 Feb 05
1
Chi-squared test adjusted for multiple comparisons? Harbe's test?
Hi!
I have some data that looks like this
up down percentaje
uew_21 20 14 58.82
uew_20_5 27 40 40.29
uew_20 8 13 38.09
uew_19_5 17 42 28.81
So I have 4 experimental conditions and I am counting number of
animals in the up and down compartment and the calculating the
percentage, I want to know which one of the conditions is different
from each other. If the data wouldn't be percentage
2010 Mar 01
1
Fitting chi-squared distribution
Dear all,
I have a question regarding performing test if the data fits chi-squared
distribution.
For example, using ks.test()
I found in the examples how to fit it to gamma or weibull
x<-rnorm(100)
ks.test(x, "pweibull", shape=2,scale=1)
for the gamma, pgamma can be used
But I cannot find the value of this second parameter for the chi-squared
distribution.
Maybe someone
2003 Apr 11
1
Pearson's Chi-squared Test
How i can perform a Pearson's Chi-squared Test in this data set:
| Outcome
-----------------+-----------+----------------------------------+
Treatment | Sex | None |Some | Marked | Total
-----------------+------------+--------+--------+-------------+
Active | Female | 6 | 5 | 16 | 27
2005 Jan 21
2
chi-Squared distribution in Friedman test
Dear R helpers:
Thanks for the previous reply. I am using Friedman racing test. According the the book "Pratical Nonprametric Statistic" by WJ Conover, after computing the statistics, he suggested to use chi-squared or F distribution to accept or reject null hypothesis. After looking into the source code, I found that R uses chi-sqaured distribution as below:
PVAL <-
2011 Mar 04
1
Question in Chi-squared test, can I do it with percentage data?
Hi all,
I know Chi-squared test can be done with the frequency data by R function
"chisq.test()", but I am not sure if it can be applied to the percentage
data ? The example of my data is as follow:
#############################################
KSL MHL MWS CLGC LYGC
independent (%) 96.22 92.18 68.54 93.80 85.74
2007 Sep 11
1
Fitting Data to a Noncentral Chi-Squared Distribution using MLE
Hi, I have written out the log-likelihood function to fit some data I have (called ONES20) to the non-central chi-squared distribution.
>library(stats4)
>ll<-function(lambda,k){x<-ONES20; 25573*0.5*lambda-25573*log(2)-sum(-x/2)-log((x/lambda)^(0.25*k-0.5))-log(besselI(sqrt(lambda*x),0.5*k-1,expon.scaled=FALSE))}
> est<-mle(minuslog=ll,start=list(lambda=0.05,k=0.006))
2005 Sep 13
1
Fisher's exact test vs Chi-square
Timothy,
I believe you are mistaken. Fisher's exact test give the correct answer
even in the face of small expected values for the cell counts. Pearson's
Chi-square approximates Fisher's exact test and can give the wrong
answer when expected cell counts are low. Chi-square was developed
because it is computationally "simple". Fisher's exact test,
particularly with tables
2009 Nov 05
1
partitioning chi-square statistic (g squared)
hi all -
is there a package or library that contains a function for partitioning the
chi-square statistic of an I X J contingency table into its respective
independent parts?
i looked around for this, but i didn't find anything. perhaps there's
another name for this sort of analysis? i know it as "g-squared".
thanks,
chris.
[[alternative HTML version deleted]]
2008 Jan 07
2
chi-squared with zero df (PR#10551)
Full_Name: Jerry W. Lewis
Version: 2.6.1
OS: Windows XP Professional
Submission from: (NULL) (24.147.191.250)
pchisq(0,0,ncp=lambda) returns 0 instead of exp(-lambda/2)
pchisq(x,0,ncp=lambda) returns NaN instead of exp(-lambda/2)*(1 +
SUM_{r=0}^infty ((lambda/2)^r / r!) pchisq(x, df + 2r))
qchisq(.7,0,ncp=1) returns 1.712252 instead of 0.701297103
qchisq(exp(-1/2),0,ncp=1) returns 1.238938