sim.prop {simitation}R Documentation

sim.prop

Description

sim.prop

Usage

sim.prop(
  n,
  p = 0.5,
  num.experiments = 1,
  experiment.name = "experiment",
  value.name = "x",
  seed = 2470,
  vstr = 3.6
)

Arguments

n

A numeric value for the number of observations in each experiment.

p

A numeric value for the probability of success.

num.experiments

A numeric value representing the number of simulated experiments.

experiment.name

A character value providing the name for the column identifying the experiment.

value.name

A character value providing the name for the simulated values.

seed

A single numeric value, interpreted as an integer, or NULL. See help(set.seed).

vstr

A character string containing a version number, e.g., "1.6.2". The default RNG configuration of the current R version is used if vstr is greater than the current version. See help(set.seed).

Value

A data.table containing simulated values based on the probability of success for each experiment. The output will have two columns: one indicating the experiment and another containing the simulated values.

Examples

simdat.prop <- sim.prop(n = 30, p = 0.45, num.experiments = 2,
 experiment.name = "simulation_id", value.name = "success", seed = 104)

[Package simitation version 0.0.7 Index]