BICn {sme} | R Documentation

## An alternative BIC for longitudinal models

### Description

Calculates the BIC as -2 * log-likelihood + log(n) * npar for a longitudinal model where npar is the number of parameters in the fitted-model and n is the number of subjects

### Usage

    BICn(object,...)

### Arguments

`object` | a fitted longitudinal model object
`...` | some methods for this generic function may require additional arguments

### Details

When applying the BIC in a longitudinal context, there is some debate as to whether the sample size should be taken to mean the number of subjects or the total number of observations across all subjects (see Section 7.3 of Hedeker and Gibbons, 2006).

Assuming the default `BIC` function accounts for the latter case, this generic function can be implemented for longitudinal models where the number of subjects can be extracted in order to calculate the BIC under the alternative definition.

### Value

A numeric value with the BIC of the longitudinal model, with the penalty taken as a function of the number of subjects as described.

### Author(s)

Maurice Berk maurice.berk01@imperial.ac.uk

### References

Berk, M. (2012). Smoothing-splines Mixed-effects Models in R. Preprint

Hedeker, D. & Gibbons, D. R. (2006). Longitudinal Data Analysis. Wiley

### Examples

      data(MTB)
      fit <- sme(MTB[MTB$variable==6031,c("y","tme","ind")])
      BICn(fit)

[Package sme version 1.0.2 Index]