Discrete-time Dynamic Micro-simulation Framework for R

add_trailing_slash | Adds a trailing slash, if required, to character vector |

adjustCatVar | Adjust categorical values to desired proportions in... |

adjustCatVarCalib | Adjust categorical values to desired proportions in... |

adjustCatVarSimple | Adjust categorical values to desired proportions in... |

adjustContVar | Adjust continuous values to desired proportions in... |

adjustContVarCalib | Adjust continuous values to desired proportions in... |

adjustContVarSimple | Adjust continuous values to desired proportions in... |

adjust.proportions | A wrapper for modifyProps. Subsets by the logiset call the... |

align.by.name.list.mx | Align a list of matrices/vectors by row and column name, so... |

append.list.mx | Append two lists of matrices by adding each element of... |

append.lists | Append the elements of list.src into the corresponding... |

applyAllCatAdjustmentsToSimframe | Apply categorical adjustments to simframe. |

applyCatAdjustmentToSimframe | Apply categorical adjustments to simframe. |

applyCatAdjustmentToSimframeVarMultipleBinary | Adjust the proportions of a simframe variable that exists in... |

applyCatAdjustmentToSimframeVarSingle | Adjust the proportions of a single simframe variable. |

applyContAdjustmentToSimframe | Apply continuous adjustments to simframe. |

as.arrayFromList | convert list of vectors to an array. Recycling rule will be... |

as_array_list_mx | Convert a list of matrices into an array, with each matrix in... |

as.csv.string | Produces a csv string from x, returned as a length 1 chr... |

as.csv.string.list | Apply to a list using the names from the list |

as_data_frame_list_as_is | Convert list to dataframe simply by setting class attr This... |

as.matrixFromList | Converts a list of same length vectors to a matrix. Unlike... |

assert | Stops and displays indices of any element that is FALSE. |

assign_values | Assign the values of variables (specifed by name in a source... |

bin | Divides x into bins specified by breaks or a bin size |

binary.levels.combine | Combine levels specified in seperate binary level variables... |

binary.levels.split | Create a list of binary levels from factors. Compares a... |

change.cat | Change values in a categorical vector to a lower or higher... |

checkModelVars | Checks that the variables used in all of the models exist in... |

checkNAs | Check a list for any NAs, producing error if they exist,... |

checkOutcomeVars | Checks that the outcome variables have a source variable in... |

check.subgroup.expr | Check number of valid subgroup while applying cat.adjustment |

c_list | Select inner elements of a list of lists, and return as a new... |

cmatch | Return the category names for a vector of coded values. If no... |

cmatchFlattened | Returns the category names for the vector of flattened codes. |

cnamesLookup | Returns the names of the codings for the supplied variables.... |

COL | COL constant = 2. |

combine.and.reorder | Combines and reorders (so correct original order) after... |

copyMeta.list | copy names of dimensions and meta attributes from elements of... |

create2CategoryPropensityArray | Create a propensity array from a dataframe, for a variable... |

createAdjustmentMatrices | Categorical adjusment |

createAdjustmentMatrix | Creates an empty adjustment matrix of NAs. An adjustment... |

createAgeRange | Create the descriptions of the dictionary object. Called by... |

createCodings | Create the codings of the dictionary object. Called by new(). |

createDescriptions | Create the descriptions of the dictionary object. Called by... |

createDict | Create a dictionary object. |

createEmptyCatAdjustments | Create empty categorical variable adjustment matrices. |

createGLM | Create a generalized linear model from a model dataframe that... |

createOutcomeMatrices | Create a list of empty outcome matrix variables for a... |

createOutputMatrix | Create a matrix of NA with specified col/row names/lengths. |

createSimenv | Create new simenv object Simenv object - a simulation... |

createSimmodule | Creates a Simulation module object. |

createSingleIterationPropensityArray | Create a propensity array from a dataframe, for only a single... |

detachReturn | Detach an environment and return it. NB: the returned... |

dimnames_prepend_header | Push row/col headers (ie: names of the rownames and colnames)... |

dlookup | Lookup description of variable x in the dictionary first... |

dlookup_exists | A version of dlookup that can be use to see if a given... |

err | Calc the 95% error from the t Distribution. |

eval.list | Evaluate a list/vector of strings as expressions. Errors if... |

evaluateLogisetExprAttribute | Evaluate logiset expression attribute for the variable. |

file_extension | Returns the file extension, i.e: everything after the final... |

flatten_mxlists_to_array | Convert a list of lists of matrices to an array, as follows:... |

flatten_mxs_to_single_mx | Takes a list of matrices, flattens them into a single row,... |

flatten_mx_to_row | Flatten a vector or matrix (r,c) into a single row matrix... |

getOutcomeVars | Get a set of outcome variables from the simframe. |

global | Save x into global variable as it's own name. |

globalNamed | Save x into global variable, ie: top frame, not just this... |

incByFactor | Increments x by factor |

is.alpha.only | TRUE for elements that only contain alpha characters, ie:... |

is_level_var | Check if each element of a character vector has the trailing... |

isListOfNulls | True if all list members are NULL |

is.model.var | Checks which models, in a list of models, contain a specified... |

is_numeric_scalar | Returns whether x is a scalar (i.e. length 1) and numeric. |

labelColFromVec | set the columns names of each x in xlist to each char vector... |

labelCols.list | Set the colnames on each object in a list. By default will... |

labelColTitleFromList | names each object's column title with the object's name in... |

labelTitle | names the "along" dimension with "title" eg: labelTitle(y,... |

lapply.args.as.list | Call lapply with a list of arguments to FUN specified as the... |

lapply.inner | Apply a function to the inner element of a list of lists. |

lapply.subset | Executes .FUN on the specified varnames in X and return the... |

lapply.subset.append | Execute a function over a subset of a list, and merges the... |

lapply.subset.append.lol.args | Apply lapply.subset.append to each element of lol, using the... |

loadGLMCSV | Load and create a GLM from a csv file. See 'createGLM' for... |

loadMergedFile | Loads and merges a CSV/XLS file with the supplied values... |

loadSimFrame | Creates a simulation frame. A simulation frame is the set of... |

lzip | Takes a list of lists, and combines the corresponding... |

lzipper | Takes a list of lists, and applies a function to the... |

mem.lx | Return amount of memory, in bytes, used by each element of a... |

mergeAndRemoveKeyColumn | Merges (ie: join) on a key column and returns merged rows,... |

merge_list_mx.by.cols | Takes any number of 2D matrices, each with the same number of... |

merge_list_mx.by.rows | Takes any number of 2D matrices, each with the same number of... |

meta.add | Add a meta attribute. Appends to existing meta attribute, if... |

meta.add.list.varname | Appends a "varname" meta element to the meta of each element... |

model_coefs_names_unique | Get the unique set of names of model coefs for the supplied... |

modelVariableCoefs | Return the coefficients used in the supplied model. |

modelVariableNames | Return the variables used in the supplied terms. Removes... |

modifyProps | Change the default simulated values to proportions requested... |

modifyPropsAsBinLevels | Takes a categorical var specified in separate binary level... |

modifyPropsContinuous | Runs modifyProps on a continuous variable Takes a continuous... |

modifypropsVarSingle_on_subset | Calls modifyProps on a subset, returning the whole vector,... |

namedList | Create a named list of NULL elements. |

namedMatrix | Create a matrix of NA with specified col/row names/lengths. |

nsort | Sort numerically. If x can be represented numerically, then... |

order_by_dlookup | Order the list by the results returned applying dlookup to... |

predictOrdinal | Calculates the predicted probabilities (from an ordinal... |

predictSimario | Predict. Looks in envir for variables specified by model,... |

predLogistic | Predict probabilities from the coefficients of a logistic... |

predMultinomial | Predict probabilities from the coefficients of a multinomial... |

predSimBin | Predict and simulate binary value from logistic model |

predSimBinom | Predict and simulate binary value from binomial distribution... |

predSimBinomJoint | Predict and simulate binary value from binomial distribution... |

predSimBinomsSelect | Predict and simulate binary value from 2 binomial models. |

predSimBinomsSelect3Models_notChangeScores | Predict and simulate binary value from 3 binomial models. |

predSimBinomsSelect_notChangeScores | Predict and simulate binary value from 2 binomial models. |

predSimModSelect | Predict and simulate value from n models. |

predSimMultinomial | Predict and simulate value from a multinomial model... |

predSimNBinom | Predict and simulate continuous value from negative binomial... |

predSimNBinomsSelect | Predict and simulate value from n negative binomial models.... |

predSimNBinomsSelect3Models | Predict and simulate value from 3 normal models. |

predSimNorm | Predict and simulate continuous value from normal... |

predSimNormsSelect | Predict and simulate value from n normal models. |

predSimNormsSelect3Models | Predict and simulate value from 3 normal models. |

predSimNormsSelectWithRounding | Predict and simulate value from n normal models with... |

predSimPois | Predict and simulate continuous value from poisson model |

prepend.paths | prepend.paths |

prepend.paths.for.yr1.CI | prepend.paths.for.yr1.CI |

read_csv | Reads a CSV file. |

read_file | Read a file and return a dataframe. |

redim.mx | Re-dimension a matrix. Takes the matrix mx and transforms it... |

remove.cols | Remove cols specified by indices. |

remove.cols.named | Remove cols by name. |

remove.elements | Remove named elements from list |

removeGlobalSubgroupFilterExpression | Clear the subgroup expression for all cat.adjustments. |

remove.NA.cols | Remove columns that contain all NAs. |

remove_rows_by_index | Remove rows specified by indices |

remove.rows.named | Remove rows by name. |

remove.zero.cols | Remove cols that contain all zeros. |

remove.zero.rows | Remove rows that contain all zeros. |

result.as.means.and.errs | Takes a result row and returns the means and error amounts as... |

rmall | Remove all objects in global environment. |

ROW | ROW constant = 1. |

selectFixedOutcomeIfSet | Checks whether a fixed vector of values should be used... |

select.row.list.mx | Select only the specified row from each matrix in a list, and... |

setGlobalSubgroupFilterExpression | Set the subgroup expression to all cat.adjustments if the... |

simario | simario is a framework for executing multi-run dynamic... |

simulateRun | Simulate outomes and store them in the outcomes list. |

simulateSimario | Perform a simulation of X runs using parallel computing. |

strip.alpha | Remove any alpha from character vector, leaving only numbers. |

strip.alpha.mx | Remove any alpha from row and col names, leaving only... |

stripClass | Remove class attribute from an object |

stripEmpty | Remove empty values from vector |

strip_lvl_suffix | Remove trailing "LvlX" (if any) where X is any character |

stripMeta | Remove meta attribute from an object |

stripMeta.list | Remove meta attribute from a list |

strip.numeric | Remove any numbers from character vector, leaving only alpha. |

subsetFirstDimension | Subset the first dimension, returning the same number of... |

tableBuilderNew | Returns a dataset for use in a table by the Table Builder... |

table.catvar | Produce a proportioned table for x, using the specified... |

table.catvar.with.CI | This is the version for table.catvar() with confidence... |

table.contvar | Display a vector of continuous values in a table using the... |

table.contvar.with.CI | This is the version for table.contvar() with confidence... |

trim | Remove leading and trailing spaces from a string |

tryerrorMsgs | Return the messages of any element that is a try-error |

updatelist | Update dest with the values in src, removing any values from... |

withinfunc | Same as within, but the expr executed is a function. Unlike... |

ZDIM | ZDIM constant = 3. |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.