Superdiffuser Model of Behavior Change in a Network
Model was written in NetLogo 6.3.0
•
Viewed 46 times
•
Downloaded 5 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
extensions [ nw] turtles-own [ adopted? ; whether or not the turtles have adopted the innovation pers-one ; likelihood of an adopted turtle choosing link neighbor who has not adopted and trying to persuade them attitude ; attitude towards adopting the behavior pers-power ; how much a turtle adds to the attitude of another turtle if they target it adopt-friends ; how many link neighbors have adopted, this is for the social influence variable non-adopt-friends ; how many link neighbors have not adopted message ] ; keeps track of message most recently received globals [ status-quo? ; sets up the counter to count change for a stop condition status-quo-counter initial-degree ;these next four are for the variables of the seeded agents initial-between initial-pers-power initial-pers-likely adopted-at-tick init-adopted2 ] to setup ca reset-ticks set status-quo? false set status-quo-counter 0 ; for the stop code for no change in attitude nw:generate-preferential-attachment turtles links num-agents min-links ; sets up preferential attachment network repeat 30 [ layout-spring turtles links 0.2 5 1 ] ; makes the network look nicer ;new code assigning adoption ask turtles [set adopted? false] set init-adopted2 ((num-agents) * (percent-adopted-start)) ask n-of init-adopted2 turtles [set adopted? true] ask turtles [ set shape "person" set message 0 set-pers-one set-attitude set-pers-power recolor] ;these four calculate the values for the seeded agents set initial-degree mean ( [ count link-neighbors ] of turtles with [ adopted? = true ] ) set initial-between mean ( [ nw:betweenness-centrality ] of turtles with [ adopted? = true ] ) set initial-pers-power mean [pers-power] of turtles with [adopted? = true] set initial-pers-likely mean [pers-one] of turtles with [adopted? = true] set adopted-at-tick count turtles with [adopted? = true] end to set-pers-one ; turtle process set pers-one ( random-normal avg-pers-one 20 ) ; randomly assigns the the likelihood that a turtle will try to persuade another turtle at a tick if pers-one > 100 [ set pers-one 100 ] ; the avg-pers-one slider sets the mean such that a higher setting means that more of the turtles will want to persuade if pers-one < 0 [ set pers-one 0 ] end to set-attitude ; turtle process set attitude ( random-normal avg-attitude 1 ) ; sets up turtles' start attitude, below the lowest adoption threshold and at least 1 like a 1-7 likert scale if attitude > 3.9 [ set attitude 3.9 ] if attitude < 1.0 [ set attitude 1.0 ] end to set-pers-power ; turtle process set pers-power ( random-normal avg-pers-power .1 ) if pers-power > 2 [ set pers-power 2 ] if pers-power < 0 [ set pers-power 0 ] end to recolor ifelse adopted? = true [ set color red ] [ set color white ] end to update-friends ; turtle process set adopt-friends count link-neighbors with [ adopted? = true ] ; updates number of adopted friends to use in the social influence calculation set non-adopt-friends count link-neighbors with [ adopted? = false ] end ;next 4 reporters are created to record values of agents seeded with adoption to-report init-degree report initial-degree end to-report init-between report initial-between end to-report init-pers-power report initial-pers-power end to-report init-pers-likely report initial-pers-likely end ;next four reporters report the agent values at each tick to-report report-betweenness ; creates the data for the monitor labeled betweenness centrality of adopted let adopted-betweenness mean ( [ nw:betweenness-centrality ] of turtles with [ adopted? = true ] ) report adopted-betweenness end to-report report-betweenness-all ; creates the data for the monitor labeled betweenness centrality let betweenness-all mean ( [ nw:betweenness-centrality ] of turtles) report betweenness-all end to-report report-degree ; creates the data for the monitor labeled degree centrality of adopted let adopted-degree mean ( [ count link-neighbors ] of turtles with [ adopted? = true ] ) report adopted-degree end to-report report-degree-all ; creates the data for the monitor labeled degree centrality let degree-all mean ( [ count link-neighbors ] of turtles) report degree-all end to-report report-pers-power let adopt-pers-power mean [pers-power] of turtles with [adopted? = true] report adopt-pers-power end to-report pers-likely-adopted let adopt-pers-likely mean [pers-one] of turtles with [adopted? = true] report adopt-pers-likely end to-report global-clustering-coefficient let closed-triplets sum [ nw:clustering-coefficient * count my-links * (count my-links - 1) ] of turtles let triplets sum [ count my-links * (count my-links - 1) ] of turtles report closed-triplets / triplets end to go let status-quo-before? status-quo? set status-quo? true ask turtles [ update-friends ; friends updated at the start of each tick if adopted? = true and non-adopt-friends > 0 [ persuade ] ; persuasive attempts are only made by adopters if adopted? = false [ update-attitude ] ] ; attitude change only happens among non-adopters ifelse status-quo-before? = true and status-quo? = true [ set status-quo-counter status-quo-counter + 1 ] [ set status-quo-counter 0 ] tick if ticks < 1001 [set adopted-at-tick sentence (adopted-at-tick) (count turtles with [adopted? = true])] if status-quo-counter = 50 [ stop ] if ( not any? turtles with [ not adopted? ] ) [ stop ] ; if the go is switched to run forever, it will stop if the whole network has adopted end to persuade ; turtle process if ( random 100 < pers-one ) [ ask one-of link-neighbors with [ adopted? = false ] [ set message [ pers-power ] of myself ] ] ; target will keep track of pers-power as message, to be used in update-attitude end to update-attitude ; turtle process let old-attitude attitude ; sets up the check for attitude changes this tick set attitude attitude + message + ( adopt-friends * social-influence ) ; attitude will change based on most recent message received AND social influence if attitude > 7 [ set attitude 7 ] ; make sure attitude can't go over max for Likert scale if attitude >= adopt-threshold [ set adopted? true ] ; any turtle that reached the threshold will be set to adopted recolor ; updates color based on adoption set message 0 ; resets message variable to 0 if old-attitude != attitude [ set status-quo? false ] ; indicates if there has been any attitude change this tick end
There is only one version of this model, created 3 months ago by Christopher Carpenter.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Superdiffuser Model of Behavior Change in a Network.png | preview | Preview for 'Superdiffuser Model of Behavior Change in a Network' | 3 months ago, by Christopher Carpenter | Download |
This model does not have any ancestors.
This model does not have any descendants.