gbme - R-functions for statistical analysis of social network data


gbme is a set of R functions that fit generalized bilinear mixed effects models to dyadic and network data, as described in Hoff(2003). It provides a Markov-chain Monte Carlo estimation procedure for Gaussian, Poisson, and logistic regression models with fixed and random effects.

If you find this code slow or clunky, please try instead the following software: These packages do nearly the same thing as gbme, but run much faster.

NEW: gbme.asym.r This is a hacked version of gbme.r, providing asymmetric inner-product effects u'v instead of z'z. The u's and v's are sender- and receiver-specific multiplicative effects, respectively. This is a more general model, and is more appropriate for data where there might be an aversion to transitivity. Take a look at Ward and Hoff(2005) for an example application.


Installation: Download the text file gbme.r. Start an R-session with gbme.r in the directory and type

source("gbme.r")

Alternatively, if you don't want to download the file, just type

source("http://www.stat.washington.edu/hoff/Code/GBME/gbme.r")

Running the MCMC may take a long time, so you might want to do it in batch mode. Some ideas for a simple analysis of the output is given in gbme.postana.r. You might want to look at the following examples:


Feedback: Let me know if you use this package, have suggestions, or encounter bugs. The more feedback I get, the more I will feel compelled to improve the software.

email: hoff@stat.washington.edu