[statnet_help] ego.ergm popsize

Michał Bojanowski michal2992 at gmail.com
Thu Nov 23 07:12:30 PST 2023


Thanks. The output of summary() suggests that you don't have any nodal
attribute variables in the `f.ego` object. No `Type` variable in
particular, so ergm.ego is not finding them when fitting the model. Can you
send the output of `str(f.ego)`? Are you sure you've produced that object
correctly?

On Thu, Nov 23, 2023 at 4:06 PM Carine Pachoud <carine.pachoud at hotmail.fr>
wrote:


> Dear Michał,

>

> here the summary for f.ego:

>

> > summary(f.ego)55 Egos/ Ego Networks

> 430 Alters

> Min. Netsize 1

> Average Netsize 7.81818181818182

> Max. Netsize 31

> Average Density 0.674972800136199

> Alter survey design:

> Maximum nominations: Inf

>

>

> I tried on undirected network :

> m17 <- ergm.ego(f.ego ~ edges+ nodefactor ("Type")+ nodematch("Type")+

> nodefactor ("Date")+ nodematch ("Date")+ nodefactor("Commune")+

> nodematch("Commune")+ nodefactor ("Mairie")+ nodematch("Mairie")+ nodecov

> ("LienE")+ nodefactor ("View")+ nodematch("View") +

> gwesp(0.1,fixed=T)+gwdsp (0.1,fixed=T),control =

> control.ergm.ego(ppopsize=990))

>

> and now I get the following message:

>

> Constructing pseudopopulation network.*Error** in `ergm_Init_abort()`:*! In unknown function: ‘Type’ is/are not valid nodal attribute(s).Run `*rlang::last_trace()*` to see where the error occurred.> rlang::last_trace()*<error/rlang_error>**Error** in **`ergm_Init_abort()`**:*! In unknown function: ‘Type’ is/are not valid nodal attribute(s).

>

>

> I do not understand why the attribute is invalid (I tried with the package

> ERGM and it worked).

>

> thank you for the reference, I will read it!

>

> best regards,

> Carine

>

>

> ------------------------------

> *De :* Michał Bojanowski <michal2992 at gmail.com>

> *Envoyé :* jeudi 23 novembre 2023 11:54

> *À :* Carine Pachoud <carine.pachoud at hotmail.fr>

> *Objet :* Re: [statnet_help] ego.ergm popsize

>

> ... and:

>

> 4. The fact that you used snowball sampling to collect data makes

> inference with ergm.ego questionable because it assumes that the data is a

> probabilistic sample of egos. You may need a different model such as

> https://doi.org/10.1016/j.socnet.2015.11.003.

>

> On Thu, Nov 23, 2023 at 3:47 PM Michał Bojanowski <michal2992 at gmail.com>

> wrote:

>

> Thanks Carine. Couple of issues/questions based on what you sent:

>

> 1. Can you please send the output of summary(f.ego) rather than m17? You

> use f.ego when fitting the model.

> 2. The egocentric ERGM implemented in ergm.ego assumes the network is

> undirected. Thus, you'd need to use the undirected variants of the terms

> such as nodefactor only (not nodeifactor and nodeofactor separately).

> 3. Based on what you send for (1) I should be able to tell what's the

> problem with ppopsize and popsize.

>

> Michal

>

> On Thu, Nov 23, 2023 at 3:43 PM Carine Pachoud <carine.pachoud at hotmail.fr>

> wrote:

>

> Hello Michal,

>

> thank you for your quick answer !

>

> Here the call :

> m17 <- ergm.ego(f.ego ~ edges+ nodeifactor ("Type")+ nodeofactor

> ("Type")+nodematch("Type")+ nodeifactor ("Date")+ nodeofactor ("Date")+

> nodematch ("Date")+ nodeifactor("Commune")+nodeofactor("Commune")+

> nodematch("Commune")+ nodeifactor ("Mairie")+ nodeofactor("Mairie")+

> nodematch("Mairie")+ nodeicov ("LienE")+ nodeocov ("LienE")+nodeifactor

> ("View")+ nodeofactor ("View")+nodematch("View") + gwesp(0.1,fixed=T)+gwdsp

> (0.1,fixed=T),control = control.ergm.ego(ppopsize=990))

> summary(m17)

>

> I tried again adding the actual ppopsize : 990 and I get a new message

> error :

>

> Constructing pseudopopulation network.

> Error: Egocentric statistic ‘nodeifactor’ function ‘EgoStat.nodeifactor’ not found.

>

> > summary(m17)Error: object 'm17' not found

>

>

> This message appears for each of the terms.

>

> The study focuses on a territorial agrifood system, including a diversity

> of actors (farmers, elected officials, civil society, advisors...) who have

> different visions of agriculture. In order to understand sustainable

> agrifood transformations, I try to see if the different groups holding

> different visions interact and how is structured the network (ERGM). I used

> a snowball sampling starting from 15 actors, central and in each typology.

>

> best regards,

> Carine Pachoud

>

>

> ------------------------------

> *De :* Michał Bojanowski <michal2992 at gmail.com>

> *Envoyé :* jeudi 23 novembre 2023 11:13

> *À :* Carine Pachoud <carine.pachoud at hotmail.fr>

> *Cc :* statnet_help at u.washington.edu <statnet_help at u.washington.edu>

> *Objet :* Re: [statnet_help] ego.ergm popsize

>

> Hello Carine,

>

> Can you please send the exact offending call that is triggering the error

> together with the output of calling summary() on your data object?

>

> In general, population size (as opposed to the pseudo-population size)

> should correspond to the size of the population network (which is not

> observed in its entirety) you want to make inferences about and from which

> you sampled the egos. This inference is the main goal of the model

> implemented in ergm.ego. If such a population network does not exist or is

> hard to conceive as a theoretical device it might be difficult to interpret

> (some of) the results. What's the purpose of your analysis?

>

> Best,

> Michał

>

>

> On Thu, Nov 23, 2023 at 2:51 PM Carine Pachoud <carine.pachoud at hotmail.fr>

> wrote:

>

> Dear ERGM users,

>

> I previously worked with ERGM on complete networks. Today I am dealing

> with an egocentric network and the package ego.ergm. I have 55 nodes et 274

> edges. I do not know the size of the population.

>

> It's certainly a very simple adjustment to make but I'm stuck on the

> population size. When I want to run my model, I get the following error

> message:

>

> Error in if (ppopsize < sampsize && !is.data.frame(control$ppopsize)) warning("Using a smaller pseudopopulation size than sample size usually does not make sense.") else if (ppopsize == :

> missing value where TRUE/FALSE needed

>

> I tried to fix the ppopsize with control = control.ergm.ego(ppopsize=1000) and also to fix the popsize (popsize=N, control=snctrl(ppopsize=N)), based on your tutorials, but I still have this error message.

>

> Could you help me ?

>

> thanks a lot!

>

> best regards,

> Carine Pachoud

>

>

>

>

> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

> Sans virus.www.avast.com

> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

> _______________________________________________

> 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/20231123/19cc212f/attachment.html>


More information about the statnet_help mailing list