[R] ergm crashes
Iasonas Lamprianou
lamprianou at yahoo.com
Sun Sep 19 14:50:02 CEST 2010
Dear all, I am doing a social network analysis using ergm. I import a rectangular matrix of data and then I build a network using the following command: ng <-network(mat,directed=FALSE)
I then attach vertex names using commands like this: set.vertex.attribute(ng,"SchoolType",mSchType) where SchoolType can take six different/unique values.
Then, I run ergm models successfully using commands like the following:
m3 <- ergm(ng ~ edges+nodefactor("Gender")+nodefactor("SchoolType"))
But if I try to run a command with the parameter nodematch, R crashes with no excuses and no error messages (I use windows Vista and the latest R version and all packages are fully updated). I use commands (and they crash) like the following:
m3 <- ergm(ng ~ edges+ nodefactor("Gender")+ nodematch("SchoolType"))
Can anyone help me with ideas about what might be wrong? It may be interesting the fact that if I use one of the 'classic' examples, please see below, it does not crash but actually gives results.
Any ideas about how to solve the issue? I suspect that something might be wrong with my data, but I do not know what.
'classic; example that works:
data(faux.mesa.high) # Let’s try a larger network
mesa <- faux.mesa.high
plot(mesa)
summary(mesa)
plot(mesa, vertex.col='Grade')
legend(“bottomleft”,fill=7:12,legend=paste(“Grade”,7:12),cex=0.75)
fauxmodel.01 <- ergm(mesa ~edges + nodematch('Grade',diff=T) +nodematch('Race',diff=T) )
summary(fauxmodel.01)
Dr. Iasonas Lamprianou
Assistant Professor (Educational Research and Evaluation)
Department of Education Sciences
European University-Cyprus
P.O. Box 22006
1516 Nicosia
Cyprus
Tel.: +357-22-713178
Fax: +357-22-590539
Honorary Research Fellow
Department of Education
The University of Manchester
Oxford Road, Manchester M13 9PL, UK
Tel. 0044 161 275 3485
iasonas.lamprianou at manchester.ac.uk
More information about the R-help
mailing list