Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not clear Change works with durational terms or durational operators inside of it #60

Open
chad-klumb opened this issue Jun 20, 2021 · 2 comments

Comments

@chad-klumb
Copy link
Contributor

e.g.

require(tergm)
set.seed(0)
nw <- network.initialize(100, dir = F)
nw <- simulate(nw ~ edges, coef = c(-4), dynamic = TRUE, time.slices = 10, output = "final", monitor = ~Change(~edges + triangle + mean.age + Form(~edges + triangle + mean.age)))
attributes(nw)$stats

produces

> attributes(nw)$stats
Markov Chain Monte Carlo (MCMC) output:
Start = 1 
End = 10 
Thinning interval = 1 
      Change~edges Change~triangle Change~mean.age Change~Form~edges Change~Form~triangle Change~Form~mean.age
 [1,]           78               1        1.000000                78                    1             1.000000
 [2,]          182               5        2.417582               184                    5             1.423913
 [3,]          195              13        3.533333               197                   26             1.554312
 [4,]          176              11        4.522727               101                    6             1.673013
 [5,]          176               7        5.505682                -3                  -22             1.690365
 [6,]          186               9        6.505376               -85                  -45             1.682063
 [7,]          172               5        7.575581              -183                  -66             1.772168
 [8,]          162               3        8.549383              -290                  -85             1.819206
 [9,]          177               4        9.536723              -369                 -105             1.691192
[10,]          189              16       10.597884              -442                 -105             1.662247

I'm surprised to see negative ~Change(~Form(~edges)) and ~Change(~Form(~triangle)) statistics

also not totally clear to me that ~Change(~mean.age) is correct in any sense of the word (but maybe I just need to think about it more)

@chad-klumb
Copy link
Contributor Author

I would add that it's starting from an empty network (with no time or lasttoggle attached), so I wouldn't expect lasttoggle initialization to be a major issue here.

@krivit
Copy link
Member

krivit commented Jun 20, 2021

I wouldn't expect it to work with durational operators, so I am not too concerned about that; I would prefer trying to nest them to fail with an error, but I can't think of a good way to do that off the top of my head. Durational terms should work, though as we discussed in the other thread, some statistics are poorly defined for other durational operators, so Change is not special in that sense.

chad-klumb added a commit that referenced this issue Jun 21, 2021
chad-klumb added a commit that referenced this issue Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants