This is an analysis of the relationships between fish eye shape and investment in the optic tectum, for a project by Teresa Iglesias, Dan Warren, Alex Dornburg, Peter Wainwright, Lars Schmitz, and Evan Economo.
library(ape)
library(ggplot2)
library(knitr)
library(plyr)
library(geiger)
library(nlme)
library(AICcmodavg)
library(beanplot)
library(GGally)
fish.table <- read.csv(file = "Segmentation Stats.csv", header = TRUE)
fish.table$Species <- as.character(fish.table$Species)
fish.tree <- read.tree(file = "Final_Jan5_update.tre")
fish.table <- fish.table[complete.cases(fish.table),]
# fish.table <- subset(fish.table, activity=="diurnal")
# Fish in data table that are missing from tree:
print(fish.table$Species[!fish.table$Species %in% fish.tree$tip.label])
## character(0)
# eels <- c("Myrichthys_breviceps", "Gymnothorax_moringa", "Gymnothorax_vicinus", "Gymnothorax_javanicus")
# fish.tree <- drop.tip(fish.tree, eels)
fish.tree <- drop.tip(fish.tree, fish.tree$tip.label[!fish.tree$tip.label %in% fish.table$Species])
plot(fish.tree, use.edge.length = FALSE)
analysis.cols <- c("Species", "totTeO", "OPT3", "activity", "feeding.guild..single.term.", "totBrain", "Body.mass")
analysis.table <- fish.table[,analysis.cols]
analysis.table <- ddply(fish.table, "Species", summarize,
log.teo = mean(log(totTeO)),
log.brain = mean(log(totBrain - totTeO)),
log.brain.teo = mean(log(totBrain)),
log.mass = mean(log(Body.mass)),
OPT3 = mean(OPT3),
activity = unique(activity),
guild = unique(feeding.guild..single.term.))
row.names(analysis.table) <- analysis.table$Species
analysis.table <- analysis.table[,-1]
analysis.table <- analysis.table[fish.tree$tip.label,]
ggpairs(analysis.table, mapping = aes(color = activity),
columns = c("log.teo", "log.brain", "log.mass", "OPT3"),
upper = list(continuous = wrap("cor", size = 4)),
lower = list(mapping = aes(shape = activity)),
diag = list(geom = hist, mapping = aes(alpha = 0.5))) + theme_bw()
ggpairs(analysis.table, mapping = aes(color = guild),
columns = c("log.teo", "log.brain", "log.mass", "OPT3"),
upper = list(continuous = wrap("cor", size = 4)),
lower = list(mapping = aes(shape = guild)),
diag = list(geom = hist, mapping = aes(alpha = 0.5))) + theme_bw()
# Quick look at un-phylo-corrected correlations
qplot(log.brain, log.teo, data = analysis.table, color = activity, shape = activity) + ylab("Log Optic Tectum Mass") + xlab("Log Brain Mass") + theme_bw()
qplot(log.brain - log.mass, log.teo - log.mass, data = analysis.table, color = activity, shape = activity) + xlab("Size-Corrected Brain Mass") + ylab("Size-Corrected Optic Tectum Mass") + theme_bw()
qplot(log.mass, OPT3, data = analysis.table, color = activity, shape = activity) + xlab("Log Body Mass") + ylab("OPT3") + theme_bw()
qplot(log.mass, log.brain, data = analysis.table, color = activity, shape = activity) + xlab("Log Body Mass") + ylab("Log Brain Mass") + theme_bw()
qplot(OPT3, log.teo - log.brain, data = analysis.table, color = activity, shape = activity) + ylab("Log(Optic Tectum/Total Brain)") + theme_bw()
qplot(OPT3, log.teo - log.brain, data = analysis.table, color = guild, shape = guild) + ylab("Log(Optic Tectum/Total Brain)") + theme_bw()
beanplot(OPT3 ~ activity, data = analysis.table, ylab = "OPT3")
Here we do PGLS with OU and BM correlation structures based on the tree. We’re running independent models for each predictor, as well as a joint model for all predictors.
#Use fitContinuous to assess fit of the OU model to the data
fit.ou <- fitContinuous(fish.tree, data.frame(analysis.table$log.teo, row.names=rownames(analysis.table)), model="OU")
## Warning in fitContinuous(fish.tree, data.frame(analysis.table$log.teo,
## row.names = rownames(analysis.table)), : Non-ultrametric tree with OU
## model, using VCV method.
## Warning in cache$dat - mu: Recycling array of length 1 in vector-array arithmetic is deprecated.
## Use c() or as.vector() instead.
## Warning in cache$dat - mu: Recycling array of length 1 in vector-array arithmetic is deprecated.
## Use c() or as.vector() instead.
this.alpha = fit.ou$opt$alpha
bm<-corBrownian(phy=fish.tree)
ou<-corMartins(this.alpha, phy=fish.tree, fixed = TRUE)
bm.int <- gls(log.teo ~ 1, correlation = bm, data = analysis.table, method = "ML")
summary(bm.int)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ 1
## Data: analysis.table
## AIC BIC logLik
## 153.0193 157.1744 -74.50964
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 22.84305 0.8026372 28.46 0
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -0.8046803 -0.1475204 0.3392402 0.7228149 1.4592381
##
## Residual standard error: 1.51177
## Degrees of freedom: 59 total; 58 residual
ou.int <- gls(log.teo ~ 1, correlation = ou, data = analysis.table, method = "ML")
summary(ou.int)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ 1
## Data: analysis.table
## AIC BIC logLik
## 145.3048 149.4599 -70.65242
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01225082
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 23.11234 0.26205 88.19821 0
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.6011664 -0.5305360 0.2624838 0.8873951 2.0871595
##
## Residual standard error: 0.9279345
## Degrees of freedom: 59 total; 58 residual
bm.brain <- gls(log.teo ~ log.brain, correlation = bm, data = analysis.table, method = "ML")
summary(bm.brain)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain
## Data: analysis.table
## AIC BIC logLik
## 11.94399 18.1766 -2.971994
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) -0.0022798 0.9730179 -0.002343 0.9981
## log.brain 0.9295872 0.0383606 24.232834 0.0000
##
## Correlation:
## (Intr)
## log.brain -0.969
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.8418657 0.3207030 0.6361888 0.8969310 2.8110054
##
## Residual standard error: 0.4496791
## Degrees of freedom: 59 total; 57 residual
ou.brain <- gls(log.teo ~ log.brain, correlation = ou, data = analysis.table, method = "ML")
summary(ou.brain)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain
## Data: analysis.table
## AIC BIC logLik
## 19.60367 25.83628 -6.801833
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01225082
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 1.0335511 1.0570279 0.97779 0.3323
## log.brain 0.8951989 0.0427037 20.96301 0.0000
##
## Correlation:
## (Intr)
## log.brain -0.996
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -3.27156398 -0.07936743 0.26123531 0.74996065 3.37031908
##
## Residual standard error: 0.3144257
## Degrees of freedom: 59 total; 57 residual
bm.opt3 <- gls(log.teo ~ log.brain + OPT3 ,correlation=bm,data=analysis.table, method="ML")
summary(bm.opt3)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain + OPT3
## Data: analysis.table
## AIC BIC logLik
## 5.44313 13.75328 1.278435
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 0.9011790 0.9635408 0.935279 0.3537
## log.brain 0.9199602 0.0361596 25.441694 0.0000
## OPT3 -1.7243470 0.5853208 -2.945986 0.0047
##
## Correlation:
## (Intr) lg.brn
## log.brain -0.944
## OPT3 -0.318 0.090
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.7269056 0.2291498 0.5735413 0.8235034 2.1375290
##
## Residual standard error: 0.4184231
## Degrees of freedom: 59 total; 56 residual
ou.opt3 <- gls(log.teo ~ log.brain + OPT3 ,correlation=ou,data=analysis.table, method="ML")
summary(ou.opt3)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain + OPT3
## Data: analysis.table
## AIC BIC logLik
## 10.13268 18.44283 -1.06634
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01225082
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 1.8115663 0.9933189 1.823751 0.0735
## log.brain 0.8952775 0.0390923 22.901649 0.0000
## OPT3 -2.1536420 0.6212322 -3.466726 0.0010
##
## Correlation:
## (Intr) lg.brn
## log.brain -0.971
## OPT3 -0.226 -0.001
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -2.9454206 -0.1660058 0.2488115 0.7258815 2.5229082
##
## Residual standard error: 0.2852985
## Degrees of freedom: 59 total; 56 residual
bm.gld <- gls(log.teo ~ log.brain + guild ,correlation=bm,data=analysis.table, method="ML")
summary(bm.gld)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain + guild
## Data: analysis.table
## AIC BIC logLik
## 15.98585 28.45107 -1.992923
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 0.3444301 1.0666272 0.322915 0.7480
## log.brain 0.9135266 0.0425239 21.482661 0.0000
## guildherbivore -0.1070916 0.1561894 -0.685652 0.4959
## guildpiscivore 0.1615704 0.1436048 1.125104 0.2655
## guildplanktivore -0.0312038 0.1183759 -0.263600 0.7931
##
## Correlation:
## (Intr) lg.brn gldhrb gldpsc
## log.brain -0.973
## guildherbivore -0.115 0.108
## guildpiscivore 0.172 -0.222 0.043
## guildplanktivore -0.344 0.345 0.149 -0.022
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.774425 0.459670 0.806444 1.033263 2.586848
##
## Residual standard error: 0.4422785
## Degrees of freedom: 59 total; 54 residual
ou.gld <- gls(log.teo ~ log.brain + guild ,correlation=ou,data=analysis.table, method="ML")
summary(ou.gld)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain + guild
## Data: analysis.table
## AIC BIC logLik
## 24.51911 36.98433 -6.259555
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01225082
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 1.1876124 1.1637441 1.020510 0.3120
## log.brain 0.8879579 0.0470406 18.876401 0.0000
## guildherbivore -0.0763743 0.1736045 -0.439933 0.6617
## guildpiscivore 0.1126508 0.1360440 0.828047 0.4113
## guildplanktivore 0.0269016 0.1394456 0.192918 0.8477
##
## Correlation:
## (Intr) lg.brn gldhrb gldpsc
## log.brain -0.996
## guildherbivore -0.151 0.138
## guildpiscivore 0.149 -0.179 0.081
## guildplanktivore -0.325 0.313 0.162 0.045
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -3.23164696 -0.01116457 0.42697089 0.82465857 3.10733154
##
## Residual standard error: 0.311549
## Degrees of freedom: 59 total; 54 residual
bm.all <- gls(log.teo ~ log.brain + OPT3 + guild, correlation = bm, data = analysis.table, method = "ML")
summary(bm.all)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain + OPT3 + guild
## Data: analysis.table
## AIC BIC logLik
## 10.06377 24.60653 1.968115
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 1.0251221 1.0365078 0.989015 0.3271
## log.brain 0.9124893 0.0401379 22.733880 0.0000
## OPT3 -1.6681151 0.6044398 -2.759771 0.0079
## guildherbivore -0.0872845 0.1475937 -0.591383 0.5568
## guildpiscivore 0.1216627 0.1363103 0.892542 0.3761
## guildplanktivore 0.0139111 0.1129184 0.123196 0.9024
##
## Correlation:
## (Intr) lg.brn OPT3 gldhrb gldpsc
## log.brain -0.947
## OPT3 -0.238 0.009
## guildherbivore -0.100 0.107 -0.049
## guildpiscivore 0.140 -0.219 0.106 0.037
## guildplanktivore -0.296 0.340 -0.145 0.155 -0.037
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.6691802 0.3088743 0.6822703 0.8949241 2.1414724
##
## Residual standard error: 0.4135604
## Degrees of freedom: 59 total; 53 residual
ou.all <- gls(log.teo ~ log.brain + OPT3 + guild, correlation = ou, data = analysis.table, method = "ML")
summary(ou.all)
## Generalized least squares fit by maximum likelihood
## Model: log.teo ~ log.brain + OPT3 + guild
## Data: analysis.table
## AIC BIC logLik
## 15.11589 29.65865 -0.5579461
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01225082
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 1.7079746 1.0776423 1.584918 0.1189
## log.brain 0.8989889 0.0432332 20.793936 0.0000
## OPT3 -2.1714116 0.6459428 -3.361616 0.0014
## guildherbivore -0.0517937 0.1592608 -0.325213 0.7463
## guildpiscivore 0.0588480 0.1256952 0.468180 0.6416
## guildplanktivore 0.0901437 0.1291667 0.697886 0.4883
##
## Correlation:
## (Intr) lg.brn OPT3 gldhrb gldpsc
## log.brain -0.972
## OPT3 -0.144 -0.076
## guildherbivore -0.142 0.141 -0.046
## guildpiscivore 0.128 -0.187 0.127 0.074
## guildplanktivore -0.297 0.320 -0.146 0.167 0.026
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -2.8951884 -0.1409373 0.3200560 0.6181795 2.6090124
##
## Residual standard error: 0.2828507
## Degrees of freedom: 59 total; 53 residual
Here we’re summarizing results and doing model-averaged effects based on AICc. We find that OPT3 is the strongest predictor of TeO investment by far.
models <- list(bm.int = bm.int,
bm.brain = bm.brain,
bm.opt3 = bm.opt3,
bm.gld = bm.gld,
bm.all = bm.all,
ou.int = ou.int,
ou.brain = ou.brain,
ou.opt3 = ou.opt3,
ou.gld = ou.gld,
ou.all = ou.all)
kable(aictab(models, modnames = names(models)))
Modnames | K | AICc | Delta_AICc | ModelLik | AICcWt | LL | Cum.Wt | |
---|---|---|---|---|---|---|---|---|
3 | bm.opt3 | 4 | 6.183871 | 0.000000 | 1.0000000 | 0.8353485 | 1.2784349 | 0.8353485 |
8 | ou.opt3 | 4 | 10.873421 | 4.689550 | 0.0958688 | 0.0800838 | -1.0663402 | 0.9154323 |
5 | bm.all | 7 | 12.259849 | 6.075978 | 0.0479312 | 0.0400392 | 1.9681149 | 0.9554715 |
2 | bm.brain | 3 | 12.380351 | 6.196480 | 0.0451286 | 0.0376981 | -2.9719936 | 0.9931696 |
10 | ou.all | 7 | 17.311971 | 11.128099 | 0.0038332 | 0.0032021 | -0.5579461 | 0.9963717 |
4 | bm.gld | 6 | 17.601231 | 11.417360 | 0.0033170 | 0.0027709 | -1.9929230 | 0.9991426 |
7 | ou.brain | 3 | 20.040031 | 13.856159 | 0.0009799 | 0.0008185 | -6.8018334 | 0.9999611 |
9 | ou.gld | 6 | 26.134495 | 19.950624 | 0.0000465 | 0.0000389 | -6.2595552 | 1.0000000 |
6 | ou.int | 2 | 145.519133 | 139.335262 | 0.0000000 | 0.0000000 | -70.6524234 | 1.0000000 |
1 | bm.int | 2 | 153.233562 | 147.049691 | 0.0000000 | 0.0000000 | -74.5096381 | 1.0000000 |
The above results indicate that, for each set of variables, the BM model outperforms the OU model. For that reason, we’re going to exclude the OU models from our analysis.
models <- list(bm.int = bm.int,
bm.brain = bm.brain,
bm.opt3 = bm.opt3,
bm.gld = bm.gld,
bm.all = bm.all)
kable(aictab(models, modnames = names(models)))
Modnames | K | AICc | Delta_AICc | ModelLik | AICcWt | LL | Cum.Wt | |
---|---|---|---|---|---|---|---|---|
3 | bm.opt3 | 4 | 6.183871 | 0.000000 | 1.0000000 | 0.9120952 | 1.278435 | 0.9120952 |
5 | bm.all | 7 | 12.259849 | 6.075978 | 0.0479312 | 0.0437178 | 1.968115 | 0.9558130 |
2 | bm.brain | 3 | 12.380351 | 6.196480 | 0.0451286 | 0.0411615 | -2.971994 | 0.9969745 |
4 | bm.gld | 6 | 17.601231 | 11.417360 | 0.0033170 | 0.0030255 | -1.992923 | 1.0000000 |
1 | bm.int | 2 | 153.233562 | 147.049691 | 0.0000000 | 0.0000000 | -74.509638 | 1.0000000 |
modavg(models, modnames = names(models), parm="OPT3")
##
## Multimodel inference on "OPT3" based on AICc
##
## AICc table used to obtain model-averaged estimate:
##
## K AICc Delta_AICc AICcWt Estimate SE
## bm.opt3 4 6.18 0.00 0.95 -1.72 0.59
## bm.all 7 12.26 6.08 0.05 -1.67 0.60
##
## Model-averaged estimate: -1.72
## Unconditional SE: 0.59
## 95% Unconditional confidence interval: -2.87, -0.57
#Use fitContinuous to assess fit of the OU model to the data
fit.ou <- fitContinuous(fish.tree, data.frame(analysis.table$log.brain.teo, row.names=rownames(analysis.table)), model="OU")
## Warning in fitContinuous(fish.tree, data.frame(analysis.table
## $log.brain.teo, : Non-ultrametric tree with OU model, using VCV method.
## Warning in cache$dat - mu: Recycling array of length 1 in vector-array arithmetic is deprecated.
## Use c() or as.vector() instead.
## Warning in cache$dat - mu: Recycling array of length 1 in vector-array arithmetic is deprecated.
## Use c() or as.vector() instead.
this.alpha = fit.ou$opt$alpha
bm<-corBrownian(phy=fish.tree)
ou<-corMartins(this.alpha, phy=fish.tree, fixed = TRUE)
bm.int <- gls(log.brain.teo ~ 1, correlation = bm, data = analysis.table, method = "ML")
summary(bm.int)
## Generalized least squares fit by maximum likelihood
## Model: log.brain.teo ~ 1
## Data: analysis.table
## AIC BIC logLik
## 154.1892 158.3443 -75.0946
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 24.75894 0.8106346 30.54266 0
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.04951308 -0.25322868 0.08056799 0.59788007 1.47313549
##
## Residual standard error: 1.526834
## Degrees of freedom: 59 total; 58 residual
ou.int <- gls(log.brain.teo ~ 1, correlation = ou, data = analysis.table, method = "ML")
summary(ou.int)
## Generalized least squares fit by maximum likelihood
## Model: log.brain.teo ~ 1
## Data: analysis.table
## AIC BIC logLik
## 148.7374 152.8924 -72.36868
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01055
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 24.85343 0.3141627 79.11005 0
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.72520564 -0.48914785 0.02899865 0.83201278 2.19065584
##
## Residual standard error: 0.9836059
## Degrees of freedom: 59 total; 58 residual
bm.mass <- gls(log.brain.teo ~ log.mass, correlation = bm, data = analysis.table, method = "ML")
summary(bm.int)
## Generalized least squares fit by maximum likelihood
## Model: log.brain.teo ~ 1
## Data: analysis.table
## AIC BIC logLik
## 154.1892 158.3443 -75.0946
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 24.75894 0.8106346 30.54266 0
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.04951308 -0.25322868 0.08056799 0.59788007 1.47313549
##
## Residual standard error: 1.526834
## Degrees of freedom: 59 total; 58 residual
ou.mass <- gls(log.brain.teo ~ log.mass, correlation = ou, data = analysis.table, method = "ML")
summary(ou.int)
## Generalized least squares fit by maximum likelihood
## Model: log.brain.teo ~ 1
## Data: analysis.table
## AIC BIC logLik
## 148.7374 152.8924 -72.36868
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01055
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 24.85343 0.3141627 79.11005 0
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.72520564 -0.48914785 0.02899865 0.83201278 2.19065584
##
## Residual standard error: 0.9836059
## Degrees of freedom: 59 total; 58 residual
bm.opt <- gls(log.brain.teo ~ log.mass + OPT3 ,correlation=bm,data=analysis.table, method="ML")
summary(bm.opt)
## Generalized least squares fit by maximum likelihood
## Model: log.brain.teo ~ log.mass + OPT3
## Data: analysis.table
## AIC BIC logLik
## 52.98421 61.29436 -22.4921
##
## Correlation Structure: corBrownian
## Formula: ~1
## Parameter estimate(s):
## numeric(0)
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 22.118350 0.5176390 42.72929 0.0000
## log.mass 0.586852 0.0354966 16.53260 0.0000
## OPT3 1.337922 0.8912557 1.50116 0.1389
##
## Correlation:
## (Intr) lg.mss
## log.mass -0.385
## OPT3 -0.717 0.206
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -1.5513023 0.4774090 0.9494927 1.2929731 1.9255549
##
## Residual standard error: 0.6260208
## Degrees of freedom: 59 total; 56 residual
ou.opt <- gls(log.brain.teo ~ log.mass + OPT3 ,correlation=ou,data=analysis.table, method="ML")
summary(ou.opt)
## Generalized least squares fit by maximum likelihood
## Model: log.brain.teo ~ log.mass + OPT3
## Data: analysis.table
## AIC BIC logLik
## 65.64088 73.95103 -28.82044
##
## Correlation Structure: corMartins
## Formula: ~1
## Parameter estimate(s):
## alpha
## 0.01055
##
## Coefficients:
## Value Std.Error t-value p-value
## (Intercept) 22.544878 0.4352632 51.79596 0.0000
## log.mass 0.588921 0.0428581 13.74119 0.0000
## OPT3 0.843961 1.0039759 0.84062 0.4041
##
## Correlation:
## (Intr) lg.mss
## log.mass -0.417
## OPT3 -0.875 0.098
##
## Standardized residuals:
## Min Q1 Med Q3 Max
## -2.519960299 0.008282081 0.694153614 1.169078166 2.061474086
##
## Residual standard error: 0.4701818
## Degrees of freedom: 59 total; 56 residual
models <- list(ou.int = ou.int,
ou.mass = ou.mass,
ou.opt = ou.opt,
bm.int = bm.int,
bm.mass = bm.mass,
bm.opt = bm.opt)
kable(aictab(models, modnames = names(models)))
Modnames | K | AICc | Delta_AICc | ModelLik | AICcWt | LL | Cum.Wt | |
---|---|---|---|---|---|---|---|---|
6 | bm.opt | 4 | 53.72495 | 0.0000000 | 1.0000000 | 0.5014799 | -22.49210 | 0.5014799 |
5 | bm.mass | 3 | 53.74826 | 0.0233149 | 0.9884102 | 0.4956678 | -23.65595 | 0.9971477 |
2 | ou.mass | 3 | 64.81708 | 11.0921321 | 0.0039028 | 0.0019572 | -29.19036 | 0.9991049 |
3 | ou.opt | 4 | 66.38162 | 12.6566713 | 0.0017850 | 0.0008951 | -28.82044 | 1.0000000 |
1 | ou.int | 2 | 148.95165 | 95.2267037 | 0.0000000 | 0.0000000 | -72.36868 | 1.0000000 |
4 | bm.int | 2 | 154.40348 | 100.6785353 | 0.0000000 | 0.0000000 | -75.09460 | 1.0000000 |
#```{r summarize.brownian}
models <- list(bm.int = bm.int,
bm.mass = bm.mass,
bm.opt = bm.opt)
kable(aictab(models, modnames = names(models)))
Modnames | K | AICc | Delta_AICc | ModelLik | AICcWt | LL | Cum.Wt | |
---|---|---|---|---|---|---|---|---|
3 | bm.opt | 4 | 53.72495 | 0.0000000 | 1.0000000 | 0.5029143 | -22.49210 | 0.5029143 |
2 | bm.mass | 3 | 53.74826 | 0.0233149 | 0.9884102 | 0.4970857 | -23.65595 | 1.0000000 |
1 | bm.int | 2 | 154.40348 | 100.6785353 | 0.0000000 | 0.0000000 | -75.09460 | 1.0000000 |