Define Data

distributions

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

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

addMarkov()

Add Markov chain

addMultiFac()

Add multi-factorial data

genData()

Calling function to simulate data

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

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

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

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.

mergeData()

Merge two data tables

negbinomGetSizeProb()

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

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