[R] p-values calculation
jd6688
jdsignature at gmail.com
Mon Jul 26 07:32:59 CEST 2010
Id cat1 location item_values p-values sequence
a111 1 3002737 0.196504377 0.01 1
a112 1 3017821 0.196504377 0.05 2
a113 1 3027730 0.196504377 0.02 3
a114 1 3036220 0.196504377 0.04 4
a115 1 3053984 0.196504377 0.03 5
a116 1 3063892 0.196504377 0.07 6
a117 1 3076333 0.196504377 0.08 7
a118 1 3090500 0.196504377 0.02 8
a119 1 3103304 0.196504377 0.03 9
a120 1 3119350 0.196504377 0.05 10
a121 1 3129884 0.196504377 0.01 11
a122 1 3154598 0.196504377 0.03 12
a123 1 3170910 0.196504377 0.05 13
a124 1 3180712 0.196504377 0.06 14
a125 1 3186519 0.196504377 0.07 15
a126 1 3192256 0.196504377 0.09 16
a127 1 3198441 0.196504377 0.01 17
a128 1 3205784 0.196504377 0.02 18
a129 1 3210685 0.196504377 0.03 19
a130 1 3218542 0.196504377 0.04 20
a131 1 3234318 0.196504377 0.05 21
a132 1 3239972 0.196504377 0.09 22
a133 1 3245663 0.196504377 0.05 23
a134 1 3257997 0.196504377 0.02 24
a135 1 3273226 0.196504377 0.03 26
a136 1 3285404 0.196504377 0.04 27
a137 1 3290332 0.196504377 0.05 28
a138 1 3300679 0.196504377 0.03 29
a139 1 3310164 0.196504377 0.09 30
I would like to calculate the p values for the item_values above.
option 1: z score based
> wData <- within(wData, {
+ z <- (values - mean(values))/sd(values)
+ "p-value" <- 2*pnorm(-abs(z)) ## 2-sided
+ rm(z) })
> wData
option 2: t distibution based
p_value<-2*pt(-abs(t),df=n-1)
my questions:
what R function can assist the distribution analysis to the item_values
column above? for instance: normal distribution analysis?
how to calculate the p values if the distribution of the item_values is
no-parameter distribution?
--
View this message in context: http://r.789695.n4.nabble.com/p-values-calculation-tp2301917p2301917.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list