Skip to contents

Wrapper function to find maximum likelihood solutions for all univariate models (excluding models with mode shifts) to an evolutionary sequence (time-series).

Usage

fit.all.univariate(y, pool = TRUE)

Arguments

y

an univariate paleoTS object.

pool

indicating whether to pool variances across samples

Value

The function returns a list of all investigated models and their highest log-likelihood (and their corresponding AICc and AICc weight).

References

Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32:578–601

Hunt, G., Bell, M. A. & Travis, M. P. Evolution towards a new adaptive optimum: Phenotypic evolution in a fossil stickleback lineage. Evolution 62:700–710 (2008)

Author

Kjetil Lysne Voje

Examples

## ##Generate a paleoTS object.
x <- paleoTS::sim.GRW(30)

## Fit univariate models to the data.
fit.all.univariate(x, pool = TRUE)
#> 
#> Comparing 9 models [n = 30, method = Joint]
#> 
#>                                                                 logL K     AICc
#> GRW                                                       -12.607314 3 32.13771
#> URW                                                       -12.986461 2 30.41737
#> Stasis                                                    -16.761302 2 37.96705
#> StrictStasis                                              -36.327474 1 74.79781
#> Decel                                                     -19.720757 3 46.36459
#> Accel                                                     -12.986479 3 32.89603
#> OU                                                         -7.684121 4 24.96824
#> OU model with moving optimum (ancestral state at optimum) -13.192140 4 35.98428
#> OU model with moving optimum                               -7.684126 5 27.86825
#>                                                               dAICc Akaike.wt
#> GRW                                                        7.169464     0.021
#> URW                                                        5.449124     0.048
#> Stasis                                                    12.998806     0.001
#> StrictStasis                                              49.829564     0.000
#> Decel                                                     21.396350     0.000
#> Accel                                                      7.927792     0.014
#> OU                                                         0.000000     0.739
#> OU model with moving optimum (ancestral state at optimum) 11.016039     0.003
#> OU model with moving optimum                               2.900010     0.173