Define Data

distributions normal poisson noZeroPoisson binary binomial uniform categorical gamma beta negBinomial nonrandom exponential mixture

Distributions for Data Definitions

defCondition()

Add single row to definitions table of conditions that will be used to add data to an existing definitions table

defData()

Add single row to definitions table

defDataAdd()

Add single row to definitions table that will be used to add data to an existing data.table

defRead()

Read external csv data set definitions

defReadAdd()

Read external csv data set definitions for adding columns

defReadCond()

Read external csv data set definitions for adding columns

defRepeat()

Add multiple (similar) rows to definitions table

defRepeatAdd()

Add multiple (similar) rows to definitions table that will be used to add data to an existing data.table

defSurv()

Add single row to survival definitions

updateDef()

Update definition table

updateDefAdd()

Update definition table

Generate Data

addColumns()

Add columns to existing data set

addCondition()

Add a single column to existing data set based on a condition

addDataDensity()

Add data from a density defined by a vector of integers

addMarkov()

Add Markov chain

addMultiFac()

Add multi-factorial data

addSynthetic()

Add synthetic data to existing data set

genData()

Calling function to simulate data

genDataDensity()

Generate data from a density defined by a vector of integers

genDummy()

Create dummy variables from a factor or integer variable

genFactor()

Create factor variable from an existing (non-double) variable

genFormula()

Generate a linear formula

genMarkov()

Generate Markov chain

genMultiFac()

Generate multi-factorial data

genOrdCat()

Generate ordinal categorical data

genSpline()

Generate spline curves

genSurv()

Generate survival data

genSynthetic()

Generate synthetic data

Missing Data

Define and generate different kinds of missingness.

defMiss()

Definitions for missing data

genMiss()

Generate missing data

genObs()

Create an observed data set that includes missing data

Group Data

Assign treatment groups and create longitudinal data.

addPeriods()

Create longitudinal/panel data

genCluster()

Simulate clustered data

genNthEvent()

Generate event data using longitudinal data, and restrict output to time until the nth event.

trtAssign()

Assign treatment

trtObserve()

Observed exposure or treatment

trtStepWedge()

Assign treatment for stepped-wedge design

Correlated Data

addCorData()

Add correlated data to existing data.table

addCorFlex()

Create multivariate (correlated) data - for general distributions

addCorGen()

Create multivariate (correlated) data - for general distributions

blockDecayMat()

Create a block correlation matrix

blockExchangeMat()

Create a block correlation matrix with exchangeable structure

genCorData()

Create correlated data

genCorFlex()

Create multivariate (correlated) data - for general distributions

genCorGen()

Create multivariate (correlated) data - for general distributions

genCorMat()

Create a correlation matrix

genOrdCat()

Generate ordinal categorical data

Splines

Use splines to define and generate data.

genSpline()

Generate spline curves

viewBasis()

Plot basis spline functions

viewSplines()

Plot spline curves

Utility

addCompRisk()

Generating single competing risk survival variable

betaGetShapes()

Convert beta mean and precision parameters to two shape parameters

delColumns()

Delete columns from existing data set

gammaGetShapeRate()

Convert gamma mean and dispersion parameters to shape and rate parameters

genCatFormula()

Generate Categorical Formula

genMixFormula()

Generate Mixture Formula

iccRE()

Generate variance for random effects that produce desired intra-class coefficients (ICCs) for clustered data.

logisticCoefs()

Determine intercept, treatment/exposure and covariate coefficients that can be used for binary data generation with a logit link and a set of covariates

mergeData()

Merge two data tables

negbinomGetSizeProb()

Convert negative binomial mean and dispersion parameters to size and prob parameters

survGetParams()

Get survival curve parameters

survParamPlot()

Plot survival curves

trimData()

Trim longitudinal data file once an event has occurred

updateDef()

Update definition table

updateDefAdd()

Update definition table

viewBasis()

Plot basis spline functions

viewSplines()

Plot spline curves

Deprecated & Defunct

simstudy-deprecated

Deprecated functions in simstudy