[R-sig-eco] Randomization to obtain p-values
basille.web at ase-research.org
basille.web at ase-research.org
Fri Aug 23 16:38:54 CEST 2013
Hey Barnabas,
You could check the ade4 package for this, and the function:
?as.randtest
Look at the example there, and the details of the computation of the
p-values (which is very straightforward).
Mathieu.
Le 08/23/2013 03:07 AM, BARNABAS DARU a écrit :
> Dear R members –
> I write to seek help concerning simulation and randomization.
> I have a set equal area grids with observations e.g. phylogenetic observation, per grid.
> I would like to be able to simulate random observations e.g. 1000 times to obtain a null distribution of the observation. I will then be glad to know how to test the observed patterns against the null to obtain p-values.
> The data is arranged as follows:
>
> grids1 observatn
> g0 71.193510
> g1 110.338347
> g2 155.553859
> g3 178.696210
> g4 139.272733
> g5 120.913020
> g6 112.945412
> g7 106.012243
> g8 80.889829
> g9 95.196947
> g10 182.268465
> g11 195.393473
> g12 198.778229
> g13 177.343460
> g14 167.527703
> g15 167.046954
> g16 169.810604
> g17 166.792720
> g18 139.586739
> g19 138.117178
> g20 129.415400
> …
> I simply want to be able to show a histogram of the null distribution and a point showing how significant the observed is from the null as well as the confidence intervals.
> Any R code will be greatly appreciated.
>
> Thanks and kind regards
> Barnabas Daru
>
>
>
>
>
>
> \-/
> /\
> /--|
> /---/ Barnabas Daru
> |--/ PhD Candidate,
> \-/ African Centre for DNA Barcoding,
> /\ University of Johannesburg,
> /--\ PO Box 524, Auckland Park, 2006,
> |---\ Johannesburg, South Africa.
> \---\ Lab: +27 11 559 3477
> \--| Mobile: +277 3818 9583
> \-/ My homepage
> /\
> /--\
>
> #…if you can think it, you can do it.
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
--
~$ whoami
Mathieu Basille, PhD
~$ locate --details
University of Florida \\
Fort Lauderdale Research and Education Center
(+1) 954-577-6314
http://ase-research.org/basille
~$ fortune
« Le tout est de tout dire, et je manque de mots
Et je manque de temps, et je manque d'audace. »
-- Paul Éluard
More information about the R-sig-ecology
mailing list