Run “all_analysis.R” first to display results/figures

1. Social hierarchies

Observation hours/days

# number of days of observation
day
[1] 21 21 22 23 24 23 24 18
day%>%summary()
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  18.00   21.00   22.50   22.00   23.25   24.00 
# number of observation hours
hours
hours%>%
  ungroup() %>%
  .$totalobs %>%
  sum
[1] 311
#total contests
alldata %>% 
  filter(Actor!="Start" & Actor!="End") %>%
  nrow()
[1] 6953
#total hours PER day
alldata %>%
  filter(Actor=="End") %>% 
  group_by(cohort) %>% 
  top_n(1,uniqueobs) %>% 
  as.data.frame() %>%
  summarise(ave_total_obs_hour=mean(uniqueobs/day))

Landau’s h, Triangle transitivity

summary(unlist(sapply(cohort_devries, "[", 1)))
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.5835  0.7404  0.8147  0.7968  0.8934  0.9266 
unlist(sapply(cohort_devries, "[", 2))
A.p-value B.p-value C.p-value D.p-value E.p-value F.p-value G.p-value H.p-value 
   0.0000    0.0000    0.0000    0.0000    0.0000    0.0028    0.0000    0.0000 
summary(unlist(sapply(cohort_ttritest, "[", 2)))
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.6627  0.8510  0.8991  0.8781  0.9364  1.0000 
unlist(sapply(cohort_ttritest, "[", 3))
A.pval B.pval C.pval D.pval E.pval F.pval G.pval H.pval 
     0      0      0      0      0      0      0      0 
summary(unlist(sapply(cohort_dctest, "[", 7)))
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.8445  0.8453  0.8774  0.8806  0.8962  0.9421 
unlist(sapply(cohort_dctest, "[", 1))
A.DC.pvalue B.DC.pvalue C.DC.pvalue D.DC.pvalue E.DC.pvalue F.DC.pvalue G.DC.pvalue H.DC.pvalue 
      1e-04       1e-04       1e-04       1e-04       1e-04       1e-04       1e-04       1e-04 

Despotism

summary(despot$despotism)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  36.23   37.95   42.42   47.32   52.02   67.92 

Glicko plot

body weight ~ rank

Spearman’s rank test then corrected for multiple comparison

p.adjust(bw.pval,method="BH") #all p>0.68
  p.value   p.value   p.value   p.value   p.value   p.value 
0.6561292 0.6561292 0.6561292 0.6561292 0.6561292 0.6561292 

02. Analysis of OTR and V1aR density

optical density~social status+(1|cohort)+(1|Film)

est[,1:3]

Figure 1.OTR density by social status groups in six brain regions analyzed.

Figure 1a: representative figures with a label to each brain region Figure 1b: raw data points & boxplots (with one y axis) Figure 1c: Bayesian stat result; mean estimate and 95% CI, posterior sentity plots from group comparisons with point range plot right underneath

print(fig1b)

print(fig1c)

Figure 2. V1aR density by social status groups in six brain regions analyzed.

print(fig2b)

print(fig2c)

LS0tDQp0aXRsZTogU29jaWFsIHN0YXR1cyBpbiBtb3VzZSBzb2NpYWwgaGllcmFyY2h5IGlzIGFzc29jaWF0ZWQgd2l0aCBveHl0b2NpbiBhbmQgdmFzb3ByZXNzaW4NCiAgMWEgcmVjZXB0b3IgZGVuc2l0eQ0Kb3V0cHV0Og0KICBodG1sX25vdGVib29rOiBkZWZhdWx0DQogIGh0bWxfZG9jdW1lbnQ6DQogICAgZGZfcHJpbnQ6IHBhZ2VkDQogIHBkZl9kb2N1bWVudDogZGVmYXVsdA0KLS0tDQoNClJ1biAiYWxsX2FuYWx5c2lzLlIiIGZpcnN0IHRvIGRpc3BsYXkgcmVzdWx0cy9maWd1cmVzDQoNCiMjIDEuIFNvY2lhbCBoaWVyYXJjaGllcw0KIyMjIE9ic2VydmF0aW9uIGhvdXJzL2RheXMNCmBgYHtyfQ0KIyBudW1iZXIgb2YgZGF5cyBvZiBvYnNlcnZhdGlvbg0KZGF5DQpkYXklPiVzdW1tYXJ5KCkNCg0KIyBudW1iZXIgb2Ygb2JzZXJ2YXRpb24gaG91cnMNCmhvdXJzDQpob3VycyU+JQ0KICB1bmdyb3VwKCkgJT4lDQogIC4kdG90YWxvYnMgJT4lDQogIHN1bQ0KDQojdG90YWwgY29udGVzdHMNCmFsbGRhdGEgJT4lIA0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