socialSim: Simulate and Analyse Social Interaction Data

Provides tools to simulate and analyse datasets of social interactions between individuals using hierarchical Bayesian models implemented in Stan. The package interacts with Stan via 'cmdstanr' (available from <https://mc-stan.org/r-packages/>) or 'rstan', depending on user setup. Users can generate realistic interaction data where individual phenotypes influence and respond to those of their partners, with control over sampling design parameters such as the number of individuals, partners, and repeated dyads. The simulation framework allows flexible control over variation and correlation in mean trait values, social responsiveness, and social impact, making it suitable for research on interacting phenotypes and on direct and indirect genetic effects ('DGEs' and 'IGEs'). The package also includes functions to fit and compare alternative models of social effects, including impact–responsiveness, variance–partitioning, and trait-based models, and to summarise model performance in terms of bias and dispersion. For more details on the study of social interactions and impact-responsiveness, see Moore et al. (1997) <doi:10.1111/j.1558-5646.1997.tb01458.x> and de Groot et al. (2022) <doi:10.1016/j.neubiorev.2022.104996>.

Version: 0.1.6
Depends: R (≥ 4.2)
Imports: MASS, stats, future, future.apply
Suggests: rstan, cmdstanr, devtools, testthat, rmarkdown, knitr
Published: 2025-10-30
DOI: 10.32614/CRAN.package.socialSim (may not be active yet)
Author: Rori Efrain Wijnhorst ORCID iD [aut, cre]
Maintainer: Rori Efrain Wijnhorst <roriwijnhorst at gmail.com>
BugReports: https://github.com/RoriWijnhorst/socialSim/issues
License: MIT + file LICENSE
URL: https://github.com/RoriWijnhorst/socialSim
NeedsCompilation: no
Additional_repositories: https://stan-dev.r-universe.dev
Language: en-GB
Materials: README, NEWS
CRAN checks: socialSim results

Documentation:

Reference manual: socialSim.html , socialSim.pdf
Vignettes: Getting started with socialSim (source, R code)

Downloads:

Package source: socialSim_0.1.6.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): socialSim_0.1.6.tgz, r-oldrel (arm64): socialSim_0.1.6.tgz, r-release (x86_64): socialSim_0.1.6.tgz, r-oldrel (x86_64): socialSim_0.1.6.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=socialSim to link to this page.