statnet / ergm.ego

Fit, Simulate and Diagnose Exponential-Family Random Graph Models to Egocentrically Sampled Network Data https://statnet.org
Other
14 stars 4 forks source link

Recent test failures #56

Closed mbojan closed 3 years ago

mbojan commented 3 years ago

Seems like some of the tests started failing. @krivit , are these because recent updates to the ergm terms?

For example in tests/EgoStats.tests.R comparing the output of two summary() calls fails. When inspecting the differences with waldo::compare() I'm getting:

waldo::compare(summary(f.y), summary(f.y.e))
     names(old)                   | names(new)                       
 [1] "edges"                      | "edges"                      [1] 
 [2] "nodecov.a"                  | "nodecov.a"                  [2] 
 [3] "nodecov.a.c.a"              - "nodecov.a"                  [3] 
 [4] "nodecov.a.c.c"              - "nodecov.c"                  [4] 
 [5] "nodecov.a.c.d.a"            - "nodecov.a"                  [5] 
 [6] "nodecov.a.c.d.c"            - "nodecov.c"                  [6] 
 [7] "nodecov.a.c.d.d"            - "nodecov.d"                  [7] 
 [8] "nodecov.c^2+sin(d)"         | "nodecov.c^2+sin(d)"         [8] 
 [9] "offset(nodecov.c^2+sin(d))" | "offset(nodecov.c^2+sin(d))" [9] 
[10] "nodefactor.a.7"             | "nodefactor.a.7"             [10]

     old                  | new                      
 [5] 2405.000000000000000 | 2405.000000000000000 [5] 
 [6] 134.414901956915855  | 134.414901956915855  [6] 
 [7] 144.642762771341950  | 144.642762771341950  [7] 
 [8] 207.522895102857376  - 207.522895102857461  [8] 
 [9] 207.522895102857376  - 207.522895102857461  [9] 
[10] 97.000000000000000   | 97.000000000000000   [10]
[11] 101.000000000000000  | 101.000000000000000  [11]
[12] 102.000000000000000  | 102.000000000000000  [12]

     old                 | new                               
[26] 101.000000000000000 | 101.000000000000000 [26]          
[27] 102.000000000000000 | 102.000000000000000 [27]          
[28] 8.000000000000000   | 8.000000000000000   [28]          
[29] 14.000000000000000  - 14.000000000000002  [29]          
[30] 22.000000000000000  | 22.000000000000000  [30]          
[31] 5.000000000000000   | 5.000000000000000   [31]          
[32] 1.000000000000000   | 1.000000000000000   [32]          
[33] 4.000000000000000   | 4.000000000000000   [33]          
[34] 7.000000000000000   - 7.000000000000001   [34]          
[35] 3.000000000000000   | 3.000000000000000   [35]          
 ... ...                   ...                 and 2 more ...

     old                | new                    
[41] 12.000000000000000 | 12.000000000000000 [41]
[42] 5.000000000000000  | 5.000000000000000  [42]
[43] 3.000000000000000  | 3.000000000000000  [43]
[44] 14.000000000000000 - 14.000000000000002 [44]
[45] 4.000000000000000  | 4.000000000000000  [45]
[46] 9.000000000000000  | 9.000000000000000  [46]
[47] 4.000000000000000  | 4.000000000000000  [47]

     old                | new                              
[56] 4.000000000000000  | 4.000000000000000  [56]          
[57] 2.000000000000000  | 2.000000000000000  [57]          
[58] 8.000000000000000  | 8.000000000000000  [58]          
[59] 14.000000000000000 - 14.000000000000002 [59]          
[60] 22.000000000000000 | 22.000000000000000 [60]          
[61] 5.000000000000000  | 5.000000000000000  [61]          
[62] 1.000000000000000  | 1.000000000000000  [62]          
[63] 4.000000000000000  | 4.000000000000000  [63]          
[64] 7.000000000000000  - 7.000000000000001  [64]          
[65] 3.000000000000000  | 3.000000000000000  [65]          
 ... ...                  ...                and 2 more ...

     old                | new                    
[71] 12.000000000000000 | 12.000000000000000 [71]
[72] 5.000000000000000  | 5.000000000000000  [72]
[73] 3.000000000000000  | 3.000000000000000  [73]
[74] 14.000000000000000 - 14.000000000000002 [74]
[75] 4.000000000000000  | 4.000000000000000  [75]
[76] 9.000000000000000  | 9.000000000000000  [76]
[77] 4.000000000000000  | 4.000000000000000  [77]

     old                | new                    
[88] 36.000000000000000 | 36.000000000000000 [88]
[89] 11.000000000000000 | 11.000000000000000 [89]
[90] 11.000000000000000 | 11.000000000000000 [90]
[91] 14.000000000000000 - 14.000000000000002 [91]
[92] 11.000000000000000 | 11.000000000000000 [92]
[93] 2.000000000000000  | 2.000000000000000  [93]
[94] 1.000000000000000  | 1.000000000000000  [94]

      old                 | new                      
[100] 36.000000000000000  | 36.000000000000000  [100]
[101] 149.000000000000000 | 149.000000000000000 [101]
[102] 219.000000000000000 | 219.000000000000000 [102]
[103] 176.668568655176273 - 176.668568655176330 [103]
[104] 176.668568655176273 - 176.668568655176330 [104]
[105] 10.000000000000000  | 10.000000000000000  [105]
[106] 20.000000000000000  | 20.000000000000000  [106]
[107] 10.000000000000000  | 10.000000000000000  [107]

      old                | new                     
[118] 4.000000000000000  | 4.000000000000000  [118]
[119] 10.000000000000000 | 10.000000000000000 [119]
[120] 1.000000000000000  | 1.000000000000000  [120]
[121] 7.000000000000000  - 7.000000000000001  [121]
[122] 3.000000000000000  | 3.000000000000000  [122]
[123] 6.000000000000000  | 6.000000000000000  [123]
[124] 9.000000000000000  | 9.000000000000000  [124]

      old               | new                    
[162] 3.000000000000000 | 3.000000000000000 [162]
[163] 1.000000000000000 | 1.000000000000000 [163]
[164] 1.000000000000000 | 1.000000000000000 [164]
[165] 7.000000000000000 - 7.000000000000001 [165]
[166] 3.000000000000000 | 3.000000000000000 [166]
[167] 6.000000000000000 | 6.000000000000000 [167]
[168] 9.000000000000000 | 9.000000000000000 [168]

So not only naming/labeling differences, but also slight numerical differences.

krivit commented 3 years ago

Is this still a problem?

mbojan commented 3 years ago

The egostats are no longer an issue, it seems. But I see other errors: https://github.com/statnet/ergm.ego/runs/1831299269?check_suite_focus=true

krivit commented 3 years ago

For some reason, library(ergm.ego) in testthat.R is not sufficient, and so I had to re-add them to each file. I don't quite understand. Should be working now, though.

krivit commented 3 years ago

All fixed now.

mbojan commented 3 years ago

For some reason, library(ergm.ego) in testthat.R is not sufficient, and so I had to re-add them to each file. I don't quite understand. Should be working now, though.

That's really strange...