This function generates sample data for a specified GLM family. It can generate binomial or Gaussian distributed data based on the provided parameters.
get_glm_sample_data(family_string, n = 10, mean = 0, sd = 1)
Numeric vector of generated sample data.
Character. The family of the GLM. Options are "binomial"
or "gaussian"
.
Integer. The number of samples to generate.
Numeric. The mean of the distribution (used for both binomial and Gaussian).
Numeric. The standard deviation of the distribution (used only for Gaussian).