saltcooky
May 25, 2019
710

# ストリートスナップデータに 統計的ネットワーク分析の適用を試みた

TokyoR #78 LT

May 25, 2019

## Transcript

2. ### ୭ʁ • !TBMUDPPLZ • 3ྺɿ೥͙Β͍͔ͳ • ۈઌɿݪ॓ʹ͋Δ*5ܥͷձࣾ • ࢓ࣄ಺༰ɿ3%తͳ෦ॺͰ3Λ࢖ͬͨ  ɾσʔλ෼ੳ

ׂ   ɾػցֶश ׂ   ɾલॲཧ ׂ  • झຯɿ෰ϑΝογϣϯඒज़ؗ८Γ

͞Μ͕ ൃදͨ͠Γͯͨ͠
4. ### ωοτϫʔΫ෼ੳ Α͋͘Δͷ͸ωοτϫʔΫͷࢦඪͷࢉग़΍ߏ଄ͷநग़ - த৺ੑ  ͲͷΑ͏ͳਓ͕த৺తͳਓ෺͔ - ίϛϡχςΟநग़  ͲͷΑ͏ͳάϧʔϓʹ෼͔Ε͍ͯΔ͔ - ૬ؔ܎਺

̎ͭͷωοτϫʔΫ͸ࣅ͍ͯΔ͔Ͳ͏͔ - ίΞநग़  ωοτϫʔΫͷີʹ݁߹ͨ͠த৺෦෼

L J

ͷลͷൃੜ֬཰

ཁૉͷ਺

11. ### σʔλऔಘ • (\$1্Ͱ%PDLFSΛ༻͍ͯ3TUVEJP 34FMFOJVN؀ڥΛ࡞੒ • SWFTUQBDLBHFΛར༻ͯ͠εΫϨΠϐϯά • ϙΞιϯ෼෍ʹै͏ִؒͰϖʔδऔಘ ͳΜͱͳ͘ 

• ໿Ұ೥෼ਓͷεφοϓσʔλΛऔಘ

13. ### Ϟσϧ࡞੒(ྫ) ࢦ਺ϥϯμϜϞσϧ͸TUBUOFUQBDLBHFͰ࣮૷͕Ͱ͖·͢ɻ # ωοτϫʔΫΦϒδΣΫτͷ࡞੒  network <- as.network(x = graph_matrix, directed

= FALSE, loops = FALSE) # ֤Τοδʹઆ໌ม਺(೥ྸ)Λ௥Ճ network %v% "Age" <- Age # ֤Τοδͷ೥ྸͷࠩΛܭࢉ diﬀ.age <- abs(sweep(matrix(snap_info\$Age, nrow = 638, ncol = 638), 2, snap_info\$Age)) # Ϟσϧ࡞੒  model <- ergm( network ~ edges + edgecov(diﬀ.age) + nodecov(“Age”) )
14. ### Ϟσϧ࡞੒ ࢦ਺ϥϯμϜϞσϧ͸TUBUOFUQBDLBHFͰ࣮૷͕Ͱ͖·͢ɻ # ετϦʔτεφοϓͷp*Ϟσϧੜ੒ snap_net_model <- ergm(snap_net ~   edges

+ # ลͷ਺ nodecov(“Age")+ # ೥ྸࠩ edgecov(diﬀ.age) + # ೥ྸ nodematch(“Occupation”) + # ৬ۀ nodematch("Point") ) # ࡱӨ৔ॴ
15. ### ݁ՌΛݟͯΈΔ > summary(snap_net_model) < ུ > Monte Carlo MLE Results:

Estimate Std. Error MCMC % z value Pr(>|z|) edges -5.2066393 0.2692526 0 -19.337 <1e-04 *** edgecov.diﬀ.age -0.0015763 0.0094767 0 -0.166 0.8679 nodecov.Age -0.0003136 0.0061215 0 -0.051 0.9591 nodematch.Occupation -0.0453192 0.0842853 0 -0.538 0.5908 nodematch.Point 0.1491330 0.0628610 0 2.372 0.0177 *   < ུ > AIC: 13485 BIC: 13536 (Smaller is better.)  ࡱӨ৔ॴ͕ลͷൃੜʹ Өڹ͍ͯͦ͠͏ AIC/BICͰม਺બ୒Մೳ

18. ### • ڞཱग़൛ʮωοτϫʔΫ෼ੳୈ̎൛ʯླ໦౒ஶ  IUUQTXXXBNB[PODPKQFYFDPCJEPT"4*/ • \UJEZHSBQI^ͱ\HHSBQI^ʹΑΔϞμϯͳωοτϫʔΫ෼ੳ  IUUQTXXXTMJEFTIBSFOFULBTIJUBOUJEZHSBQIHHSBQI • 3ʹΑΔωοτϫʔΫ෼ੳΛ·ͱΊ·ͨ͠ωοτϫʔΫͷࢦඪฤ  IUUQTRJJUBDPNTBMUDPPLZJUFNTFEDFEGCDE •

3ʹΑΔωοτϫʔΫ෼ੳΛ·ͱΊ·ͨ͠౷ܭతωοτϫʔΫ෼ੳฤ  IUUQTRJJUBDPNTBMUDPPLZJUFNTCBFGDFCGBDFBDCGD ࢀߟ