Skip to content
Back to formatted view

Raw Message

Message-ID: <4B445B92.5070503@statistik.tu-dortmund.de>
Date: 2010-01-06T09:44:50Z
From: Uwe Ligges
Subject: decimal value for p-value
In-Reply-To: <669297.27160.qm@web58701.mail.re1.yahoo.com>

On 06.01.2010 09:16, Roslina Zakaria wrote:
> Dear r-users,
>
> I conducted a chi-square test using chi.test code and found that my p-value = 1.  My question is, is it possible to get the decimals form of the p-value?  Maybe the p-value is actually 0.9999 before rounding the value.
>
> thank you so much for any help given.


Access the p value returned from chisq.test (see?chisq.test) directly as in:

testresult <- chisq.test(.....)
testresult[["p.value"]]

or even more digits:

print(chisq.test(InsectSprays$count > 7, 
InsectSprays$spray)[["p.value"]], digits=20)

Best,
Uwe Ligges

>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________
> R-help at 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.