vif.ergm {ergMargins} | R Documentation |
Function to diagnose multicollinearity in ERGM.
Description
Computes the variance inflation factor from the covariance matrix of the ERGM estimator.
Usage
vif.ergm(my.ergm)
Arguments
my.ergm |
an ergm object. |
Details
Computes the variance inflation factor using the covariance matrix of the ERGM estimator. Values above 20 indicate the onset of moderate collinearity problems, values above 100 indicate that strong collinearity likely exists and may be problematizing the convergence of the Markov chain to the stationarity distribution. High VIFs alongside a near-singular Hessian matrix is a clear indicator of multicollinearity. Consider changing model specification in such cases.
Value
Returns a matrix of VIFs for each model parameter. Higher values indicate that the variable in one column of the data matrix is highly correlated with a linear combination of the remaining model covariates. High VIFs can also arise from a large bivariate correlation.
Author(s)
Scott Duxbury, Assistant Professor, University of North Carolina–Chapel Hill, Department of Sociology.
References
Duxbury, Scott W. 2018. "Diagnosing Multicollinearity in Exponential Random Graph Models" Sociological Methods and Research.
Examples
set.seed(21093)
library(ergm)
data("faux.mesa.high")
my.ergm2<-ergm(faux.mesa.high~edges+
nodecov("Grade")+
nodefactor("Race")+
nodefactor("Sex")+
nodematch("Grade")+
nodematch("Sex")+
nodematch("Race"))
vif.ergm(my.ergm2)
#to compute the tolerance instead of the VIF
tol<-1/(vif.ergm(my.ergm2))
#to compute R squared
r.sq<-1-tol