Package: simstudy 0.8.1.9000

simstudy: Simulation of Study Data

Simulates data sets in order to explore modeling techniques or better understand data generating processes. The user specifies a set of relationships between covariates, and generates data based on these specifications. The final data sets can represent data from randomized control trials, repeated measure (longitudinal) designs, and cluster randomized trials. Missingness can be generated using various mechanisms (MCAR, MAR, NMAR).

Authors:Keith Goldfeld [aut, cre], Jacob Wujciak-Jens [aut]

simstudy_0.8.1.9000.tar.gz
simstudy_0.8.1.9000.zip(r-4.5)simstudy_0.8.1.9000.zip(r-4.4)simstudy_0.8.1.9000.zip(r-4.3)
simstudy_0.8.1.9000.tgz(r-4.4-x86_64)simstudy_0.8.1.9000.tgz(r-4.4-arm64)simstudy_0.8.1.9000.tgz(r-4.3-x86_64)simstudy_0.8.1.9000.tgz(r-4.3-arm64)
simstudy_0.8.1.9000.tar.gz(r-4.5-noble)simstudy_0.8.1.9000.tar.gz(r-4.4-noble)
simstudy_0.8.1.9000.tgz(r-4.4-emscripten)simstudy_0.8.1.9000.tgz(r-4.3-emscripten)
simstudy.pdf |simstudy.html
simstudy/json (API)

# Install 'simstudy' in R:
install.packages('simstudy', repos = c('https://kgoldfeld.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/kgoldfeld/simstudy/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

data-generationdata-simulationsimulationstatistical-models

10.98 score 80 stars 1 packages 948 scripts 1.3k downloads 1 mentions 63 exports 13 dependencies

Last updated 4 months agofrom:df880328cb. Checks:OK: 5 NOTE: 3 ERROR: 1. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 27 2024
R-4.5-win-x86_64ERROROct 27 2024
R-4.5-linux-x86_64OKOct 27 2024
R-4.4-win-x86_64OKOct 27 2024
R-4.4-mac-x86_64OKOct 27 2024
R-4.4-mac-aarch64OKOct 27 2024
R-4.3-win-x86_64NOTEOct 27 2024
R-4.3-mac-x86_64NOTEOct 27 2024
R-4.3-mac-aarch64NOTEOct 27 2024

Exports:addColumnsaddCompRiskaddConditionaddCorDataaddCorFlexaddCorGenaddDataDensityaddMarkovaddMultiFacaddPeriodsaddSyntheticbetaGetShapesblockDecayMatblockExchangeMatcatProbsdefConditiondefDatadefDataAdddefMissdefReaddefReadAdddefReadConddefRepeatdefRepeatAdddefSurvdelColumnsgammaGetShapeRategenCatFormulagenClustergenCorDatagenCorFlexgenCorGengenCorMatgenCorOrdCatgenDatagenDataDensitygenDummygenFactorgenFormulagenMarkovgenMissgenMixFormulagenMultiFacgenNthEventgenObsgenOrdCatgenSplinegenSurvgenSyntheticiccRElogisticCoefsmergeDatanegbinomGetSizeProbsurvGetParamssurvParamPlottrimDatatrtAssigntrtObservetrtStepWedgeupdateDefupdateDefAddviewBasisviewSplines

Dependencies:backportsBHbigmemorybigmemory.sridata.tablefastglmgluemvnfastpbvRcppRcppArmadilloRcppEigenuuid

Clustered Data

Rendered fromclustered.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Correlated Data

Rendered fromcorrelated.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Correlation Matrices

Rendered fromcorelationmat.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2023-02-16

Customized Distributions

Rendered fromcustomdist.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2024-05-13
Started: 2024-05-13

Dynamic Data Definition

Rendered fromdouble_dot_extension.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-10-05

Longitudinal Data

Rendered fromlongitudinal.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Missing Data

Rendered frommissing.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Ordinal Categorical Data

Rendered fromordinal.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Simulating Study Data

Rendered fromsimstudy.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2024-06-29
Started: 2016-02-05

Spline Data

Rendered fromspline.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Survival Data

Rendered fromsurvival.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Targeted logistic model coefficients

Rendered fromlogisticCoefs.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2024-07-29
Started: 2023-06-16

Treatment and Exposure

Rendered fromtreat_and_exposure.Rmdusingknitr::rmarkdownon Oct 27 2024.

Last update: 2023-11-23
Started: 2020-09-25

Readme and manuals

Help Manual

Help pageTopics
Add columns to existing data setaddColumns
Generating single competing risk survival variableaddCompRisk
Add a single column to existing data set based on a conditionaddCondition
Add correlated data to existing data.tableaddCorData
Create multivariate (correlated) data - for general distributionsaddCorFlex
Create multivariate (correlated) data - for general distributionsaddCorGen
Add data from a density defined by a vector of integersaddDataDensity
Add Markov chainaddMarkov
Add multi-factorial dataaddMultiFac
Create longitudinal/panel dataaddPeriods
Add synthetic data to existing data setaddSynthetic
Convert beta mean and precision parameters to two shape parametersbetaGetShapes
Create a block correlation matrixblockDecayMat
Create a block correlation matrix with exchangeable structureblockExchangeMat
Add single row to definitions table of conditions that will be used to add data to an existing definitions tabledefCondition
Add single row to definitions tabledefData
Add single row to definitions table that will be used to add data to an existing data.tabledefDataAdd
Definitions for missing datadefMiss
Read external csv data set definitionsdefRead
Read external csv data set definitions for adding columnsdefReadAdd
Read external csv data set definitions for adding columnsdefReadCond
Add multiple (similar) rows to definitions tabledefRepeat
Add multiple (similar) rows to definitions table that will be used to add data to an existing data.tabledefRepeatAdd
Add single row to survival definitionsdefSurv
Delete columns from existing data setdelColumns
Distributions for Data Definitionsbeta binary binomial categorical distributions exponential gamma mixture negBinomial nonrandom normal noZeroPoisson poisson uniform
Convert gamma mean and dispersion parameters to shape and rate parametersgammaGetShapeRate
Generate Categorical FormulagenCatFormula
Simulate clustered datagenCluster
Create correlated datagenCorData
Create multivariate (correlated) data - for general distributionsgenCorFlex
Create multivariate (correlated) data - for general distributionsgenCorGen
Create a correlation matrixgenCorMat
Calling function to simulate datagenData
Generate data from a density defined by a vector of integersgenDataDensity
Create dummy variables from a factor or integer variablegenDummy
Create factor variable from an existing (non-double) variablegenFactor
Generate a linear formulagenFormula
Generate Markov chaingenMarkov
Generate missing datagenMiss
Generate Mixture FormulagenMixFormula
Generate multi-factorial datagenMultiFac
Generate event data using longitudinal data, and restrict output to time until the nth event.genNthEvent
Create an observed data set that includes missing datagenObs
Generate ordinal categorical datagenOrdCat
Generate spline curvesgenSpline
Generate survival datagenSurv
Generate synthetic datagenSynthetic
Generate variance for random effects that produce desired intra-class coefficients (ICCs) for clustered data.iccRE
Determine intercept, treatment/exposure and covariate coefficients that can be used for binary data generation with a logit link and a set of covariateslogisticCoefs
Merge two data tablesmergeData
Convert negative binomial mean and dispersion parameters to size and prob parametersnegbinomGetSizeProb
Deprecated functions in simstudysimstudy-deprecated
Get survival curve parameterssurvGetParams
Plot survival curvessurvParamPlot
Trim longitudinal data file once an event has occurredtrimData
Assign treatmenttrtAssign
Observed exposure or treatmenttrtObserve
Assign treatment for stepped-wedge designtrtStepWedge
Update definition tableupdateDef
Update definition tableupdateDefAdd
Plot basis spline functionsviewBasis
Plot spline curvesviewSplines