Skip to content

Normality tests

4 messages · Bruce Kindseth, Peter Ehlers, Jerome Asselin +1 more

#
On 2011-04-26 13:15, Bruce Kindseth wrote:
Try

   shapiro.test(rnorm(100))$p.value

Put all your p.values into a vector and write that out.

While you're at it, check ?str to see how handy the
str() function is in identifying the pieces of an R object.

Peter Ehlers
#
On Tue, 2011-04-26 at 16:15 -0400, Bruce Kindseth wrote:
As seen below, the shapiro.test() output is a list of four components.
[1] "statistic" "p.value"   "method"    "data.name"

You can extract just the p-value with:
[1] 0.244

HTH,
Jerome