## SOCNET@LISTS.UFL.EDU

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Re: Significance in a Triad Census

From:

Mark S. Handcock

Date:

Fri, 26 Jun 2009 10:59:26 -0700

Content-Type:

text/plain

Parts/Attachments:

 text/plain (173 lines)
 ```***** To join INSNA, visit http://www.insna.org ***** Dear Richard, Another approach that I like is to use the "triadcensus" term in the R package "ergm". For example, for a version of Sampson's "liking" data: # Load the package library(ergm) # Load the data data(sampson) # What is the triad census? > summary(samplike ~ triadcensus)  triadcensus.012 triadcensus.102 triadcensus.021D triadcensus.021U              205 190 12 24 triadcensus.021C triadcensus.111D triadcensus.111U triadcensus.030T               24 68 34 5 triadcensus.030C triadcensus.201 triadcensus.120D triadcensus.120U                0 35 15 6 triadcensus.120C triadcensus.210 triadcensus.300                5 18 8 #So no 030C triads. Fit a model without them, conditioning on the number of edges: >summary(ergm(samplike ~ triadcensus(c(1:8,10:15)),constraints=~edges)) ========================== Summary of model fit ========================== Formula: samplike ~ triadcensus(c(1:8, 10:15)) Newton-Raphson iterations: 6 MCMC sample of size 10000 Monte Carlo MLE Results:                  Estimate Std. Error MCMC s.e. p-value triadcensus.012 0.28455 0.12531 0.004 0.023890 * triadcensus.102 0.68510 0.17680 0.003 0.000132 *** triadcensus.021D -0.75819 0.27592 0.003 0.006372 ** triadcensus.021U 0.32146 0.26072 0.004 0.218592 triadcensus.021C 0.29910 0.21705 0.003 0.169254 triadcensus.111D 0.92183 0.26354 0.003 0.000542 *** triadcensus.111U -0.48680 0.18529 0.002 0.009061 ** triadcensus.030T -0.86231 0.53972 0.007 0.111191 triadcensus.201 -0.27605 0.12509 0.002 0.028097 * triadcensus.120D 0.95660 0.07497 0.001 < 1e-04 *** triadcensus.120U -1.01444 0.18354 0.002 < 1e-04 *** triadcensus.120C -0.55847 0.21630 0.002 0.010312 * triadcensus.210 -0.87899 0.11918 0.001 < 1e-04 *** triadcensus.300 -1.74996 0.15365 0.002 < 1e-04 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1     Null Deviance: 424.21 on 306 degrees of freedom  Residual Deviance: 203.93 on 292 degrees of freedom           Deviance: 220.27 on 14 degrees of freedom   AIC: 231.93 BIC: 284.06 The p-values for each triad type are given. For example, there are statistically significantly more 102 triads than would be expected under a Erdos-Renyi model. As the usual caveat, the p-values are based on the curvature of the log-likelihood which does not have the same asymptotic justification as in, for example, logistic regression. One can do an exact test based on the "ergm" "simulate" command and compute a (Monte-Carlo) exact p-value if you want to see if they differ much (or at all). If you just want to test for triangles then I would use: > summary(ergm(samplike ~ triangle, constraints=~edges)) ========================== Summary of model fit ========================== Formula: samplike ~ triangle Newton-Raphson iterations: 6 MCMC sample of size 10000 Monte Carlo MLE Results:          Estimate Std. Error MCMC s.e. p-value triangle 0.14196 0.01975 0.007 <1e-04 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1     Null Deviance: 424.206 on 306 degrees of freedom  Residual Deviance: 409.821 on 305 degrees of freedom           Deviance: 14.385 on 1 degrees of freedom   AIC: 411.82 BIC: 415.54 which clearly indicates triadic structure. Further information can be found at http://statnet.org Cheers, Mark for the statnet development team ------------------------------------------------- Mark S. Handcock Professor of Statistics Department of Statistics, B313 Padelford Hall University of Washington, Box 354322 Phone: (206) 543-6774 Seattle, WA 98195-4322. FAX: (206) 457-1953 Web: www.stat.washington.edu/~handcock internet: [log in to unmask] On 6/26/09 7:39 AM, "Richard Heidler" <[log in to unmask]> wrote: > ***** To join INSNA, visit http://www.insna.org ***** > > Dear list members, > > > > Does someone know how to calculate significances for the triads in a triad > census? I know this should be easy, but neither pajek, nor R is calculating > the significances of the different triad types. Which software could be used > (the network is rather big with 2131 actors) ? > > > > Kind regards > > > > Richard Heidler > > > > > ---------------------------------- > > > > Richard Heidler > Deutsches Forschungsinstitut für öffentliche Verwaltung Speyer (FÖV) > Postfach 1409 > D-67324 Speyer > > > > Tel.: 06232/654-429 > Fax: 06232/654-418 > Mail: [log in to unmask] > > > > > http://www.foev-speyer.de/Ueberuns/Mitarbeiter/heidler.asp > > > > > _____________________________________________________________________ > SOCNET is a service of INSNA, the professional association for social > network researchers (http://www.insna.org). To unsubscribe, send > an email message to [log in to unmask] containing the line > UNSUBSCRIBE SOCNET in the body of the message. _____________________________________________________________________ SOCNET is a service of INSNA, the professional association for social network researchers (http://www.insna.org). To unsubscribe, send an email message to [log in to unmask] containing the line UNSUBSCRIBE SOCNET in the body of the message.```