Weds: Parrotfish data set analysis

Parrotfish

  • Need better convergence error handling.

  • Need to remedy: “Function cannot be evaluated at initial parameters” errors – Occur when attempting very large values of alpha, resulting in NaN output (trouble with exponentials of alpha in calculations).

  • Changed summaries to group by painting, so compare models and traits.  Less natural than comparing across painting for a single trait since that allows comparisons both across models and across paintings, but makes sense when comparing only a single partition.

  • See code, parrotfish.R & parrotfish_data.R for details

Chatter

Replying to various interesting questions from the lab groups today:

  • Chris O’s question on body size evolution:

compare the correlation of two traits corrected for size and phylogeny using several methods (Blomberg et al. 2003, pic residuals, pgls residuals and Revell’s method).

We have an evolving trait X. The value of the trait is strongly influenced by the evolution of another evolving trait, Y (size). Assume size Y depends on no other traits and follows Brownian motion: $ dY_t = _Y dB_t $ Assume trait X is also undergoing a random walk, but is also tugged around in a linear fashion (with strength ) by the size Y: $ dX_t = Y_t + _X dB_t $ Trait X is then not doing a purely Brownian random walk, so we cannot apply any of the methods which assume that it is.

We could instead consider the general form of a model in which trait X evolves as a stochastic process, dependent on trait Y:

\[ dX = f(X, Y)dt + \Sigma dB_t \]

Trait Y also evolves,

\[ dY = f(X,Y) dt + \Sigma dB_t \]

Now dB_t is a vector of two random walks and $ $ is a matrix, with terms $ {x^2}, {yx}, {xy} $, and $ {y^2}.$ The model above is a special case of this. This in general will not have a multivariate normal distribution of traits. We’ve run into this before: Peter asked effectively the same question earlier this quarter: https://www.carlboettiger.info/archives/151. Answer: maybe ABC, since we cannot solve the likelihood but can simulate?

  • Lars has a question on power in this study: (Young et. al. 2011)

Hmm, Article compares “four” models, with interesting choice of attributions: BM (citesBrookstein 1987 instead of Felsenstein 1985?), BM with drift (Hunt et. al. 2008), “stasis” Sheets & Mitchell, 2001 (sounds like OU…), OU: Lande (Lande, 1976). (Of course the study does not estimate power).

Misc

Still to do

Lab Notebook configuration

Exploring a couple plugins and modifications of lab notebook and workflow.  Currently looking at tighter github integration.

  • Github Code Viewer 2: Could embed rather than link code by url, though a link may be preferable anyway.  Currently seems broken.

  • Github and bitbucket project lister: allows embedding public projects into posts and pages instead of just as a widget.  Lists name of project (with link), summary, and number of watchers.  Formatting configurable but has some trouble in display sizes.  Required tweaking to display in reasonable font sizes for this theme.

  • Several things just list links to repositories as widgets: Github Grubber, Github Projects, GitPress. Projects doesn’t list all repositories (and doesn’t give an option to search). Haven’t found anything that gives impact or commits as seen on github dashboard. github_activity seems to error, Latest github commits does what it sounds like. Won’t keep any installed for the time being.

  • Of course I’m already using the popular github gists shortcode.

Github & Bitbucket Project Lister Example

References

  • Young M, Bell M and Brusatte S (2011). “Craniofacial Form And Function in Metriorhynchidae (Crocodylomorpha: Thalattosuchia): Modelling Phenotypic Evolution With Maximum-Likelihood Methods.” Biology Letters, 7. ISSN 1744-9561, https://dx.doi.org/10.1098/rsbl.2011.0357.

  • Hunt G, Bell M and Travis M (2008). “Evolution Toward A New Adaptive Optimum: Phenotypic Evolution in A Fossil Stickleback Lineage.” Evolution, 62. ISSN 00143820, https://dx.doi.org/10.1111/j.1558-5646.2007.00310.x.

  • Lande R (1976). “Natural Selection And Random Genetic Drift in Phenotypic Evolution.” Evolution, 30. ISSN 00143820, https://dx.doi.org/10.2307/2407703.

  • Horan R, Fenichel E, Drury K and Lodge D (2011). “Managing Ecological Thresholds in Coupled Environmental-Human Systems.” Proceedings of The National Academy of Sciences, 108. ISSN 0027-8424, https://dx.doi.org/10.1073/pnas.1005431108.

  • Unknown, H. David Sheets, Charles E. Mitchell, (2001) Genetica, 112/113 10.1023/A:1013308409951