df.adj: Calculating Adjusted Degree of Freedom

Description Usage Arguments Details Value Author(s) References

View source: R/df.adj.R

Description

This function calculates adjusted degrees of freedom (i.e., effective number of parameters) contributed by specified variables based on an object from bglm.

Usage

1
df.adj(object, vars = 1:length(object$coefficients))

Arguments

object

a fitted object from bglm.

vars

a vector of variable index or names; default is 1:length(object$coefficients), i.e., all coefficients.

Details

In classical models, the degree of freedom equals the actual number of parameters. However, the degree of freedom (the effective number of parameters) in a hierarchical model can be much smaller than the actual number of parameters. In a hierarchical model, the effective number of parameters is defined as the difference between the posterior mean of the deviance and the deviance at the posterior means of parameters of interest. This function calculates the effective number of parameters based on this definition.

Value

This function returns the adjusted degree of freedom (effective number of parameters) contributed by specified variables.

Author(s)

Nengjun Yi, nyi@uab.edu

References

Yi, N., Xu, S., Lou, X.Y., and Mallick, H. (2013) Multiple Comparisons in Genetic Association Studies: A Hierarchical Modeling Approach. Statistical Applications in Genetics and Molecular Biology.

Spiegelhalter, D.J., Best, N.G., Carlin, B.P., and Linde, A.v.d. (2002) Bayesian measures of model complexity and fit (with discussion). Journal of the Royal Statistical Society Series B 64: 583-639.


nyiuab/BhGLM documentation built on Jan. 9, 2022, 3:31 p.m.