Generate synthetic data from a four-parameter logistic model for testing and validation purposes.
simulate_serocop_data(
n = 200,
floor = 0.05,
ceiling = 0.9,
ec50 = 1.5,
slope = 2,
titre_mean = 2,
titre_sd = 1.5,
seed = NULL
)Number of observations
Lower asymptote (minimum infection probability)
Upper asymptote (maximum infection probability)
Titre at 50% between floor and ceiling
Steepness of the curve
Mean of titre distribution (normal)
Standard deviation of titre distribution
Random seed for reproducibility
A list containing:
Vector of simulated titres
Vector of simulated infection outcomes
True infection probabilities
List of true parameters used for simulation
# Simulate data with default parameters
data <- simulate_serocop_data(n = 200, seed = 123)
# Custom parameters
data <- simulate_serocop_data(
n = 500,
floor = 0.02,
ceiling = 0.95,
ec50 = 2.0,
slope = 3.0,
seed = 456
)