-
I am estimating a tergm with the CMPLE method. Unfortunately, the CMLE methods does not seem an option. If this feature will not be available soon, do you have suggestions on how to implement it? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I don't have time to test this on the CRAN version, but the current version in library(tergm)
data(samplk)
samplk12 <- tergm(list(samplk1, samplk2) ~
Form(~edges+mutual+transitiveties+cyclicalties) +
Diss(~edges+mutual+transitiveties+cyclicalties),
estimate="CMPLE")
samplk12.gof <- gof(samplk12)
print(samplk12.gof)
#> Starting maximum pseudolikelihood estimation (MPLE):
#> Obtaining the responsible dyads.
#> Evaluating the predictor and response matrix.
#> Maximizing the pseudolikelihood.
#> Finished MPLE.
#> Evaluating log-likelihood at the estimate.
#>
#> Goodness-of-fit for in-degree
#>
#> obs min mean max MC p-value
#> idegree0 0 0 0.61 3 1.00
#> idegree1 3 0 2.67 7 1.00
#> idegree2 8 1 4.10 9 0.08
#> idegree3 2 0 3.97 9 0.48
#> idegree4 1 0 2.81 7 0.36
#> idegree5 1 0 1.83 5 0.84
#> idegree6 0 0 1.17 4 0.54
#> idegree7 1 0 0.43 2 0.70
#> idegree8 2 0 0.24 2 0.04
#> idegree9 0 0 0.16 1 1.00
#> idegree10 0 0 0.01 1 1.00
#>
#> Goodness-of-fit for out-degree
#>
#> obs min mean max MC p-value
#> odegree0 0 0 0.18 2 1.00
#> odegree1 0 0 1.54 5 0.52
#> odegree2 0 0 4.40 9 0.04
#> odegree3 15 1 5.26 11 0.00
#> odegree4 3 0 3.94 10 0.84
#> odegree5 0 0 1.68 5 0.36
#> odegree6 0 0 0.72 3 0.88
#> odegree7 0 0 0.20 4 1.00
#> odegree8 0 0 0.07 1 1.00
#> odegree10 0 0 0.01 1 1.00
#>
#> Goodness-of-fit for edgewise shared partner
#>
#> obs min mean max MC p-value
#> esp.OTP0 27 22 32.76 44 0.28
#> esp.OTP1 19 8 18.41 32 0.94
#> esp.OTP2 7 0 4.68 16 0.52
#> esp.OTP3 4 0 0.68 5 0.08
#> esp.OTP4 0 0 0.11 1 1.00
#> esp.OTP6 0 0 0.02 1 1.00
#>
#> Goodness-of-fit for minimum geodesic distance
#>
#> obs min mean max MC p-value
#> 1 57 39 56.66 74 1.00
#> 2 85 59 103.62 144 0.36
#> 3 81 54 83.16 113 0.82
#> 4 41 9 32.02 55 0.42
#> 5 17 0 8.91 32 0.30
#> 6 12 0 2.24 17 0.08
#> 7 10 0 0.53 10 0.02
#> 8 3 0 0.12 7 0.02
#> 9 0 0 0.02 2 1.00
#> Inf 0 0 18.72 115 0.76
#>
#> Goodness-of-fit for model statistics
#>
#> obs min mean max MC p-value
#> Form(1)~edges 77 64 77.06 92 1.00
#> Form(1)~mutual 24 17 23.42 30 0.98
#> Form(1)~transitiveties 52 29 50.25 73 0.90
#> Form(1)~cyclicalties 46 21 42.85 66 0.86
#> Diss(1)~edges -35 -47 -34.60 -26 0.88
#> Diss(1)~mutual -8 -13 -7.58 -2 1.00
#> Diss(1)~transitiveties -6 -9 -3.32 0 0.36
#> Diss(1)~cyclicalties -3 -12 -2.85 0 1.00 Created on 2023-05-13 with reprex v2.0.2 Is this what you are looking for? |
Beta Was this translation helpful? Give feedback.
-
Yes, thank you! I used to get the following error message: "Error in gof.default(fit) : Goodness-of-Fit methods have been implemented only for class(es) "ergm", "formula", and "tergm_EGMME" in the packages loaded." Now it works fine. |
Beta Was this translation helpful? Give feedback.
I don't have time to test this on the CRAN version, but the current version in
master
seems to work: