This function computes the Bayesian information criterion (BIC) or a
quasi-likelihood counterpart (QBIC) from user-supplied input instead
of extracting the values automatically from a model object. This
function is particularly useful for output imported from other
software or for model classes that are not currently supported by
`useBIC`

.

1 | ```
useBICCustom(logL, K, return.K = FALSE, nobs = NULL, c.hat = 1)
``` |

`logL` |
the value of the model log-likelihood. |

`K` |
the number of estimated parameters in the model. |

`return.K` |
logical. If |

`nobs` |
the sample size required to compute the BIC or QBIC. |

`c.hat` |
value of overdispersion parameter (i.e., variance inflation factor)
such as that obtained from |

`useBICCustom`

computes one of the following two information
criteria:

the Bayesian information criterion (BIC, Schwarz 1978) or the quasi-likelihood BIC (QBIC).

`useBICCustom`

returns the BIC or QBIC depending on the values of
the `c.hat`

argument.

The actual (Q)BIC values are not really interesting in themselves, as they depend directly on the data, parameters estimated, and likelihood function. Furthermore, a single value does not tell much about model fit. Information criteria become relevant when compared to one another for a given data set and set of candidate models.

Marc J. Mazerolle

Burnham, K. P., Anderson, D. R. (2002) *Model Selection and
Multimodel Inference: a practical information-theoretic
approach*. Second edition. Springer: New York.

Dail, D., Madsen, L. (2011) Models for estimating abundance from
repeated counts of an open population. *Biometrics* **67**,
577–587.

Lebreton, J.-D., Burnham, K. P., Clobert, J., Anderson, D. R. (1992)
Modeling survival and testing biological hypotheses using marked
animals: a unified approach with case-studies. *Ecological
Monographs* **62**, 67–118.

MacKenzie, D. I., Nichols, J. D., Lachman, G. B., Droege, S., Royle,
J. A., Langtimm, C. A. (2002) Estimating site occupancy rates when
detection probabilities are less than one. *Ecology* **83**,
2248–2255.

MacKenzie, D. I., Nichols, J. D., Hines, J. E., Knutson, M. G.,
Franklin, A. B. (2003) Estimating site occupancy, colonization, and
local extinction when a species is detected imperfectly. *Ecology*
**84**, 2200–2207.

Royle, J. A. (2004) *N*-mixture models for estimating population
size from spatially replicated counts. *Biometrics* **60**,
108–115.

Schwarz, G. (1978) Estimating the dimension of a model. *Annals of
Statistics* **6**, 461–464.

`AICc`

, `aictabCustom`

, `useBIC`

,
`bictab`

, `evidence`

, `modavgCustom`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
##cement data from Burnham and Anderson (2002, p. 101)
data(cement)
##run multiple regression - the global model in Table 3.2
glob.mod <- lm(y ~ x1 + x2 + x3 + x4, data = cement)
##extract log-likelihood
LL <- logLik(glob.mod)[1]
##extract number of parameters
##including residual variance
K.mod <- length(coef(glob.mod)) + 1
##compute BIC with full likelihood
useBICCustom(LL, K.mod, nobs = nrow(cement))
##compare against useBIC
useBIC(glob.mod)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.