Re: [R] How to calculate chi sqaure value from statistical value and degrees of freedom?
Hello, You are computing the lower tail value, for chi-squared tests it's probably the upper tail you want. p.val1 - 1 - pchisq(Stat, df) p.val2 - pchisq(Stat, df, lower.tail=FALSE) p.val1 == p.val2 Hope this helps, Rui Barradas Em 06-06-2012 02:31, Manish Gupta escreveu: Hi, My input is chi square statistical value and degrees of freedom. But i m getting different p values with the above formula. I double checked my values with the below calculator. http://vassarstats.net/tabs.html#csq Pls help me out. -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-chi-sqaure-value-from-statistical-value-and-degrees-of-freedom-tp4632385p4632467.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] How to calculate chi sqaure value from statistical value and degrees of freedom?
Hi, Try pchisq(q,df) available at help(Chisquare) Ozgur -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-chi-sqaure-value-from-statistical-value-and-degrees-of-freedom-tp4632385p4632386.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to calculate chi sqaure value from statistical value and degrees of freedom?
Hi, How to calculate chi sqaure p value for given statistical value and degrees of freedom. Input : x = statistical value d = degrees of freedom output: p value = ? Regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-chi-sqaure-value-from-statistical-value-and-degrees-of-freedom-tp4632385.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] How to calculate chi sqaure value from statistical value and degrees of freedom?
Hi, Actually, pchisq(q,df) calculates the cumulative distribution function by default. To calculate the p-value, you can use either 1-pchisq(q,df) or pchisq(q,df,lower.tail=FALSE) PS: I checked, the p value yielded by R and the calculator for which you give a link, for some q and df values, and these two are same. Best Ozgur -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-chi-sqaure-value-from-statistical-value-and-degrees-of-freedom-tp4632385p4632470.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] How to calculate chi sqaure value from statistical value and degrees of freedom?
Hi, My input is chi square statistical value and degrees of freedom. But i m getting different p values with the above formula. I double checked my values with the below calculator. http://vassarstats.net/tabs.html#csq Pls help me out. -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-chi-sqaure-value-from-statistical-value-and-degrees-of-freedom-tp4632385p4632467.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.