TilburgNetworkGroup / remstats

Computes Statistics for Relational Event History Data
https://tilburgnetworkgroup.github.io/remstats/
Other
7 stars 1 forks source link

error when computing inertia for aom? #43

Closed jomulder closed 1 year ago

jomulder commented 1 year ago

Hi I ran the following:


> library(remstats)
> reff <- ~ inertia(scaling="as.is")
> aomstats1 <- aomstats(
+   edgelist = history,
+   receiver_effects = reff,
+   attributes = info,
+   memory = "full"
+ )
> head(aomstats1$statistics$receiver_stats[,,])
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    0    0    0    0    0 0.00    0    0 0.00     0
[2,]    0    0    0    0    0 0.00    0    0 1.33     0
[3,]    0    0    0    0    0 0.00    0    0 0.00     0
[4,]    0    0    0    0    0 0.00    0    0 0.00     0
[5,]    0    0    0    0    0 0.00    0    0 0.00     0
[6,]    0    0    0    0    0 1.64    0    0 1.33     0
> head(history)
  time actor1 actor2 setting weight
1  238    105    113    work   1.33
2  317    105    109    work   1.64
3  345    115    112    work   1.82
4  627    101    115  social   1.25
5  832    113    107  social   1.67
6  842    105    109    work   2.30

I don't get why the inertia stats are not counts but have decimals (btw the name "as.is" is maybe not super clear name for the raw frequencies), and I don't get why for the sixth event the inertia stats are different for these two actors. Basically what I would expect that all these nonzero elements of the stats are all 1 in this 'head'. Or am I wrong?

mlmeijerink commented 1 year ago

Hi Joris,

The decimal numbers are due to the presence of event weights in the "history" edgelist. When remstats detects event weights, it assumes that you want to use them for computing the endogenous statistics. To simply compute the counts, you can set the weights to one. While I agree that the name "as.is" is not very informative, "counts" would also be confusing in the case where events have weights since they are not actual counts, but rather the summed event weights. Let me know if you have any suggestions.

jomulder commented 1 year ago

Ah stupid of me... About an alternative for "as.is" maybe "none" or "raw" (the latter is used in remulate).

On Mon, Mar 27, 2023 at 4:28 PM Marlyne Meijerink @.***> wrote:

Hi Joris,

The decimal numbers are due to the presence of event weights in the "history" edgelist. When remstats detects event weights, it assumes that you want to use them for computing the endogenous statistics. To simply compute the counts, you can set the weights to one. While I agree that the name "as.is" is not very informative, "counts" would also be confusing in the case where events have weights since they are not actual counts, but rather the summed event weights. Let me know if you have any suggestions.

— Reply to this email directly, view it on GitHub https://github.com/TilburgNetworkGroup/remstats/issues/43#issuecomment-1485216914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFZBLCDVPNNKDXMKXH6FFSDW6GPZRANCNFSM6AAAAAAWJEQH6U . You are receiving this because you authored the thread.Message ID: @.***>