get_glm_mean: Compute Mean Based on GLM Family

get_glm_meanR Documentation

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)

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.

Value

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


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