interactive graphs with stata
play

Interactive Graphs with Stata Introduction NCA Coincidence Types - PowerPoint PPT Presentation

Interactive Graphs with Stata M.E. et al. Interactive Graphs with Stata Introduction NCA Coincidence Types M. Escobar (modesto@usal.es) P. Cabrera (pablocal@usal.es) Graphs Adjacency C. Prieto (cprietos@usal.es) D. Barrios (metal@usal.es)


  1. Interactive Graphs with Stata M.E. et al. Interactive Graphs with Stata Introduction NCA Coincidence Types M. Escobar (modesto@usal.es) P. Cabrera (pablocal@usal.es) Graphs Adjacency C. Prieto (cprietos@usal.es) D. Barrios (metal@usal.es) Example coin University of Salamanca netcoin Remarks 2019 Spanish Stata Users Group meeting Final Madrid, 17 th October

  2. Presentation Aims Interactive The aims of this presentation are: Graphs with • To show network coincidence analysis , which is a Stata statistical framework to study concurrence of events. M.E. et al. • To present coin , an ado program that is able to perform Introduction this analysis. NCA Coincidence • To show interactive graphs with Stata with the command Types Graphs netcoin . Adjacency Example • As an example, an analysis of people in the picture albums coin of an eminent character in the early 20 th century will be netcoin presented. Remarks • This kind of representations can also be applied to Final • Social media analysis. • Content analysis of media and textbooks. • Multiresponse, glm and sem analysis in questionnaires. • Historical representation of eminent figures.

  3. Coincidence analysis Definition Interactive Graphs • Coincidence analysis is a set of techniques whose object is with Stata to detect which people, subjects, objects, attributes or M.E. et al. events tend to appear at the same time in different Introduction delimited spaces. NCA • These delimited spaces are called n scenarios, and are Coincidence Types considered as units of analysis ( i ). Graphs Adjacency • In each scenario a number of J events X j may occur (1) or Example coin may not (0) occur. netcoin • We call incidence matrix ( X ) an n × J matrix composed Remarks by 0 and 1, according to the incidence or not of every Final event X j . • In order to make comparative analysis of coincidences, these scenarios may be classified in H sets

  4. An example of incidences matrix Meeting the people Interactive Graphs with Stata M.E. et al. Introduction NCA Coincidence Types Graphs Adjacency Example coin netcoin Remarks Final

  5. An example of incidences matrix Coding the people Interactive Graphs with Stata M.E. et al. Introduction NCA Coincidence Types Graphs Adjacency Example coin netcoin Remarks Final

  6. Input of the analyses Incidences matrix (appearance or not appearance of 8 events in 4 scenarios) Interactive Graphs with Stata M.E. et al. The input of the analysis is a X matrix constructed with i rows Introduction representing scenarios, and the j columns representing events: NCA Coincidence Types  1 1 1 1 1 1 1 1 1 0 1  Graphs Adjacency 1 1 1 1 1 1 1 1 1 0 0   Example X =   0 1 0 1 1 1 1 1 1 1 1 coin   1 1 0 1 1 1 1 1 1 1 0 netcoin Remarks Final

  7. Coincidences matrix Definition Interactive Graphs with Stata M.E. et al. • From the incidence matrix ( X ), the coincidences matrix Introduction ( F ) can be obtained by NCA F = X ′ X Coincidence • where each element f jk represents the number of scenarios Types Graphs where X j and X k are both 1, that is to say, the two events Adjacency Example coincide. coin • As may be imagined, there are special elements ( f jj ) in the netcoin Remarks diagonal, which represent the number of incidences of X j Final in the n scenarios.

  8. Example of coincidences matrix Coincidences matrix (co-appearances in the pictures) Interactive The symmetric F matrix is compose by i rows and j columns Graphs with representing incidences (diagonal) and coincidences of events: Stata M.E. et al.   3 Introduction 3 4   NCA   2 2 2 Coincidence   Types   3 4 2 4 Graphs   Adjacency   3 4 2 4 4   Example   F = coin 3 4 2 4 4 4     netcoin 3 4 2 4 4 4 4     Remarks 3 4 2 4 4 4 4 4     Final 3 4 2 4 4 4 4 4  4     1 2 0 2 2 2 2 2 2 2    1 2 1 2 2 2 2 2 2 1 2

  9. 3 grades of coincidence Mere and probable events Interactive Graphs with Stata • Two events ( X j and X k ) are defined as 1) merely M.E. et al. coincident if they occur in the same scenario at least once: Introduction [ ∃ i ( x ij = 1 ∧ x ik = 1 )] ∨ f jk ≥ 1 NCA Coincidence Types Graphs Adjacency • Additionally, two events ( X j and X k ) are defined as 2) Example coin conditionally coincident if they occur more frequently netcoin than if they are independent: Remarks f jk > f jj f kk Final n

  10. 3 grades of coincidence (cont.) Statistically probable events Interactive Graphs with • And two events are 3) statistically conditional if the Stata joint frequency of their events meets one of the following M.E. et al. inequalities: Introduction NCA P ( r jk ≤ 0 ) < c Coincidence Types P ( θ jk ≤ 1 ) < c Graphs Adjacency Example P ( p ( X j ) − p ( X j | X k ) ≤ 0 ) < c coin netcoin Remarks • where r jk is the Haberman residual, θ jk is the odd ratio, Final and the third equation represents a one tailed Fisher exact test. Furthermore, c is the selected level of significance, normally 0.05)

  11. Statistical dependence Measurement Interactive Graphs with Stata M.E. et al. Introduction • Haberman residuals ( r jk ) with normal distribution may be NCA used to assess statistically conditional events: Coincidence Types f jk − f jj f kk Graphs Adjacency n r jk = Example � f jj f kk ( n − f jj )( n − f kk ) coin n 3 netcoin Remarks Final

  12. Graph Definition Interactive Graphs with Stata M.E. et al. Introduction NCA • “A graph G consist of two sets of information: a set of Coincidence Nodes (events), N = { n 1 , n 2 , ..., n g } , and a set of lines Types Graphs (adjacencies), L = { l 1 , l 2 , ..., l L } between pair of nodes ”. Adjacency Example (Wasserman and Faust 1994). coin netcoin Remarks Final

  13. Adjacencies Elaboration of the adjacency matrices Interactive • From the residual matrix, an adjacency J × J matrix A Graphs with Stata may be elaborated with all the elements equal to 0, but 1 M.E. et al. in the case where r jk is significantly below the level c . Introduction A [ j , k ] = 1 ⇔ [ P ( r jk ≤ 0 ) < c ] ∧ j � = k NCA Coincidence • By extension, other adjacency matrices can be elaborated Types Graphs following Adjacency Example • The mere coincidence criterion coin netcoin A [ j , k ] = 1 ⇔ f jk ≥ 1 Remarks Final • Or the conditional coincidence criterion A [ j , k ] = 1 ⇔ [ P ( r jk ≤ 0 ) < 0.5 ] ∧ j � = k

  14. Graph representation Fruchterman-Reingold layout Interactive Graphs with Stata M.E. et al. Introduction NCA Coincidence Types Graphs Adjacency Example coin netcoin Remarks Final

  15. Social network programs Stata program Interactive • Stata has no tools for SNA. Graphs with Stata • However, some advanced users have begun to write some M.E. et al. routines. I wish to highlight the following works from which I have obtained insights: Introduction • Corten (2010) wrote a routine to visualize social networks NCA Coincidence [ netplot ]. Types • Mihura (2012) created routines (SGL) to calculate Graphs Adjacency networks centrality measures, including two Stata Example commands [ netsis and netsummarize ]. coin • Afterwards, White (2013) presented a suite [ network ] of netcoin Stata programs for meta-analysis which includes the Remarks network graphs of Anna Chaimani in the UK. users group Final meeting. • And Grund (2013-2018, forthcoming) have presented a collection of programs to plot and analyze social networks [ nwcommands ].

  16. coin What is it? Interactive • coin is an ado program in its development phase, which is Graphs with capable of performing coincidence analysis. Stata • Its input is a dataset with scenarios as rows and events as M.E. et al. columns. Introduction • Its outputs are: NCA Coincidence • Different matrices (frequencies, percentages, residuals (3), Types Graphs distances, adjacencies and edges). Adjacency • Several bar graphs, network graphs (circle, mds, pca, ca, Example biplot) and dendrograms (single, average, waverage, coin complete, wards, median, centroid). netcoin • Measures of centrality (degree, closeness, betweenness, Remarks information) (eigenvector and power) Final • Options to export to excel and .csv files. • Its syntax is simple, but flexible. Many options such as output, bonferroni, p value, minimum, special event, graph controls, ...

  17. Command coin Interactive Graphs with Stata � � � � � � � � coin varlist if in weight , options M.E. et al. Options can be classified into the following groups: Introduction • Outputs : f , g , v , h , e , r , s , n , ph , o , po , pf , t , a , d , l , NCA Coincidence c , all , x , xy . Types Graphs • Controls : head( varlist ), variable( varname ), ascending, Adjacency Example descending, minimum (#), support(#), pvalue(#), coin levels(# # #), bonferroni, lminimum(#), iterations(#). netcoin • Plots Remarks • Bar: bar, cbar( varname ) Final • Graph: plot(circle | mds | ca | pca | biplot) • Dendrograms: dendrogram(single | complete | average | wards)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend