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.

Reply via email to