[Rsiena-help] nodeset for dyadic covariate in co-evolution 1-mode 2-mode model

marco tonellato m.tonellato at gmail.com
Thu Sep 8 17:34:32 CEST 2011


Dear all,

I had a problem when trying to specify the data (with sienaDataCreate) for a
coevolution of 1-mode and 2-mode networks model.

In particular, the problem lies with the nodeSet attribute of a unimodal
constant dyadic covariate (geographical distance between hospitals)

This is the code I used:

first i defined the different nodesets for the two sets of actors

> nrhosp <- dim(exchange1)[1]
> nrspec <- dim(setting1)[2]
> hosp <- sienaNodeSet(nrhosp, nodeSetName="hosp")
> spec <- sienaNodeSet(nrspec, nodeSetName="spec")

then i defined the network dependent variables

> setting <-
sienaNet(array(c(setting1,setting2,setting3),dim=c(nrhosp,nrspec,3)),"bipartite",nodeSet=c("hosp","spec"))

> exchange <- sienaNet(array(c(exchange1,
exchange2,exchange3),dim=c(nrhosp,nrhosp,3)),nodeSet="hosp")

then I imported the dyadic covariate (among others)

> geodist <-
coDyadCovar(as.matrix(read.table("geo_dist.txt")),nodeSet="hosp")

then I combined the data

> bipData <-
sienaDataCreate(exchange,setting,geodist,lhu,policl,nbeds,nspec,occrate,degmedia,icm,
nodeSets=list(hosp,spec))


which gives me the following error:

Error in validNodeSet(nattr[2], ncol(thisdycCovar)) : node set not found

if I remove the dyadic covariate then it works perfectly fine.

Can you please help on that?

Thanks a lot.

Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rsiena-help/attachments/20110908/217d5c15/attachment.htm>


More information about the Rsiena-help mailing list