gofMobilityNetwork {MoNAn} | R Documentation |
gofMobilityNetwork
Description
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).
Usage
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, ...)
Arguments
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 values for which the gofFunction should be calculated/plotted. |
simulations |
outdated parameter, no need to specify |
x |
An object of class "gof.stats.monan". |
... |
Additional plotting parameters, use discouraged. |
Value
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
returns violin plots of the
gof tests with observed values superimposed in red.
References
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).
See Also
getIndegree()
, getTieWeights()
Examples
# 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)