PK
/'ZQ
READMEUT :W_:W_This figshare package includes data and code for:
Complex cooperative breeders: using infant care costs to explain variability in callitrichine social and reproductive behavior
Samuel L. Díaz-Muñoz
American Journal of Primatology (in press)
If you are reading or using this, let me know how this data package was useful for you. Very interested in how people will use open data and open code. Always open to collaborate! Please contact me at the following email address:
me ((at)) samdiazmunoz.org
-Samuel L. Díaz-Muñoz
If you use these data and code, please cite both the article and the figshare doi.
CONTENTS
code.R
Code for the statistical program R, used to generate the figures and some statistics in the text. Using R version 3.1.3 (2015)
callitrichine_data_complete.csv
Data used to generate all stats and graphs. References for these data are below. The table from Digby et al. 2007 was OCR'd from PDF into electronic (text) format and curated by hand. Data on body masses from Hartwig 1996 were entered by hand.
Digby LJ, Ferrari SF, Saltzman W. 2007. The role of competition in cooperatively breeding species. Oxford University Press:85–106.
Hartwig WC. 1996. Perinatal life history traits in New World monkeys. American Journal of Primatology 40:99–130.PKߟPK
/'ZQ!
!
callitrichine_data_complete.csvUT :W_:W_"Species","Population","Lineage","Home Range Min","Home Range Max","Group Size Min","Group Size Max","Body Size","Neonate Size","Litter Size","Litter Neonate/Adult Ratio"
"Callimico goeldii","Pando, Bolivia","Callimico",30,150,4,12,500,47,1,0.09
"Callimico goeldii","Virazon, Bolivia","Callimico",45,50,4,12,500,47,1,0.09
"Callithrix jacchus","João Pessoa, Brazil","Callithrix",2,5,3,16,257,31.5,2,0.25
"Callithrix jacchus","Nisia Floresta, Brazil","Callithrix",0.7,5.2,3,16,257,31.5,2,0.25
"Callithrix jacchus","Dois Irmãos, Brazil","Callithrix",4.11,4.11,3,16,257,31.5,2,0.25
"C. penicillata","Brasilia, Brazil","Callithrix",3.5,3.5,3,13,249,31.5,2,0.25
"C. aurita","Cunha, Brazil","Callithrix",35.3,35.3,4,11,429,31.5,2,0.15
"C. aurita","Fazenda Lagoa, Brazil","Callithrix",16.5,16.5,4,11,429,31.5,2,0.15
"C. flaviceps","Caratinga, Brazil","Callithrix",33.86,35.5,5,20,406,31.5,2,0.16
"C. kuhlii","Lemos Maia, Brazil","Callithrix",10,10,5,5,375,31.5,2,0.17
"Cebuella pygmaea","Peru","Cebuella",0.1,0.5,2,9,123,16,2,0.26
"Cebuella pygmaea","Ecuador","Cebuella",0.4,1.09,2,9,123,16,2,0.26
"Mico intermedius","Mato Grosso, Brazil","Mico",22.1,22.1,9,15,425,,,
"M. argentatus","Tapajós, Brazil","Mico",4,24,6,10,425,34,2,0.16
"M. argentatus","Caxiuanã, Brazil","Mico",35,35,6,10,425,34,2,0.16
"Saguinus fuscicollis","Manu, Peru","Saguinus",30,100,2,10,373,41,2,0.22
"Saguinus fuscicollis","Rio Blanco, Peru","Saguinus",40,40,2,10,373,41,2,0.22
"Saguinus fuscicollis","Rio Urucu, Brazil","Saguinus",149,149,2,10,373,41,2,0.22
"S. f. weddeilli","Cachoeira Samuel, Brazil","Saguinus",44,44,4,11,373,41,2,0.22
"S. imperator","Manu, Peru","Saguinus",30,100,,,450,41,2,0.18
"S. mystax","Rio Blanco, Peru","Saguinus",40,40,3,11,542,41,2,0.15
"S. mystax","Quebrada Blanco, Peru","Saguinus",41,45,3,11,542,41,2,0.15
"S. niger","Caxiuanã, Brazil","Saguinus",35,35,5,7,,41,2,
"S. midas midas","French Guiana","Saguinus",31.1,42.5,,,523,41,2,0.16
"S. tripartitus","Tiputini, Ecuador","Saguinus",16,21,2,9,,41,2,
"Leontopithecus rosalia","Poço das Antas, Brazil","Leontopithecus",21.3,73,2,11,628,57,2,0.18
"Leontopithecus rosalia","Fazenda União, Brazil","Leontopithecus",65,229,2,11,628,57,2,0.18
"L. caissara","Superagüi, Brazil","Leontopithecus",125.5,300,4,7,,57,2,
"L. chrysomelas","Lemos Maia, Brazil","Leontopithecus",36,36,3,10,578,57,2,0.2
"L. chrysomelas","Una, Brazil","Leontopithecus",66,130.4,3,10,578,57,2,0.2
"L. chrysopygus","Morro do Diabo, Brazil","Leontopithecus",113,199,2,7,615,57,2,0.19
"L. chrysopygus","Caetetus, Brazil","Leontopithecus",276.5,394,2,7,615,57,2,0.19
PKv|t|)
#(Intercept) -63.07885 34.76686 -1.814 0.08075 .
#Body.Size 0.27903 0.07748 3.601 0.00126 **
# ---
# Signif. codes: 0 ‚Äò***‚Äô 0.001 ‚Äò**‚Äô 0.01 ‚Äò*‚Äô 0.05 ‚Äò.‚Äô 0.1 ‚Äò ‚Äô 1
#
#Residual standard error: 58.08 on 27 degrees of freedom
#(3 observations deleted due to missingness)
#Multiple R-squared: 0.3245, Adjusted R-squared: 0.2995
#F-statistic: 12.97 on 1 and 27 DF, p-value: 0.001258
#plot line on scatterplot
coef(lm(mean_HR ~ Body.Size, data))
ggplot(data, aes(Body.Size, mean_HR, color=Lineage)) + geom_point(size=4) + geom_abline(intercept = -63, slope = .28) +
xlab("Body Size (gr)") +
ylab("Median Home Range (ha)")
# ********** Figure 1-Inset end **********
## NOTE: Below, start checking alternate ways of looking at HR size/body size relationships,
## none used in manuscript
#Does using minimum home range affect relationship?
summary(lm(Home.Range.Min ~ Body.Size, data))
##Coefficients:
#Estimate Std. Error t value Pr(>|t|)
#(Intercept) -39.39002 29.68780 -1.327 0.19568
#Body.Size 0.19140 0.06616 2.893 0.00746 **
# ---
# Signif. codes: 0 ‚Äò***‚Äô 0.001 ‚Äò**‚Äô 0.01 ‚Äò*‚Äô 0.05 ‚Äò.‚Äô 0.1 ‚Äò ‚Äô 1
#
#Residual standard error: 49.6 on 27 degrees of freedom
#(3 observations deleted due to missingness)
#Multiple R-squared: 0.2366, Adjusted R-squared: 0.2083
#F-statistic: 8.369 on 1 and 27 DF, p-value: 0.007457
#Using min home range results in less variance explained, but relationship still there and significant
ggplot(data, aes(Body.Size, Home.Range.Min, color=Lineage)) + geom_point() + geom_abline(intercept = -39.4, slope = .19)
#Does using median home range size *per group member* affect the relationship?
summary(lm(mean_HR/mean_group ~ Body.Size, data))
#Call:
# lm(formula = mean_HR/mean_group ~ Body.Size, data = data)
#
#Residuals:
# Min 1Q Median 3Q Max
#-13.667 -7.814 -2.611 1.057 54.296
#
#Coefficients:
# Estimate Std. Error t value Pr(>|t|)
#(Intercept) -13.71670 8.08288 -1.697 0.10211
#Body.Size 0.05516 0.01814 3.041 0.00547 **
# ---
# Signif. codes: 0 ‚Äò***‚Äô 0.001 ‚Äò**‚Äô 0.01 ‚Äò*‚Äô 0.05 ‚Äò.‚Äô 0.1 ‚Äò ‚Äô 1
#Residual standard error: 13.47 on 25 degrees of freedom
#(5 observations deleted due to missingness)
#Multiple R-squared: 0.2701, Adjusted R-squared: 0.2409
#F-statistic: 9.249 on 1 and 25 DF, p-value: 0.005467
summary(lm(Home.Range.Min/mean_group ~ Body.Size, data))
#Does using *minimum* home range size *per group member* affect the relationship?
###Coefficients:
#Estimate Std. Error t value Pr(>|t|)
#(Intercept) -9.19157 6.83192 -1.345 0.191
#Body.Size 0.03918 0.01533 2.556 0.017 *
# ---
# Signif. codes: 0 ‚Äò***‚Äô 0.001 ‚Äò**‚Äô 0.01 ‚Äò*‚Äô 0.05 ‚Äò.‚Äô 0.1 ‚Äò ‚Äô 1
#Residual standard error: 11.38 on 25 degrees of freedom
#(5 observations deleted due to missingness)
#Multiple R-squared: 0.2072, Adjusted R-squared: 0.1755
#F-statistic: 6.533 on 1 and 25 DF, p-value: 0.01705
#Using minimum home range size *per group member* results in less variance explained, but relationship still there
ggplot(data, aes(Body.Size, Home.Range.Min/mean_group, color=Lineage)) + geom_point() + geom_abline(intercept = -9.19, slope = .04)
## NOTE: End checking alternate ways of looking at HR size/body size relationships,
## none used in manuscript
# ********** Figure 1: Not created in R. Used image illustration program (Apple Pages) to do
# "by hand". Below are calculations **********
#Heptagons for relative home range size
#Start with largest heptagon 4.17 inches for Leontopitecus. Scale other max HR for species according to
#largest. Then scale each one internally
#Leontopithecus
(147.4786/394.00)*4.17
#[1] 1.560878
(21.3/394.00)*4.17
#[1] 0.225434
#Callimico
(150/394.00)*4.17 #max relative to Leontopithecus max
#[1] 1.587563
(30/150)*1.587563
#[1] 0.3175126
(68.7500/150)*1.587563
#[1] 0.727633
#Saguinus
(149/394.00)*4.17
#[1] 1.57698
(16/149)*1.57698
#[1] 0.1693401
(53.6300/149)*1.57698
#[1] 0.567607
#Mico
(35/394.00)*4.17
#[1] 0.3704315
(23.7/35)*0.3704315
#[1] 0.250835
(4/35)*0.3704315
[1] 0.04233503
#Callithrix
(35.5/394.00)*4.17
#[1] 0.3757234
(0.70/35.5)*0.3757234
#[1] 0.00740863
(13.8175/35.5)*0.3757234
#[1] 0.1462411
#Cebuella
(1.09/394.00)*4.17
#[1] 0.01153629
(0.5225/1.09)*0.01153629
#[1] 0.005530011
(0.10/1.09)*0.01153629
#[1] 0.001058375
# ********** Figure 1: END**********
#Calculate Ecophysiological Cost
#Just neonate litter: adult weight
ecophys_cost <- (mean_HR)*Litter.Neonate.Adult.Ratio
#Neonate litter: adult weight times minimum home range per group member
ecophys_cost_minHR_group <- (Home.Range.Min/mean_group)*Litter.Neonate.Adult.Ratio
#Neonate litter: adult weight times minimum home range per group member
ecophys_cost_group <- (mean_HR/mean_group)*Litter.Neonate.Adult.Ratio
#add ecophys measures to data frame
data <- cbind(data, ecophys_cost)
data <- cbind(data, ecophys_cost_group)
data <- cbind(data, ecophys_cost_minHR_group)
#Make data frames calculating mean ecophys cost per lineage
df_ecophys_cost <- aggregate(ecophys_cost, list(Lineage), mean, na.rm = TRUE)
df_ecophys_cost_group <- aggregate(ecophys_cost_group, list(Lineage), mean, na.rm = TRUE)
df_ecophys_cost_minHR_group <- aggregate(ecophys_cost_minHR_group, list(Lineage), mean, na.rm = TRUE)
#Graph
ggplot(df_ecophys_cost, aes(Group.1, x)) + geom_bar(stat="identity")
ggplot(df_ecophys_cost_group, aes(Group.1, x)) + geom_bar(stat="identity")
ggplot(df_ecophys_cost_minHR_group, aes(Group.1, x)) + geom_bar(stat="identity")
# **********Physiological Cost Panel in Figure 2 **********
#Graph only physiological cost, no travel costs (captivity)
df_phys_cost <- aggregate(Litter.Neonate.Adult.Ratio, list(Lineage), mean, na.rm = TRUE)
ggplot(df_phys_cost, aes(Group.1, x)) + geom_bar(stat="identity") +
xlab("Callitrichine Lineage") +
ylab("Neonate:Adult Mass Ratio")
# **********Ecological Costs Panel in Figure 2 **********
#Graph only ecological costs
df_ecol_cost <- aggregate(mean_HR, list(Lineage), mean, na.rm = TRUE)
ggplot(df_ecol_cost, aes(Group.1, x)) + geom_bar(stat="identity") +
xlab("Callitrichine Lineage") +
ylab("Median Home Range (ha)")
#Graph only ecological costs using minimum home range per individual
df_ecol_cost_min_group <- aggregate(Home.Range.Min/mean_group, list(Lineage), mean, na.rm = TRUE)
ggplot(df_ecol_cost_min_group, aes(Group.1, x)) + geom_bar(stat="identity")
#similar to ecol. alone, except that Callimico now lower than Leontocebus and Saguinus
#Interestingly it is perfect mirror of any way of calculating ecophysiological costs "df_ecophys_costs..."
#Summarize Ecophys costs by lineage, w/ mean, min, max and std error
#SEM function that handles NA's
sem <- function(x) {
n = sum(x,na.rm=T)/mean(x,na.rm=T)
sqrt(var(x,na.rm=T)/n)
}
#Calculate SEM
SE <- aggregate(ecophys_cost, list(Lineage), sem)
#Calculate means, max, min
means <- aggregate(ecophys_cost, list(Lineage), mean, na.rm = TRUE)
min <- aggregate(ecophys_cost, list(Lineage), min, na.rm = TRUE)
max <- aggregate(ecophys_cost, list(Lineage), max, na.rm = TRUE)
#Make Data Frame for graphing
summary_ecophys_cost_df <- data.frame(means$Group.1, means$x, SE$x, min$x, max$x)
colnames(summary_ecophys_cost_df) <- c("Lineages", "Means", "SE", "Min", "Max")
# **********Ecophysiological Costs of Infant Rearing Panel in Figure 2 **********
# **********Note: added the yello star in final graph "by hand" for L. rosalia in Poço das Antas alone
# based on calculated ecophysiological cost of 8.48. **********
#Graph!
ggplot(summary_ecophys_cost_df, aes(x=summary_ecophys_cost_df$Lineage, y=Means, fill=summary_ecophys_cost_df$Lineage)) +
geom_bar(position=position_dodge(), stat="identity", colour="black", size=.3) +
geom_pointrange(aes(ymin=Min, ymax=Max)) +
theme(legend.position="none") +
scale_color_gradient() +
xlab("Callitrichine Lineage") +
ylab("Ecophysiological Costs (Home Range * Neonate:Adult Mass)")
# ********** Calculating the amount of variance that home range explains in ecophys calculation,
# per reviewer request April 9, 2015 **********
ggplot(data, aes(Body.Size, Home.Range.Min, color=Lineage)) + geom_point() + geom_abline(intercept = -39.4, slope = .19)
#remind yourself what these data frames look like
df_ecophys_cost
df_ecophys_cost$x
df_ecol_cost
#Create a new data frame with both for easier graphing in ggplot
df_ecol_ecophys_costs <- cbind(df_ecophys_cost, df_ecol_cost$x, df_phys_cost$x)
df_ecol_ecophys_costs
names(df_ecol_ecophys_costs) #names not pretty or practical
#Now make names of data frame columns redable
names(df_ecol_ecophys_costs) <- c("Lineage", "Ecophys", "Ecol", "Phys")
df_ecol_ecophys_costs
#Take a look at the relationship betwen Ecol Costs (home range) and EcoPhys costs
ggplot(df_ecol_ecophys_costs, aes(Ecol, Ecophys, color=Lineage)) + geom_point(size=4) +
xlab("Ecophysiological Costs (Home Range * Neonate:Adult Mass)") +
ylab("Home Range (ha)")
summary(lm(Ecol ~ Ecophys, df_ecol_ecophys_costs))
#So about 90% of the variance explained by Home Range Size
#Call:
# lm(formula = Ecol ~ Ecophys, data = df_ecol_ecophys_costs)
#Residuals:
# 1 2 3 4 5 6
#29.364 -4.640 -6.143 1.757 -3.426 -16.912
#Coefficients:
# Estimate Std. Error t value Pr(>|t|)
#(Intercept) 5.9308 9.9521 0.596 0.58330
#Ecophys 5.4069 0.8263 6.543 0.00282 **
# ---
# Signif. codes: 0 ‚Äò***‚Äô 0.001 ‚Äò**‚Äô 0.01 ‚Äò*‚Äô 0.05 ‚Äò.‚Äô 0.1 ‚Äò ‚Äô 1
#Residual standard error: 17.48 on 4 degrees of freedom
#Multiple R-squared: 0.9146, Adjusted R-squared: 0.8932
#F-statistic: 42.81 on 1 and 4 DF, p-value: 0.00282
#Take a look at the relationship betwen Phys Costs (Neonate:Adult Mass ratio) and EcoPhys costs
ggplot(df_ecol_ecophys_costs, aes(Phys, Ecophys, color=Lineage)) + geom_point(size=4) +
xlab("Ecophysiological Costs (Home Range * Neonate:Adult Mass)") +
ylab("Neonate:Adult Mass")
#Not a great linear relationship
summary(lm(Phys ~ Ecophys, df_ecol_ecophys_costs))
# Very low R-squared and not stat significant
#Call:
# lm(formula = Phys ~ Ecophys, data = df_ecol_ecophys_costs)
#Residuals:
# 1 2 3 4 5 6
#-0.09380 0.01729 0.07205 0.01968 -0.02536 0.01015
#Coefficients:
# Estimate Std. Error t value Pr(>|t|)
#(Intercept) 0.1880456 0.0353502 5.320 0.00601 **
# Ecophys -0.0006855 0.0029352 -0.234 0.82681
#---
# Signif. codes: 0 ‚Äò***‚Äô 0.001 ‚Äò**‚Äô 0.01 ‚Äò*‚Äô 0.05 ‚Äò.‚Äô 0.1 ‚Äò ‚Äô 1
#Residual standard error: 0.06209 on 4 degrees of freedom
#Multiple R-squared: 0.01345, Adjusted R-squared: -0.2332
#F-statistic: 0.05454 on 1 and 4 DF, p-value: 0.8268
PKU..PK-
/'ZQߟ @READMEUT:W_PK-
/'ZQv