create_parameters {sim.BA}R Documentation

Create parameters for data-generating models

Description

create_parameters() facilitates creation of the parameters input to simBA(). This input contains information required to generate simulated dataset that will be analyzed within the simulation.

Usage

create_parameters(
  nbinary = 0,
  ncontinuous = 0,
  ncount = 0,
  unmeasured_conf = "u1",
  unmeasured_type = "binary",
  file = NULL
)

Arguments

nbinary, ncontinuous, ncount

the number of binary, continuous, and count confounders to include, respectively. Default is 0.

unmeasured_conf

the name of the unmeasured confounder. Default is "u1".

unmeasured_type

the type of variable for the unmeasured confounder. Allowable options include "binary", "continuous", and "count". Default is "binary"; abbreviations allowed.

file

optional; a string containing a path to a .csv or .xslx file where the output will be written to. If NULL (the default), no file will be written.

Value

A data.frame containing a skeleton of the parameter values, which must be filled in manually by the user. See The parameters input object section in the simBA() documentation for which columns will be present in the output. An additional column, Description, will also be produced, but it is not necessary to fill it in.

Examples

parameters <- create_parameters(nbinary = 6,
                                ncontinuous = 2,
                                ncount = 1,
                                unmeasured_conf = "u1",
                                unmeasured_type = "continuous")

parameters

[Package sim.BA version 0.1.0 Index]