Skip to content

Repository files navigation

shinySim

License: MIT

shinySim is a point-and-click interface to the squidSim package. It lets you build structured simulations — hierarchical data structures, predictors, and variance components across levels — without writing the simulation call by hand.

Features

  • Build a data structure interactively. Define nested and crossed levels, sample sizes, and repeat observations, or pass in a structure you already have.
  • Set variance components per level. Specify predictors, betas, and (co)variances for each grouping factor.
  • See the equations as you go. The app writes out the model being simulated, so what you are building stays legible.
  • Inspect simulated variances. Check that the realised variance components match what you asked for before you commit to a design.
  • Get the code back. The equivalent squidSim call is returned alongside the data, so simulations remain reproducible outside the app.
  • Runs locally. Nothing is uploaded anywhere.

Installation

shinySim is not on CRAN, but you can install the development version from GitHub using the devtools package:

install.packages("devtools")
devtools::install_github("squidgroup/shinySim")
library(shinySim)

This will also install squidSim, which is not on CRAN and is declared via Remotes:.

Usage

The only function is shinySim(). It can be run without any arguments:

library(shinySim)
shinySim()

Or you can provide a data structure created in squidSim (or elsewhere):

library(shinySim)

data_test <- squidSim::make_structure(
  "sex(2)/individual(10)",
  repeat_obs  = 2,
  level_names = list(sex = c("F", "M"))
)

shinySim(data.struc = data_test)

Arguments

Argument Purpose
data.struc A data structure created with squidSim::make_structure() or an equivalent data frame. Optional — leave empty to build one in the app.

Bug reports and contributions

Please file issues and feature requests at https://github.com/squidgroup/shinySim/issues. Pull requests are welcome.

Issues with the underlying simulation engine belong upstream at squidgroup/squidSim.

Related

  • squidSim — the simulation engine this app drives
  • SQuID — the Statistical Quantification of Individual Differences group

Citation

Please cite the package:

Ivimey-Cook, E. R., & Pick, J. L. (2026). shinySim: Shiny interface to the squidSim simulation package. R package version 0.0.0.9000. https://github.com/squidgroup/shinySim

A machine-readable CITATION.cff is included, so GitHub's "Cite this repository" button gives formatted APA and BibTeX.

Contact

Edward R. Ivimey-Cook — e.ivimeycook@gmail.comORCID 0000-0003-4910-0443

License

Released under the MIT License.

About

A Shiny interface to squidSim package

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages