predictMoments: Model-Implied Distributional Moments at Specific Ages

View source: R/moments.R

predictMomentsR Documentation

Model-Implied Distributional Moments at Specific Ages

Description

Computes the mean, standard deviation, variance, skewness and (excess) kurtosis of the raw score distribution implied by a fitted cNORM model at one or more ages (or, more generally, values of the explanatory variable). The moments are model-implied population moments of the conditional raw score distribution, censored at the bounds of the raw score range [minRaw, maxRaw] for consistency across model families.

Usage

predictMoments(model, age, ...)

## Default S3 method:
predictMoments(model, age, ...)

## S3 method for class 'cnorm'
predictMoments(model, age, nNodes = 100, ...)

## S3 method for class 'cnormBetaBinomial'
predictMoments(model, age, ...)

## S3 method for class 'cnormBetaBinomial2'
predictMoments(model, age, ...)

## S3 method for class 'cnormShash'
predictMoments(model, age, nNodes = 100, ...)

Arguments

model

A model object of class cnorm, cnormBetaBinomial, cnormBetaBinomial2 or cnormShash.

age

A numeric vector of ages (values of the explanatory variable) at which to compute the moments.

...

Additional parameters passed to the methods, e.g. nNodes.

nNodes

Number of Gauss-Hermite quadrature nodes (default 100). Only relevant for the Taylor and SHASH methods; ignored for beta-binomial models, which are computed exactly by summation.

Details

The computation strategy depends on the model family:

Taylor polynomial (cnorm)

The bivariate regression function is collapsed at the specified age into a univariate polynomial in the norm score (location) variable. Moments are then obtained by Gauss-Hermite quadrature, which is mathematically exact for polynomial quantile functions (up to the censoring at minRaw/maxRaw).

Beta-binomial (cnormBetaBinomial, cnormBetaBinomial2)

Moments are computed exactly by summation over the discrete probability mass function on the support 0:n, using the age-specific predicted \alpha and \beta parameters. This respects the discreteness of the distribution; no continuity approximation is involved.

SHASH (cnormShash)

Moments are obtained by Gauss-Hermite quadrature of the quantile function qshash evaluated at the age-specific distribution parameters, censored at minRaw/maxRaw.

Kurtosis is reported as excess kurtosis (0 for the normal distribution).

Note that the skewness and kurtosis of the censored distribution are reported. For well-fitting models whose raw score range covers the probability mass of the conditional distribution, censoring effects are negligible; for distributions with substantial floor or ceiling effects, the censored moments are the substantively meaningful ones.

Value

A data.frame with one row per age and the columns age, mean, sd, variance, skewness and kurtosis (excess). The computation method is stored in the attribute "method".

References

Isserlis, L. (1918). On a formula for the product-moment coefficient of any order of a normal frequency distribution in any number of variables. Biometrika, 12(1/2), 134-139.

Jones, M. C. & Pewsey, A. (2009). Sinh-arcsinh distributions. Biometrika, 96(4), 761-780.

See Also

normTable, predictNorm, predictRaw

Examples

## Not run: 
# Taylor polynomial model
model <- cnorm(raw = elfe$raw, group = elfe$group)
predictMoments(model, age = c(2.25, 2.75, 3.25, 3.75, 4.25))

# Beta-binomial model
bb <- cnorm.betabinomial(age = ppvt$age, score = ppvt$raw, n = 228)
predictMoments(bb, age = seq(4, 16, by = 2))

## End(Not run)


cNORM documentation built on July 20, 2026, 5:07 p.m.