validate_glm_initialization_input {catalytic}R Documentation

Validate Inputs for Catalytic Generalized Linear Models (GLMs) Initialization

Description

This function validates the input parameters required for initializing a catalytic Generalized Linear Model (GLM). It ensures the appropriate structure and compatibility of the formula, family, data, and additional parameters before proceeding with further modeling.

Usage

validate_glm_initialization_input(
  formula,
  family,
  data,
  syn_size,
  custom_variance,
  gaussian_known_variance,
  x_degree
)

Arguments

formula

A formula object specifying the stats::glm model to be fitted. It must not contain random effects or survival terms.

family

A character or family object specifying the error distribution and link function. Valid values are "binomial" and "gaussian".

data

A data.frame containing the data to be used in the GLM.

syn_size

A positive integer specifying the sample size used for the synthetic data.

custom_variance

A positive numeric value for the custom variance used in the model (only applicable for Gaussian family).

gaussian_known_variance

A logical indicating whether the variance is known for the Gaussian family.

x_degree

A numeric vector specifying the degree of the predictors. Its length should match the number of predictors (excluding the response variable).

Details

This function performs the following checks:

Value

Returns nothing if all checks pass; otherwise, raises an error or warning.


[Package catalytic version 0.1.0 Index]