This R script performs statistical analyses of focal observation data on young children in the !Xun and Baka hunter-gatherer societies. The analyses employ generalized additive mixed models (GAMMs) using the gamm4 package to examine the effects of age and ethnic group. The script defines response variables—maternal child-holding, maternal breastfeeding, allomaternal child-holding, young allomaternal child-holding, and focal children’s participation in mixed-age peer groups—and evaluates model fits using likelihood ratio tests. A binomial distribution with a logit-link function is specified, including random intercept effects for focal child ID and observation ID.