simulate_mm_data: Simulate Michaelis-Menten Data

View source: R/simulate.R

simulate_mm_dataR Documentation

Simulate Michaelis-Menten Data

Description

Generate a synthetic Michaelis-Menten dataset with bounded heteroscedastic variance and Gaussian, centered gamma, or standardized Student-t errors.

Usage

simulate_mm_data(n = 100, x = seq(1, 100, length.out = n),
  vmax = 100, km = 20, variance_shape = c("mm", "exp", "hill"),
  error = c("normal", "skewed", "student_t"), s0 = 1, t2 = 9, c = 20,
  a = 0.05, alpha = 2, skew_shape = 4, seed = NULL, df = 10)

Arguments

n

Number of observations when x is not supplied.

x

Optional substrate concentration grid.

vmax

True V_{\max} value.

km

True K_m value.

variance_shape

Character string naming the true variance pattern.

error

Character string naming the error distribution.

s0, t2, c, a, alpha

Variance-shape parameters.

skew_shape

Shape parameter for the skewed gamma-based error.

seed

Deprecated and ignored. Call set.seed() before simulate_mm_data() if reproducibility is needed.

df

Degrees of freedom greater than four for Student-t errors, ensuring a finite fourth moment. Ignored for other error choices.

Details

The standardized error has mean zero and variance one. For "skewed", it is (G-a)/\sqrt{a} with G\sim\mathrm{Gamma}(a,1) (shape a=skew_shape, scale one). For "student_t", it is T\sqrt{(\nu-2)/\nu} with T\sim t_\nu. These are generating distributions, not options that select the fitting algorithm. See fit_mm_moments for higher-moment estimation.

Value

A data frame containing the simulated observations.

Examples

set.seed(1)
sim_dat <- simulate_mm_data(variance_shape = "hill", error = "skewed")
head(sim_dat)
heavy_tail_dat <- simulate_mm_data(error = "student_t", df = 10)

inferMM documentation built on Oct. 30, 2026, 9:06 a.m.