SGLX ) rather than customizing underlying code used in other programs. The question is, then, why even use Stata if R/Matlab is going to be used anyways? Since all programs are user-written, it's best to double check each other, and also users may find it easier (but understandably still tedious) to customize Mata code (e.g. Users should perhaps do the opposite, generating matrices/measures in Stata then running R/Matlab, to double check their own results. Test programs are written for debugging purposes. igraph and RBGL are some other alternatives that can be used to check output. To check output for undirected weighted networks, first run sgltest3.R, then sgltest3.m, and then sgltest3.do. That is, to check matrices/measures for undirected unweighted networks, first run sgltest1.R then run sgltest1.do. After R/MatlabBGL programs are run, corresponding Stata do-files are run to compare results from R/MatlabBGL and SGL outputs. For generating matrices/measures for weighted networks, MatlabBGL is implemented if necessary, as 'sna' does not produce correct results in certain cases when graph is weighted (refer to 'Note' under 'geodist' routine in 'sna' manual ). Sgltest4 series: Tests SGL on directed weighted graphs.Īll test files start with R programs that run package 'sna' to produce random graphs (random seed is set such that generated graphs do not contain isolates). Sgltest3 series: Tests SGL on undirected weighted graphs. Sgltest2 series: Tests SGL on directed unweighted graphs. Sgltest1b1: Similar to sgltest1 but uses edge list in Mata. Sgltest1a2: Tests Katz-Bonacich centrality with specified exogenous beta vector. Sgltest1a1: Tests Katz-Bonacich centrality. Sgltest1: Tests distance matrix, path matrix, betweenness centrality, clustering coefficients, and eigenvector centrality. Sgltest1 series: Tests SGL on undirected unweighted graphs. Different file types are as follows (please note that 'graph' and 'network' are used interchangeably): R/Matlab routines used to double check output now included as part of the upload - please refer to 'test' folder in the below zip attachment. Except for command name change (to better reflect ongoing project), program identical to NETGEN 1.1.3. : Stata Graph Library (SGL) version 1.1.1. : This program has been superseded by SGL 1.1.2. geodist calculates geographical distances by measuring the length of the shortest path between two points along the surface of a mathematical model of the.
0 Comments
Leave a Reply. |