[statnet_help] Question about adding moderating effect in REM
Carter T. Butts
buttsc at uci.edu
Mon Oct 30 21:00:36 PDT 2023
Hi, Choi -
Your covariate is time varying, so will need to be specified in an array
of dimension m x p x n x n, where n is the number of nodes, p is the
number of covariates (here 1, if you are only using the one effect), and
m is the number of events in the data set. The value X[i,j,k,l] in this
array is then the value of the jth covariate for the k->l interaction
leading into the ith event. (See ?rem.dyad for documentation on
format.) You can construct that array using the information in
accum.rrl, or by other means (but either way, some processing is
involved). Once you have the covariate array, you indeed pass it to the
covar argument by a CovEvent entry. In your case, it looks like your
data was not formatted correctly for this purpose; in that case, it will
not function correctly.
Hope that helps!
-Carter
On 10/30/23 2:31 AM, SJ C wrote:
> Dear Carter,
>
> I appreciate your detailed response!
>
> Based on my understanding of your explanation, I can create an
> interaction term by multiplying two matrices (e.g., one matrix of
> RRecSnd retrieved from accum.rrl and the other matrix which is
> transformed from node attributes) and enter the interaction term as a
> CovEvent in the rem.dyad. Am I correct?
>
> Assuming that I am correct, I entered the interaction term and the
> attribute-transformed matrix as if they are the covariates of CovEvent
> in rem.dyad as follows:
> covar = list(CovEvent = cbind(attribute-transformed matrix,
> interaction matrix))
>
> However, this code did not work.
> If I separate this code into two as follows, the rem.dyad gives me a
> result of only one variable.
> covar = list(CovEvent = attribute-transformed matrix, CovEvent =
> interaction matrix)
>
> Since we have to enter lower-order terms of the interaction term, I
> need to enter these two terms as CovEvent.
> Can you please let me know how to handle this?
>
> Thank you for your time paying attention to this!
>
> Sincerely,
> Choi
>
> 2023년 10월 18일 (수) 오전 11:06, Carter T. Butts <buttsc at uci.edu>님이
> 작성:
>
> Hi, Choi -
>
> To be clear, I presume that by "moderation" you mean an
> interaction effect (i.e., a product term between e.g. the RRecSnd
> statistic and another statistic). This can be done, but currently
> it is DIY: what you have to do is compute the statistics you want,
> and enter them as dynamic edge (aka event) covariates. (It is a
> basic property of these models that any and all effects can be
> implemented as (dynamic) edge covariates, which is a handy thing
> to keep in mind if you want to implement your own statistics.)
>
> There is an internal function accum.rrl that may be handy for this
> purpose; it is part of the black magic of the package (and thus
> not very documented), but can be used. If you call accum.rrl with
> an eventlist, it will return a list with two elements. The first
> is a list, with one entry per event in the data, whose ith entry
> is an ordered list of the most recent senders for every node that
> has received an event (/going into/ the ith event). The second is
> the corresponding list for most recent receivers for every node
> that has sent an event (again, the ith entry is the state headed
> into the ith event). Nodes that have never sent/received by a
> given event do not have entries. This function is used
> "backstage" to help compute the hazards for RRecSnd and RSndSnd,
> so can be helpful for you if you want to make your own term. But
> of course, it is just a tool for tabulation, and you can write
> your own if you prefer.
>
> Hope that helps!
>
> -Carter
>
> On 10/17/23 4:45 PM, SJ C wrote:
>> Hi all,
>>
>> I am using REM(relevant event model) for the first time in
>> my research project, and also this is my first time sending
>> questions to statnet_help.
>>
>> My question is about entering a moderating effect in REM.
>> I consulted REM tutorials uploaded in Statnet website and other
>> workshop materials, but was not able to find relevant information.
>>
>> For instance, how can we test whether the RRecSnd effect is
>> moderated by a particular attribute (e.g., education level) of
>> the original sender in REM?
>>
>> It would be greatly appreciated if I can have any responses.
>> Thank you!
>>
>> Sincerely,
>> Choi
>>
>>
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help at u.washington.edu
>> https://urldefense.com/v3/__http://mailman13.u.washington.edu/mailman/listinfo/statnet_help__;!!CzAuKJ42GuquVTTmVmPViYEvSg!PshxIW-NTXvNytOo2UNgN4BoECliq11-0VSkV_z-sFJoai8EOjfULJwZkLbKfA2fj43MiNC_6GfJ1WxJ9mMkHCpc$
> _______________________________________________
> statnet_help mailing list
> statnet_help at u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
> <https://urldefense.com/v3/__http://mailman13.u.washington.edu/mailman/listinfo/statnet_help__;!!CzAuKJ42GuquVTTmVmPViYEvSg!PIMlwD8u8-cpeHuP5HSDGbuoFoVxNJpNHWFNRR4wtPvoklBOIcaXy0NuvyJDTa4NoNuxLaZRtd5xgfO0cCQ5640i$>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20231030/8001781d/attachment.html>
More information about the statnet_help
mailing list