Description Usage Arguments Value Author(s) References Examples
View source: R/RatePhylo.allCI.R
Calculates approximate confidence intervals for all rate parameters. CIs are esimated for one rate parameters while fixing others at a given value (usually the maximum likelihood estimate).
These are reliable (given the asympotic assumptions of the chi-square distribution) if only two groups are being compared but should be regarded only as a rough approximation for =>3 different rate categories. If the rates are correlated the CIs may be underestimated.
1 2 3 4 5 6 7 8 9 | RatePhylo.allCI(
rateData,
MLrate = NULL,
fixed = NULL,
rateMIN = 0.001,
rateMAX = 50,
common.mean = FALSE,
lambda.est = TRUE
)
|
rateData |
an object of class |
MLrate |
a vector of relative rate parameters. The length of the vector is equal to the number of rates being estimated. If |
fixed |
A vector stating whether each parameter should be allowed to vary (either |
rateMIN |
Minimum value for the rate parameters |
rateMAX |
Maximum value for the rate parameters |
common.mean |
a logical specififying whether each rate category should have its own mean ( |
lambda.est |
Logical. Estimate Pagel's lambda. |
rateLci Lower confidence interval for rate estimate
rateUci Upper confidence interval for rate estimate
Gavin Thomas, Rob Freckleton
Thomas GH, Freckleton RP, & Szekely T. 2006. Comparative analyses of the influence of developmental mode on phenotypic diversification rates in shorebirds. Proceedings of the Royal Society B 273, 1619-1624.
Thomas GH, Meiri S, & Phillimore AB. 2009. Body size diversification in Anolis: novel environments and island effects. Evolution 63, 2017-2030.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(anolis.data)
data(anolis.tree)
## Convert data to class rateData with a rateMatrix object as input
anolis.rateMatrix <- as.rateMatrix(phy=anolis.tree, x="geo_ecomorph", data=anolis.data)
anolis.rateData <- as.rateData(y="Female_SVL", x="geo_ecomorph",
rateMatrix = anolis.rateMatrix, phy=NULL, data=anolis.data, log.y=TRUE)
# A model with a different rate in each of the four groups. The 'fixed' command is used to determine
# whether a particular rate is to be constrained or not. Use '1' to fix a group and 'FALSE' to show
# that the parameter is not fixed and should be estimated. The values should be entered in the same
# order as the ranking of the groups. That is, group 0 (small islands) takes position one in the
# fixed vector, group 1 (large island trunk crown and trunk ground) takes position 2 and so on. The
# default is to allow each group to take a different mean.
anole.ML <- optim.likRatePhylo(rateData=anolis.rateData, rate=NULL,
fixed=c(FALSE,FALSE,FALSE, FALSE),
common.mean=FALSE, lambda.est=FALSE)
# Confidence intervals for the first two parameters
RatePhylo.allCI(rateData=anolis.rateData, MLrate = anole.ML$MLRate,
fixed=c(FALSE, TRUE, TRUE, TRUE), rateMIN = 0.001, rateMAX = 50,
common.mean = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.