Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

diammatrix

Find diameters of mobility graphs


Description

'diammatrix' computes the diameters of certain graphs related to convergence speed of felm.

Usage

diammatrix(flist, approx = TRUE)

Arguments

flist

a list of factors defining the dummies.

approx

logical. Approximate diameters are computed.

Details

Each pair of factors (f1,f2) from flist defines a bipartite graph in which the vertices are the levels of the factors, and two vertices are adjacent if they are observed simultaneously. The connected components of this graph are important for identification of the coefficients for the factor levels, i.e. for getfe. But experience and some trials have led the author to speculate that the diameter of the graph (or its largest component) is also important for the convergence rate. Specifically, the author suspects that under some assumptions, time to convergence goes like the square of the diameter. At least in the case of two factors. This function computes the diameter for each pair of factors. If the graph is disconnected, the largest connected component is used. If accel=TRUE (the default), the diameter is approximated from below by drawing two sets of 10 random vertices and finding the maximum length of the shortest paths between them.

Value

A matrix of dimension K x K where K is length(flist).

Note

This function is not important to the operation of the package, it is included for easy experimentation with the convergence rate. It requires that the suggested package igraph is attached.


lfe

Linear Group Fixed Effects

v2.8-6
Artistic-2.0
Authors
Simen Gaure [aut] (<https://orcid.org/0000-0001-7251-8747>), Grant McDermott [ctb], Karl Dunkle Werner [ctb], Matthieu Stigler [ctb, cre] (<https://orcid.org/0000-0002-6802-4290>), Daniel Lüdecke [ctb]
Initial release
2021-01-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.