View source: R/4_auxiliaryFunctions.R
| gofMobilityNetwork | R Documentation |
Akin to ERGMs, goodness of fit testing is available to see whether auxiliary statistics are well captured by the model. The logic behind gof testing for network models is outlined in Hunter et al. (2008) and Lospinoso and Snijders (2019).
gofMobilityNetwork(ans, gofFunction, lvls = NULL, simulations = NULL)
gofDistributionNetwork(ans, gofFunction, lvls = NULL, simulations = NULL)
monanGOF(ans, gofFunction, lvls = NULL, simulations = NULL)
## S3 method for class 'gof.stats.monan'
plot(x, lvls = NULL, xlab = NULL, ...)
ans |
An object of class "result.monan" resulting from an estimation
with the function |
gofFunction |
A gof function that specifies which auxiliary outcome should be used, e.g., "getIndegree" or "getTieWeights". |
lvls |
The levels for which the gofFunction should be calculated. For
|
simulations |
outdated parameter, no need to specify |
x |
An object of class "gof.stats.monan". |
xlab |
Label of the x-axis. By default "value" if the statistics are
named by the values they refer to (as for |
... |
Additional plotting parameters passed to |
The function gofMobilityNetwork returns a list containing
(1) the observed values of the auxiliary statistics and
(2) a list of the simulated values of the auxiliary statistics.
The function plot.gof.stats.monan draws box plots of the
gof tests with observed values superimposed in red, and invisibly returns
the result of graphics::boxplot(). The x-axis shows the
values the statistics refer to (e.g., the indegree), if the gof function
names its results.
Hunter, D. R., Goodreau, S. M., & Handcock, M. S. (2008). Goodness of fit of social network models. Journal of the American Statistical Association, 103(481), 248-258.
Lospinoso, J., & Snijders, T. A. (2019). Goodness of fit for stochastic actor-oriented models. Methodological Innovations, 12(3).
getIndegree(), getTieWeights()
# goodness of fit
myGofIndegree <- gofMobilityNetwork(ans = myResDN,
gofFunction = getIndegree,
lvls = 1:100)
myGofTieWeight <- gofMobilityNetwork(ans = myResDN,
gofFunction = getTieWeights,
lvls = 1:30)
plot(myGofIndegree, lvls = 20:70)
plot(myGofTieWeight, lvls = 1:15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.