stocnet / rsiena

An R package for Simulation Investigation for Empirical Network Analysis
http://www.stats.ox.ac.uk/~snijders/siena/
GNU General Public License v3.0
101 stars 25 forks source link

Some problems encountered in the use of SAOM #105

Closed LinPing-lin closed 2 months ago

LinPing-lin commented 3 months ago

Hello everyone, I've recently been using Rsiena to analyze data from single-mode and two-mode networks, but I seem to be running into some problems, so please help me out.

Note: All networks are undirected

Reference Paper: Koskinen, Johan, and Tom AB Snijders. "Multilevel longitudinal analysis of social networks." Journal of the Royal Statistical Society Series A: Statistics in Society 186.3 (2023): 376-400.

In this article, there is a reference to ”id“ effect, "od" effect,"odd"effect, and "idXod" effect, My question is, is it possible that I want to use these effects in my single-mode network and my two-mode network? How should I go about writing the code?

The key code for this part of the article is as follows: effsr <- setEffect(effsr, outActIntn, name="friends", interaction1="del", parameter=1) effsr <- setEffect(effsr, outPopIntn, name="friends", interaction1="del", parameter=1) effsr <- includeInteraction(effsr, outActIntn, outPopIntn, name="friends", interaction1=c("del","del"), parameter=1) effsr <- setEffect(effsr, from, name="friends", interaction1="del")

When I run the third line of code, it prompts: Error in includeInteraction(effects, outActIntn, outPopIntn, name = "networkB", : Third effect not found** I don't know why this happened.

Kaladani commented 3 months ago

Dear LinPing-lin,

your error message does not correspond to your code, but I suspect that you either missspecified the interaction1 parameters or you are trying to use effects that are only meaningful in a directed network. In general, it would be helpful if you could provide your actual code snippet.

However, these types of questions are better asked on the mailing list at https://groups.io/g/RSiena - the github issues are meant for bug descriptions or requests for new features.

Best Regards, Daniel

TomSnijders commented 2 months ago

Further see https://groups.io/g/RSiena