predictCoefficients: Predict mean and standard deviation for a beta binomial...

View source: R/betaBinomial.R

predictCoefficientsR Documentation

Predict mean and standard deviation for a beta binomial regression model

Description

This function generates predictions from a fitted beta binomial regression model (mode 1) for new age points and converts them into alpha and beta parameters of the beta-binomial distribution via method of moments.

Usage

predictCoefficients(model, ages, n = NULL)

Arguments

model

An object of class "cnormBetaBinomial".

ages

A numeric vector of age points at which to make predictions.

n

The maximum score to be achieved.

Details

The function applies the same standardization used in model fitting, generates predictions on the standardized scale, and transforms these back to the original scale. If the method of moments yields invalid (i.e. non-positive or non-finite) parameters, a mean-preserving low-precision fallback is used instead of arbitrarily clamping both parameters.

Value

A data frame with columns:

age

The input age points

mu

Predicted mean values

sigma

Predicted standard deviation values

a

Alpha parameters

b

Beta parameters


cNORM documentation built on July 13, 2026, 5:08 p.m.