residuals.lqmix: Residuals from an 'lqmix' object

residuals.lqmixR Documentation

Residuals from an lqmix object

Description

Returns the residuals from a fitted lqmix object.

Usage

## S3 method for class 'lqmix'
residuals(object, ...)

Arguments

object

an lqmix object

...

not used

Details

The function computes residuals for an object of class lqmix. If the fitted model is based on TC, discrete, random coefficients only, a matrix of size nsbjs x G is given as output; if the fitted model is based on TV, discrete, random coefficients only, a matrix a matrix of size nObs x m is given as output is given as output; if the fitted model is based on both TC and TV, discrete, random coefficients, an array of size nObs x G x m is returned. If the estimated model is based on TC, discrete, random coefficients only, a matrix is given as output. The number of columns corresponds to the estimated number of components (G). If the estimated model is based on TV, discrete, random coefficients only, a matrix is given as output. The number of columns corresponds to the estimated number of states (m). If the estimated model is based on both TC and TV, discrete, random coefficients, an array is given as output. The second and third dimensions correspond to the estimated number of components (G) and states (m), respectively.

Value

A matrix or an array of of residuals, based on the estimated model.


lqmix documentation built on Nov. 5, 2025, 7:15 p.m.