Description Usage Arguments Details Value Note
'diammatrix' computes the diameters of certain graphs related to convergence
speed of felm
.
1 | diammatrix(flist, approx = TRUE)
|
flist |
a list of factors defining the dummies. |
approx |
logical. Approximate diameters are computed. |
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.
A matrix of dimension K x K where K is length(flist)
.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.