fit_zeroinfl_normal: Fit Zero-Inflated Normal Model on Covariate

View source: R/pred.R

fit_zeroinfl_normalR Documentation

Fit Zero-Inflated Normal Model on Covariate

Description

This internal function models a zero-inflated normal distribution through the combined use of a generalized linear model (GLM) fit on a zero vs. non-zero indicator and a GLM fit on all non-zero values.

Usage

fit_zeroinfl_normal(covparams, covlink = NA, covname, obs_data, j, model_fits)

Arguments

covparams

List of vectors, where each vector contains information for one parameter used in the modeling of the time-varying covariates (e.g., model statement, family, link function, etc.).

covlink

Vector of link functions.

covname

Name of the covariate at index j.

obs_data

Data on which the model is fit.

j

Integer specifying the index of the covariate.

model_fits

Logical scalar indicating whether to return the fitted models. The default is FALSE.

Value

Fitted model for the covariate at index j.


gfoRmula documentation built on May 31, 2023, 9:46 p.m.