fit_bounded_continuous function

Fit Bounded Normal Model on Covariate

Fit Bounded Normal Model on Covariate

This internal function models a covariate using a "bounded normal" distribution by first standardizing the covariate values to the range [0, 1], noninclusive, then fitting a generalized linear model (GLM) under the Gaussian family function.

fit_bounded_continuous( 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 jj.
  • 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.

Returns

Fitted model for the covariate at index jj.