get_glm_sample_data: Generate Sample Data for GLM

View source: R/misc.R

get_glm_sample_dataR Documentation

Generate Sample Data for GLM

Description

This function generates sample data for a specified GLM family. It can generate binomial or Gaussian distributed data based on the provided parameters.

Usage

get_glm_sample_data(family_string, n = 10, mean = 0, sd = 1)

Arguments

family_string

Character. The family of the GLM. Options are "binomial" or "gaussian".

n

Integer. The number of samples to generate.

mean

Numeric. The mean of the distribution (used for both binomial and Gaussian).

sd

Numeric. The standard deviation of the distribution (used only for Gaussian).

Value

Numeric vector of generated sample data.


catalytic documentation built on April 4, 2025, 5:51 a.m.