Description Usage Format Details Author(s) Source References Examples
This is the Anolis bimaculatus dataset used in Butler & King (2004).
It is used to test a hypothesis of character displacement using an interspecific dataset of body sizes and current data on sympatry/allopatry.
The data frame consists of the following columns:
species
which are species names,
size
which is the phenotypic data,
and the variables ancestor
and time
which specify the topology of the phylogeny and the location of the nodes in time, respectively.
The columns OU.1
, OU.3
, OU.4
, and OU.LP
specify four hypothetical arrangements of selective regimes.
Explanations of the data are given below.
1 |
A data frame with 45 observations on the following 8 variables.
Labels for the nodes.
Species names for extant species.
Body size (head length in mm) of extant species.
Ancestral node.
Time of node.
a factor with levels ns
a factor with levels small
medium
large
a factor with levels small
medium
large
anc
a factor with levels small
medium
large
We use the phenotypic data and phylogeny of Losos (1990), which employed the head lengths (of males) as a proxy for body size. In this group of lizards, head length correlates very strongly with snout-to-vent length and the cube root of mass, which are standard measures of body size. The data are head lengths in mm, note that we use the log of this value in analyses.
The tree topology is encoded via two vectors: ancestor
and time
.
Each node of the phylogenetic tree has a corresponding row in the data frame, numbered from 1 to 45.
The columns ancestor
and time
specify the phylogeny.
The ancestor
variable specifies the topology: it is a list indicating the ancestor of each node.
The root node has ancestor 0.
The variable time
specifies the temporal location of each node, with the root node being at time 0.
(Columns OU.1
, OU.3
, OU.4
, OU.LP
).
These columns are factors, the levels of which correspond to the “paintings” of the respective adaptive regime hypotheses onto the phylogeny.
Each selective regime is named (small, medium, large, etc.).
Put the corresponding name on each branch segment to indicate which selective regime it belongs to.
Each column corresponds to a different painting of the selective regimes, and thus to a different hypothesis.
In this example, there are 3 alternative models (see Butler & King 2004):
OU.4
is 4-regime model,
OU.3
is 3-regime model (all ancestors are medium),
OU.LP
is linear parsimony model.
Marguerite A. Butler <mbutler at hawaii dot edu> and Aaron A. King <kingaa at umich dot edu>
Butler, M.A. and A.A. King. 2004. Phylogenetic comparative analysis: a modeling approach for adaptive evolution. American Naturalist 164:683-695.
Lazell, J. D. 1972. The anoles (Sauria: Iguanidae) of the Lesser Antilles. Bull. Mus. Comp. Zool., 143:1-115.
Losos, J. B. 1990. A phylogenetic analysis of character displacement in Caribbean Anolis lizards. Evolution, 44:558-569.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(bimac)
tree <- with(bimac,ouchtree(node,ancestor,time/max(time),species))
plot(tree,node.names=TRUE)
print(h1 <- brown(log(bimac['size']),tree))
plot(h1)
print(h2 <- hansen(log(bimac['size']),tree,bimac['OU.1'],sqrt.alpha=1,sigma=1))
plot(h2)
print(h3 <- hansen(log(bimac['size']),tree,bimac['OU.3'],sqrt.alpha=1,sigma=1))
plot(h3)
print(h4 <- hansen(log(bimac['size']),tree,bimac['OU.4'],sqrt.alpha=1,sigma=1))
plot(h4)
h5 <- hansen(log(bimac['size']),tree,bimac['OU.LP'],sqrt.alpha=1,sigma=1,reltol=1e-5)
print(h5 <- update(h5,method='subplex',reltol=1e-11,parscale=c(0.1,0.1),hessian=TRUE))
simdat <- simulate(h5,nsim=10)
hsim <- update(h5,data=simdat[[1]])
print(summary(hsim))
bsim <- update(h1,data=simdat[[1]])
print(summary(bsim))
|
Loading required package: subplex
call:
brown(data = log(bimac["size"]), tree = tree)
nodes ancestors times labels size
1 1 <NA> 0.0000000 <NA> NA
2 2 1 0.3157895 <NA> NA
3 3 2 0.8421053 <NA> NA
4 4 3 0.8947368 <NA> NA
5 5 4 0.9473684 <NA> NA
6 6 3 0.9473684 <NA> NA
7 7 1 0.2105263 <NA> NA
8 8 7 0.3421053 <NA> NA
9 9 8 0.4736842 <NA> NA
10 10 9 0.6052632 <NA> NA
11 11 10 0.7368421 <NA> NA
12 12 9 0.7368421 <NA> NA
13 13 8 0.5789474 <NA> NA
14 14 13 0.6842105 <NA> NA
15 15 14 0.8947368 <NA> NA
16 16 15 0.9473684 <NA> NA
17 17 7 0.7368421 <NA> NA
18 18 17 0.7894737 <NA> NA
19 19 18 0.8947368 <NA> NA
20 20 19 0.9473684 <NA> NA
21 21 20 0.9736842 <NA> NA
22 22 19 0.9473684 <NA> NA
23 23 2 1.0000000 po 2.602690
24 24 4 1.0000000 se 2.660260
25 25 5 1.0000000 sc 2.660260
26 26 5 1.0000000 sn 2.653242
27 27 6 1.0000000 wb 2.674149
28 28 6 1.0000000 wa 2.701361
29 29 10 1.0000000 be 3.161247
30 30 11 1.0000000 bn 3.299534
31 31 11 1.0000000 bc 3.328627
32 32 12 1.0000000 lb 3.353407
33 33 12 1.0000000 la 3.360375
34 34 13 1.0000000 nu 3.049273
35 35 14 1.0000000 sa 2.906901
36 36 15 1.0000000 gb 2.980619
37 37 16 1.0000000 ga 2.933857
38 38 16 1.0000000 gm 2.975530
39 39 17 1.0000000 oc 3.104587
40 40 18 1.0000000 fe 3.346389
41 41 20 1.0000000 li 2.928524
42 42 21 1.0000000 mg 2.939162
43 43 21 1.0000000 md 2.990720
44 44 22 1.0000000 t1 3.058707
45 45 22 1.0000000 t2 3.068053
sigma squared:
[,1]
[1,] 0.04311003
theta:
NULL
loglik deviance aic aic.c sic dof
17.33129 -34.66257 -30.66257 -30.06257 -28.39158 2.00000
call:
hansen(data = log(bimac["size"]), tree = tree, regimes = bimac["OU.1"],
sqrt.alpha = 1, sigma = 1)
nodes ancestors times labels OU.1 size
1 1 <NA> 0.0000000 <NA> ns NA
2 2 1 0.3157895 <NA> ns NA
3 3 2 0.8421053 <NA> ns NA
4 4 3 0.8947368 <NA> ns NA
5 5 4 0.9473684 <NA> ns NA
6 6 3 0.9473684 <NA> ns NA
7 7 1 0.2105263 <NA> ns NA
8 8 7 0.3421053 <NA> ns NA
9 9 8 0.4736842 <NA> ns NA
10 10 9 0.6052632 <NA> ns NA
11 11 10 0.7368421 <NA> ns NA
12 12 9 0.7368421 <NA> ns NA
13 13 8 0.5789474 <NA> ns NA
14 14 13 0.6842105 <NA> ns NA
15 15 14 0.8947368 <NA> ns NA
16 16 15 0.9473684 <NA> ns NA
17 17 7 0.7368421 <NA> ns NA
18 18 17 0.7894737 <NA> ns NA
19 19 18 0.8947368 <NA> ns NA
20 20 19 0.9473684 <NA> ns NA
21 21 20 0.9736842 <NA> ns NA
22 22 19 0.9473684 <NA> ns NA
23 23 2 1.0000000 po ns 2.602690
24 24 4 1.0000000 se ns 2.660260
25 25 5 1.0000000 sc ns 2.660260
26 26 5 1.0000000 sn ns 2.653242
27 27 6 1.0000000 wb ns 2.674149
28 28 6 1.0000000 wa ns 2.701361
29 29 10 1.0000000 be ns 3.161247
30 30 11 1.0000000 bn ns 3.299534
31 31 11 1.0000000 bc ns 3.328627
32 32 12 1.0000000 lb ns 3.353407
33 33 12 1.0000000 la ns 3.360375
34 34 13 1.0000000 nu ns 3.049273
35 35 14 1.0000000 sa ns 2.906901
36 36 15 1.0000000 gb ns 2.980619
37 37 16 1.0000000 ga ns 2.933857
38 38 16 1.0000000 gm ns 2.975530
39 39 17 1.0000000 oc ns 3.104587
40 40 18 1.0000000 fe ns 3.346389
41 41 20 1.0000000 li ns 2.928524
42 42 21 1.0000000 mg ns 2.939162
43 43 21 1.0000000 md ns 2.990720
44 44 22 1.0000000 t1 ns 3.058707
45 45 22 1.0000000 t2 ns 3.068053
alpha:
[,1]
[1,] 0.1921554
sigma squared:
[,1]
[1,] 0.04836469
theta:
$size
ns
2.953805
loglik deviance aic aic.c sic dof
15.69682 -31.39364 -25.39364 -24.13048 -21.98715 3.00000
call:
hansen(data = log(bimac["size"]), tree = tree, regimes = bimac["OU.3"],
sqrt.alpha = 1, sigma = 1)
nodes ancestors times labels OU.3 size
1 1 <NA> 0.0000000 <NA> medium NA
2 2 1 0.3157895 <NA> medium NA
3 3 2 0.8421053 <NA> medium NA
4 4 3 0.8947368 <NA> medium NA
5 5 4 0.9473684 <NA> medium NA
6 6 3 0.9473684 <NA> medium NA
7 7 1 0.2105263 <NA> medium NA
8 8 7 0.3421053 <NA> medium NA
9 9 8 0.4736842 <NA> medium NA
10 10 9 0.6052632 <NA> medium NA
11 11 10 0.7368421 <NA> medium NA
12 12 9 0.7368421 <NA> medium NA
13 13 8 0.5789474 <NA> medium NA
14 14 13 0.6842105 <NA> medium NA
15 15 14 0.8947368 <NA> medium NA
16 16 15 0.9473684 <NA> medium NA
17 17 7 0.7368421 <NA> medium NA
18 18 17 0.7894737 <NA> medium NA
19 19 18 0.8947368 <NA> medium NA
20 20 19 0.9473684 <NA> medium NA
21 21 20 0.9736842 <NA> medium NA
22 22 19 0.9473684 <NA> medium NA
23 23 2 1.0000000 po small 2.602690
24 24 4 1.0000000 se small 2.660260
25 25 5 1.0000000 sc small 2.660260
26 26 5 1.0000000 sn small 2.653242
27 27 6 1.0000000 wb small 2.674149
28 28 6 1.0000000 wa small 2.701361
29 29 10 1.0000000 be large 3.161247
30 30 11 1.0000000 bn large 3.299534
31 31 11 1.0000000 bc large 3.328627
32 32 12 1.0000000 lb large 3.353407
33 33 12 1.0000000 la large 3.360375
34 34 13 1.0000000 nu medium 3.049273
35 35 14 1.0000000 sa medium 2.906901
36 36 15 1.0000000 gb medium 2.980619
37 37 16 1.0000000 ga medium 2.933857
38 38 16 1.0000000 gm large 2.975530
39 39 17 1.0000000 oc medium 3.104587
40 40 18 1.0000000 fe medium 3.346389
41 41 20 1.0000000 li medium 2.928524
42 42 21 1.0000000 mg medium 2.939162
43 43 21 1.0000000 md medium 2.990720
44 44 22 1.0000000 t1 medium 3.058707
45 45 22 1.0000000 t2 medium 3.068053
alpha:
[,1]
[1,] 1.125965
sigma squared:
[,1]
[1,] 0.05170735
theta:
$size
large medium small
3.899393 2.972447 2.294089
loglik deviance aic aic.c sic dof
19.57786 -39.15573 -29.15573 -25.62631 -23.47826 5.00000
call:
hansen(data = log(bimac["size"]), tree = tree, regimes = bimac["OU.4"],
sqrt.alpha = 1, sigma = 1)
nodes ancestors times labels OU.4 size
1 1 <NA> 0.0000000 <NA> anc NA
2 2 1 0.3157895 <NA> anc NA
3 3 2 0.8421053 <NA> anc NA
4 4 3 0.8947368 <NA> anc NA
5 5 4 0.9473684 <NA> anc NA
6 6 3 0.9473684 <NA> anc NA
7 7 1 0.2105263 <NA> anc NA
8 8 7 0.3421053 <NA> anc NA
9 9 8 0.4736842 <NA> anc NA
10 10 9 0.6052632 <NA> anc NA
11 11 10 0.7368421 <NA> anc NA
12 12 9 0.7368421 <NA> anc NA
13 13 8 0.5789474 <NA> anc NA
14 14 13 0.6842105 <NA> anc NA
15 15 14 0.8947368 <NA> anc NA
16 16 15 0.9473684 <NA> anc NA
17 17 7 0.7368421 <NA> anc NA
18 18 17 0.7894737 <NA> anc NA
19 19 18 0.8947368 <NA> anc NA
20 20 19 0.9473684 <NA> anc NA
21 21 20 0.9736842 <NA> anc NA
22 22 19 0.9473684 <NA> anc NA
23 23 2 1.0000000 po small 2.602690
24 24 4 1.0000000 se small 2.660260
25 25 5 1.0000000 sc small 2.660260
26 26 5 1.0000000 sn small 2.653242
27 27 6 1.0000000 wb small 2.674149
28 28 6 1.0000000 wa small 2.701361
29 29 10 1.0000000 be large 3.161247
30 30 11 1.0000000 bn large 3.299534
31 31 11 1.0000000 bc large 3.328627
32 32 12 1.0000000 lb large 3.353407
33 33 12 1.0000000 la large 3.360375
34 34 13 1.0000000 nu medium 3.049273
35 35 14 1.0000000 sa medium 2.906901
36 36 15 1.0000000 gb medium 2.980619
37 37 16 1.0000000 ga medium 2.933857
38 38 16 1.0000000 gm large 2.975530
39 39 17 1.0000000 oc medium 3.104587
40 40 18 1.0000000 fe medium 3.346389
41 41 20 1.0000000 li medium 2.928524
42 42 21 1.0000000 mg medium 2.939162
43 43 21 1.0000000 md medium 2.990720
44 44 22 1.0000000 t1 medium 3.058707
45 45 22 1.0000000 t2 medium 3.068053
alpha:
[,1]
[1,] 14.67003
sigma squared:
[,1]
[1,] 0.2253265
theta:
$size
anc large medium small
2.827657 3.297563 3.105650 2.582588
loglik deviance aic aic.c sic dof
23.61159 -47.22319 -35.22319 -29.97319 -28.41022 6.00000
call:
hansen(data = data, tree = object, regimes = regimes, sqrt.alpha = sqrt.alpha,
sigma = sigma, method = "subplex", hessian = TRUE, reltol = 1e-11,
parscale = ..3)
nodes ancestors times labels OU.LP size
1 1 <NA> 0.0000000 <NA> medium NA
2 2 1 0.3157895 <NA> medium NA
3 3 2 0.8421053 <NA> small NA
4 4 3 0.8947368 <NA> small NA
5 5 4 0.9473684 <NA> small NA
6 6 3 0.9473684 <NA> small NA
7 7 1 0.2105263 <NA> medium NA
8 8 7 0.3421053 <NA> medium NA
9 9 8 0.4736842 <NA> large NA
10 10 9 0.6052632 <NA> large NA
11 11 10 0.7368421 <NA> large NA
12 12 9 0.7368421 <NA> large NA
13 13 8 0.5789474 <NA> medium NA
14 14 13 0.6842105 <NA> medium NA
15 15 14 0.8947368 <NA> medium NA
16 16 15 0.9473684 <NA> medium NA
17 17 7 0.7368421 <NA> medium NA
18 18 17 0.7894737 <NA> medium NA
19 19 18 0.8947368 <NA> medium NA
20 20 19 0.9473684 <NA> medium NA
21 21 20 0.9736842 <NA> medium NA
22 22 19 0.9473684 <NA> medium NA
23 23 2 1.0000000 po small 2.602690
24 24 4 1.0000000 se small 2.660260
25 25 5 1.0000000 sc small 2.660260
26 26 5 1.0000000 sn small 2.653242
27 27 6 1.0000000 wb small 2.674149
28 28 6 1.0000000 wa small 2.701361
29 29 10 1.0000000 be large 3.161247
30 30 11 1.0000000 bn large 3.299534
31 31 11 1.0000000 bc large 3.328627
32 32 12 1.0000000 lb large 3.353407
33 33 12 1.0000000 la large 3.360375
34 34 13 1.0000000 nu medium 3.049273
35 35 14 1.0000000 sa medium 2.906901
36 36 15 1.0000000 gb medium 2.980619
37 37 16 1.0000000 ga medium 2.933857
38 38 16 1.0000000 gm large 2.975530
39 39 17 1.0000000 oc medium 3.104587
40 40 18 1.0000000 fe medium 3.346389
41 41 20 1.0000000 li medium 2.928524
42 42 21 1.0000000 mg medium 2.939162
43 43 21 1.0000000 md medium 2.990720
44 44 22 1.0000000 t1 medium 3.058707
45 45 22 1.0000000 t2 medium 3.068053
'optim' diagnostic message: success! tolerance satisfied
alpha:
[,1]
[1,] 2.610141
sigma squared:
[,1]
[1,] 0.05054862
theta:
$size
large medium small
3.355242 3.040732 2.565031
loglik deviance aic aic.c sic dof
24.81823 -49.63646 -39.63646 -36.10705 -33.95899 5.00000
$call
hansen(data = data, tree = object, regimes = regimes, sqrt.alpha = sqrt.alpha,
sigma = sigma)
$conv.code
[1] 0
$optimizer.message
NULL
$alpha
[,1]
[1,] 6.437829
$sigma.squared
[,1]
[1,] 0.04394736
$optima
$optima$size
large medium small
3.265152 3.027534 2.556598
$loglik
[1] 34.00384
$deviance
[1] -68.00769
$aic
[1] -58.00769
$aic.c
[1] -54.47828
$sic
[1] -52.33022
$dof
[1] 5
$call
brown(data = data, tree = object)
$sigma.squared
[,1]
[1,] 0.0376242
$theta
$theta$size
[1] 2.90548
$loglik
[1] 18.89653
$deviance
[1] -37.79306
$aic
[1] -33.79306
$aic.c
[1] -33.19306
$sic
[1] -31.52207
$dof
[1] 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.