# TICvlm: Takeuchi's Information Criterion In VGAM: Vector Generalized Linear and Additive Models

## Description

Calculates the Takeuchi information criterion for a fitted model object for which a log-likelihood value has been obtained.

## Usage

 ```1 2``` ``` TIC(object, ...) TICvlm(object, ...) ```

## Arguments

 `object` A VGAM object having class `vglm-class`. `...` Other possible arguments fed into `logLik` in order to compute the log-likelihood.

## Details

The following formula is used for VGLMs: -2*log-likelihood + 2 * trace(V K), where V is the inverse of the EIM from the fitted model, and K is the outer product of the score vectors. Both V and K are order-p.VLM matrices. One has V equal to `vcov(object)`, and K is computed by taking the outer product of the output from the `deriv` slot multiplied by the large VLM matrix and then taking their sum. Hence for the huge majority of models, the penalty is computed at the MLE and is empirical in nature. Theoretically, if the fitted model is the true model then AIC equals TIC.

When there are prior weights the score vectors are divided by the square root of these, because (a_i U_i / √{a_i})^2 = a_i U_i^2.

This code relies on the log-likelihood being defined, and computed, for the object. When comparing fitted objects, the smaller the TIC, the better the fit. The log-likelihood and hence the TIC is only defined up to an additive constant.

Currently any estimated scale parameter (in GLM parlance) is ignored by treating its value as unity. Also, currently this function is written only for `vglm` objects and not `vgam` or `rrvglm`, etc., objects.

## Value

Returns a numeric TIC value.

## Warning

This code has not been double-checked. The general applicability of `TIC` for the VGLM/VGAM classes has not been developed fully. In particular, `TIC` should not be run on some VGAM family functions because of violation of certain regularity conditions, etc.

Some authors note that quite large sample sizes are needed for this IC to work reasonably well.

## Note

TIC has not been defined for RR-VGLMs, QRR-VGLMs, etc., yet.

See `AICvlm` about models such as `posbernoulli.tb` that require `posbinomial(omit.constant = TRUE)`.

T. W. Yee.

## References

Takeuchi, K. (1976). Distribution of informational statistics and a criterion of model fitting. (In Japanese). Suri-Kagaku (Mathematic Sciences), 153, 12–18.

Burnham, K. P. and Anderson, D. R. (2002). Model Selection and Multi-Model Inference: A Practical Information-Theoretic Approach, 2nd ed. New York, USA: Springer.

VGLMs are described in `vglm-class`; `AIC`, `AICvlm`. `BICvlm`.

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```pneumo <- transform(pneumo, let = log(exposure.time)) (fit1 <- vglm(cbind(normal, mild, severe) ~ let, cumulative(parallel = TRUE, reverse = TRUE), data = pneumo)) coef(fit1, matrix = TRUE) TIC(fit1) (fit2 <- vglm(cbind(normal, mild, severe) ~ let, cumulative(parallel = FALSE, reverse = TRUE), data = pneumo)) coef(fit2, matrix = TRUE) TIC(fit2) ```

### Example output

```Loading required package: stats4

Call:
vglm(formula = cbind(normal, mild, severe) ~ let, family = cumulative(parallel = TRUE,
reverse = TRUE), data = pneumo)

Coefficients:
(Intercept):1 (Intercept):2           let
-9.676093    -10.581725      2.596807

Degrees of Freedom: 16 Total; 13 Residual
Residual deviance: 5.026826
Log-likelihood: -25.09026
(Intercept)          -9.676093         -10.581725
let                   2.596807           2.596807
 50.25913

Call:
vglm(formula = cbind(normal, mild, severe) ~ let, family = cumulative(parallel = FALSE,
reverse = TRUE), data = pneumo)

Coefficients:
(Intercept):1 (Intercept):2         let:1         let:2
-9.593308    -11.104791      2.571300      2.743550

Degrees of Freedom: 16 Total; 12 Residual
Residual deviance: 4.884404
Log-likelihood: -25.01905