startingpt.mecca | R Documentation |

This function takes the output of calibrateMecca along with observed data and partial least squares loadings and outputs starting values and tuning parameters for the ABC-MCMC (Wegmann et al. 2009).

```
startingpt.mecca(calibrationOutput, phy, cladeMean, cladeVariance,
tolerance = 0.01, plsComponents, BoxCox = TRUE)
```

`calibrationOutput` |
The output from calibrateMecca |

`phy` |
A time calibrated phylogeny in "phylo" format |

`cladeMean` |
A named vector of trait means. All tips in the tree must be represented |

`cladeVariance` |
A names vector of trait variances. All tips in the tree must be represented. If only one taxon is present, use 0 for the variance |

`tolerance` |
The proportion of calibrations simulations that fall closest to the oberved data that will be retained to compute MECCA tuning parameters |

`plsComponents` |
a matrix of Partial Least Squares component loadings |

`BoxCox` |
Logical - Should Summary Statistics be Box-Cox transformed? Default is yes and is recommended |

You will need to compute PLS loadings using the package "pls" prior to running this function. MECCA performs extremely poorly if summaries are not PLS transformed. If Bayes Factors are to be computed to perform model selection (Leuenberger and Wegmann 2010), raw summaries will need to be used in the post-sampling adjustment step. However, PLS transformed summaries can still be used in the acceptance/rejection step of the MCMC and can also be used to determine which simulations to retain

`$tuning ` |
a matrix containing starting values and proposal widths for trait evolution parameters |

`$startingBirth ` |
Starting value for speciation |

`$startingDeath ` |
Starting value for extinction |

`$dcrit ` |
the criticial distance - simulated data must fall within this distance of the observed data in order to be accepted |

`$obsTraits ` |
the observed data |

`$plsObserved ` |
Partial Least Squared transformed observed data |

`$plsLoadings ` |
Partial Least Squared componenent loadings - these are used to transform data during the MCMC |

Graham Slater, Luke Harmon, Daniel Wegman

Slater GJ, Harmon LJ, Wegmann D, Joyce P, Revell LJ, Alfaro ME. in press Evolution, Leuenberger C, and Wegmann D. 2010. Genetics 184: 243-252., Wegmann D, Leuenberger C, Excoffier L. 2009. Genetics 182: 1207-1218.

```
example(mecca)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.