[statnet_help] Question about including an interaction effect
in REM
SJ C via statnet_help
statnet_help at u.washington.edu
Sun Aug 11 01:25:52 PDT 2024
Dear Carter,
I really appreciate your detailed explanation!
I am expecting the interaction effect to "act as a predictor for individual
sending rates."
In addition, my interest is in "the log sending rate for an event from
vertex i to vertex j varying with θ x_i y_i (a CovSnd interaction between x
and y)."
If this is the case, how can I modify the code below that I previously
posted?
rem.dyad(networkdata, n = 200, effects = c("CovSnd","CovRec", "CovEvent",
"NIDRec","NIDSnd",
"NODSnd","NODRec",
"PSAB-BA",
"RRecSnd", "RSndSnd"),
covar = list(CovSnd = cbind(A.cat, B.con),
CovRec= cbind(A.cat, B.con),
CovEvent = abind(same.A.cat
<http://same.a.cat/>, A.cat*B.con, along=0)),
ordinal=TRUE, hessian = TRUE)
Thank you for your kind support!
Sincerely,
Choi
2024년 8월 5일 (월) 오전 8:22, Carter T. Butts via statnet_help <
statnet_help at u.washington.edu>님이 작성:
> Hi, Choi
>
> You can certainly include interaction effects by using products as
> covariates (just as you would in e.g. a regression context). You do,
> however, need to think carefully about what you expect these effects to do,
> and whether you want them to act as predictors for individual sending rates
> (CovSnd), predictors for individual receipt rates (CovRec), or predictors
> for pairwise specific events (CovEvent). Also, it is important to
> distinguish between an effect that says that e.g. the log sending rate for
> an event from vertex i to vertex j varies with θ x_i y_i (a CovSnd
> interaction between x and y), and a model that says that the log sending
> rate for an event from vertex i to vertex j varies with θ x_i y_j. Those
> are very different models, with the latter saying that the product between
> the sender's x value and the receiver's y value modifies the i->j
> interaction rate. I'm not sure what you intend here, so I cannot tell
> whether you are doing what you want to be doing, but all of these are
> straightfoward to implement using appropriate covariate specifications.
>
> Vis a vis testing hypotheses across models, the usual considerations apply
> as they would in other maximum likelihood scenarios (i.e., you can do it,
> depending on what assumptions/approximations you are willing to make, and
> the details may depend on your scenario). For the most obvious base case,
> if you have two models A and B on independent data sets of reasonable size,
> then (coef_A - coef_B)/sqrt(se(coef_A)^2 + se(coef_B)^2) for respective
> coefficients coef_A from A and coef_B from B should be approximately
> standard normal (leading to a z-test for equality of coefficients). If
> you want a Bayesian answer for the probability that coef_A > coef_B, fit
> both models using the BSIR method and look at the respective fraction of
> posterior draws (pairing A and B) for which coef_A is greater than coef_B.
>
> Hope that helps,
>
> -Carter
> On 7/31/24 6:48 PM, SJ C via statnet_help wrote:
>
> Dear all,
>
> May I ask a question about including an interaction effect in REM?
> As illustrated in the code below, let's say I have two variables, A.cat
> (categorical) and B.con (continuous).
>
> rem.dyad(networkdata, n = 200, effects = c("CovSnd","CovRec", "CovEvent",
> "NIDRec","NIDSnd",
> "NODSnd","NODRec",
> "PSAB-BA",
> "RRecSnd", "RSndSnd"),
> covar = list(CovSnd = cbind(A.cat, B.con),
> CovRec= cbind(A.cat, B.con),
> CovEvent = abind(same.A.cat
> <https://urldefense.com/v3/__http://same.A.cat__;!!CzAuKJ42GuquVTTmVmPViYEvSg!O4iVbsPlR-Obu67qMPZFlFsScm-aVJ4_EBM1ZUpI65bhpi_4Bg6N6plaSjMvp66VdzYzmS17AM3_VDJ8EVuWlLopOep2$>,
> A.cat*B.con, along=0)),
> ordinal=TRUE, hessian = TRUE)
>
> To create their interaction effect, I formed a matrix by inserting
> senders' A.cat values into all columns except the diagonal.
> Additionally, I did the same thing with senders' B.con values and
> mean-centered them.
> Then, I multiplied these two matrices, which is represented as A.cat*B.con
> in the code.
>
> My questions are:
> 1. Can the interaction term be inserted into the REM in the way described
> above?
> 2. Should I also include A.cat and B.con(centered) as components in the
> CovEvent code, along with A.cat*B.con?
>
> Besides these questions, I am also curious whether there are any measures
> or indices that can compare the statistical significance of coefficients
> between two REMs with the same parameters?
>
> It would be greatly appreciated if I can have any responses.
> Thank you!
>
> Sincerely,
> Choi
>
>
> _______________________________________________
> statnet_help mailing liststatnet_help at u.washington.eduhttps://urldefense.com/v3/__http://mailman13.u.washington.edu/mailman/listinfo/statnet_help__;!!CzAuKJ42GuquVTTmVmPViYEvSg!O4iVbsPlR-Obu67qMPZFlFsScm-aVJ4_EBM1ZUpI65bhpi_4Bg6N6plaSjMvp66VdzYzmS17AM3_VDJ8EVuWlFfRQDZd$
>
> _______________________________________________
> statnet_help mailing list
> statnet_help at u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20240811/4df8ff41/attachment.html>
More information about the statnet_help
mailing list