paternogbc / sensiPhy

R package to perform sensitivity analysis for comparative methods
http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12990/full
GNU General Public License v2.0
12 stars 4 forks source link

Small suggested change in tutorial #179

Closed gijsbertwerner closed 6 years ago

gijsbertwerner commented 6 years ago

In the samp_discrete example, I really like what is now the second example in the help function for samp_binary, i.e. an ARD rather than a symmetrical model, because the nice result there is that the one transition rate (q12) is not very sensitive, but the other is supersensitive. Thought that might make a nicer example for the tutorial than the a bit boring symmetrical one we are now using?

gijsbertwerner commented 6 years ago

The same applies to the clade_discrete example. Perhaps more fun to use the ARD example online, because it nicely shows a difference between the two transitions rates with one (almost) significantly affected and the other not.

BTW, I would change this myself, but I am afraid I have to admit I don't know how to put the figures in in tutorials :-(

paternogbc commented 6 years ago

I have updated the example 1 in the online tutorial (samp_discrete) now working on the second example (clade_discrete). @gijsbertwerner the figure & randomization test in the first example from clade_discrete are exactly the same for q12 and q21, is correct? Also the number of simulations appear to be = 1000 in the figures. There was a small typo nsim instead of n.sim.

All done for samp: https://github.com/paternogbc/sensiPhy/wiki/Sample-size All done for clade: https://github.com/paternogbc/sensiPhy/wiki/Influential-clades

Updating the vignette now before submitting.

gijsbertwerner commented 6 years ago

Great, thanks, Gustavo! Yes, if you set model = "ER" or "SYM" the q12 and q21 should be exactly the same, because you then essentially assume that the gain rate is exactly the same as the loss rate. So this is a good test to see if it actually works as it should (which I think it does).

ER and SYM behave exactly the same, because currently xx_discrete only accepts binary traits and not categorical states with more trait values. For a binary state ER and SYM are effectively the same, if/when we at some point expand to also allow for multi-state categorical states these will start to behave differently.

paternogbc commented 6 years ago

Hey @gijsbertwerner, Thanks for the clarification ;)