Learn R Programming

catalytic (version 0.1.0)

get_glm_mean: Compute Mean Based on GLM Family

Description

This function calculates the mean of the response variable for a generalized linear model (GLM) based on the specified family. The calculation depends on whether the family is binomial or gaussian.

Usage

get_glm_mean(family_string, X, coefs)

Value

Numeric vector. The computed mean of the response variable based on the specified family.

Arguments

family_string

Character. The GLM family to use. Options are "binomial" or "gaussian".

X

Matrix. The design matrix (predictors) for the GLM.

coefs

Numeric vector. The coefficients for the GLM.