Pages

Monday, 23 June 2014

Transforming NetLogo Simulated Networks into UCINET for Analysis

There's a program called NetLogo. It's an open-source agent-based modeling program. And it's awesome, although you have to spend some time with it. There are some example models that are automatically downloaded into a library when you download the program, and several of them are network simulators (they'll simulate a virus in a network, diffusion of a directed network, the formation of giant components, preferential attachment, etc).

There's a program called UCINET too. It's a social network analysis program which works with a freeware program called NETWORK which allows you to visualize networks. UCINET can only be run on Windows, and you can get a free trial you 60 days. With it, you can take a network generated in NetLogo and run all sorts of network diagnostics and alter your network image in whatever ways you like (I have yet to figure out if there is a way to keep track of the time variable somehow- perhaps as a link or turtle attribute, which could then be input as a node attribute in NETWORK).

They should probably be able to talk to each other, right? And then you could create rules for behavior in your NetLogo, simulate a network on those rules, analyze that network or a set of random simulations, and see if your rules are creating the types of networks you see in reality. That would be pretty cool, not? In the absence of knowing much about programming, here's a semi-labor intensive way to make this happen (doubtless R or some other program can do a lot of this already):

(1) In NetLogo:
File > Models Library > Networks > Preferential Attachment > Open
Select the Procedures tab
At the very top of Procedures, above the setup procedures, add "turtles-own [ my-list-partners; ]"
In the Main Procedures section, in the "to go" command, add "ask turtles [ set my-list-partners ([who] of link-neighbors) ]" just above the "tick" command
Select the Interface tab (and pray you don't see an error message)
Setup
Go until you have a network you like the size of
File > Export > World... > Save it somewhere
(there may be a more efficient way to create an output with just the variables of interest, but the below commands will work as well)

(2) In Excel:
Open the network's csv file you just created
Delete columns B:M
Delete rows 1:13
Delete rows below your initial ego/alter list (everything including and below "PATCHES")
Edit > Replace... > type in "[" into the "Find what:" space, leave "Replace with:" blank > Replace All > OK
type in "]" into the "Find what:" space, leave "Replace with:" blank > Replace All > OK > Close
Select column B (the commands below might depend on your version of Word)
Data > Text to Columns... > Delimited > Next > select "Space" as the delimiter and deselect "Tab" > Next > Finish
Hand select the frame with the data
Copy

(3) In UCINET 6
Data > Date editors > DL Editor
In the DL Editor, select the data tab
Select the first cell
Paste
Under "Data format:", select "Nodelist (1-mode)"
File > Save UCINET dataset > name it and save it somewhere
Close the DL editor
Visualize > NetDraw

(4) In NetDraw (which is automatically downloaded as part of UCINET)
File > Open > Ucinet dataset > Network
Select your file, which will end with ##h
Click OK

You can play with it from there. There's also an ability to upload attributes into NetDraw (like turtle color or breed), or resize nodes according to their degree, or any of a number of other options. If you're network in NetLogo has several components, UCINET can handle that too. I imagine there's some way to do a lot of the data reformatting/exporting/
importing automatically. You could also probably apply a similar alteration in code to other network models within NetLogo and use the same procedures to get it into UCINET.

Best of luck! Let me know if anything interesting comes of this/you find a more efficient way to accomplish the same thing.


Source: http://sexandstats.blogspot.ie/2011/09/network-analysis-transforming-netlogo.html

Thursday, 12 June 2014

Common Words in Spoken Dialogues

There are a number of words that are common in spoken dialogues that do not occur in written forms. This section discusses how such words should be transcribed. Where possible, we use the spelling from Quirk et al. (1985).

Filled Pauses Filled pauses are very common in natural dialogue. There seem to be two types, ones that sound like "uh" and ones that sound like "um". The endings of these words are often prolonged, thus tempting transcribers to label it is "ummm". Rather, these words should be classified as either "um" or "uh", and transcribed as such. We also include "er", which is more common in British accents. Note that the filled-pauses should never be transcribed as partial words.
umFilled pause.
uhFilled pause.
erFilled pause. More common in British English.

Acknowledgments

The following is a list of commonly occurring acknowledgments, and how they should be spelt.
okayAgreement. Speakers will often produce variants of this, such as "kay", "mkay", "umkay". All of these variants should be spelt as "okay".
uh-huhAgreement.
uh-hmAgreement.
mm-hmAgreement.
uh-uhDisagreement.
mmAgreement, stalling for time
huhRequest for clarification. Puzzlement.
hmStalling for time.
nahInformal version of "no".
nopeInformal version of "no".
a-haInterjection denoting surprise, as in "aha< I found it", rather than "uh-huh" as an acknowledgement ha Interjection, similar to "aha".
ohSurprise. ooh As in "ooh, that's gross."
yeahInformal version of "yes"
yepInformal version of "yes"

Contractions

Contractions, that are common, should be written as one word. The following is a list of common contraction endings. Note that there can often be an ambiguity as to whether the speaker was saying the words as one or as two individual words, especially since words are often blurred together. If in doubt, annotate the word pair as two separate words, spelling out the second in full.
'llfor "will"
'vefor "have"
n'tfor "not"
'refor "are"
'sfor "is"
All other contractions are left to the transcriber's discretion as to whether they should be transcribed as one word or two.
Word Pairs There are some word pairs that are so altered (in pronounciation) that they seem to be one lexical item. Such pairs can be transcribed as single words. Below, we give some common word pairs.
lemmefor "let me"
wannafor "want to"
gonnafor "going to"
gottafor "going to"



Extracted from PostScript by R. Paul McCarty 2001/07/30

Friday, 6 June 2014

On Paper Reading

Paper is not something you should read a large number of, but something you should read a number of times.

Rereading papers can be more useful than starting new papers, conditional on careful selection of papers to read.

A paper is good because it clearly tell you where it comes from and where it goes to, and can inspire readers with various interests.