Upgrade to Pro — share decks privately, control downloads, hide ads and more …

effectsパッケージを用いた一般化線形モデルの可視化 /NagoyaR15

Yu Tamura
March 28, 2016

effectsパッケージを用いた一般化線形モデルの可視化 /NagoyaR15

ロジスティック回帰や多項ロジスティック回帰などの一般化線形モデルを用いた分析の結果を図示するためのeffectsパッケージの紹介をします。

Yu Tamura

March 28, 2016
Tweet

More Decks by Yu Tamura

Other Decks in Research

Transcript

  1. ීஈ͸͠ͳ͍ࣗݾ঺հ • ໊લ • ాଜ༞ • ॴଐ • ໊ݹ԰େֶେֶӃࠃࡍ։ൃݚڀՊത࢜ޙظ՝ఔ •

    ݚڀ෼໺ • ୈೋݴޠशಘɼ৺ཧݴޠֶɼจ๏ࢦಋ • Rྺ • ҰੜΤϯυϢʔβʔʢ3೥͘Β͍ʣ 3
  2. αϯϓϧσʔλᶃ • Cowles • Cowles, M., & Davis, C. (1987).

    The subject matter of psychology: Volunteers. British Journal of Social Psychology, 26, 97–102. • 4ม਺ • neuroticismʢ৘ॹෆ҆ఆੑʣ • extraversionʢ֎޲ੑʣ • sexʢੑผʣ • volunteerʢࠓޙͷௐࠪʹࣗओతʹࢀՃ͢Δ͔ʣ • Yes or Noͷ2୒ 6 ΞΠθϯΫੑ֨ ݕࠪͷείΞ
  3. 12

  4. ਤࣔͯ͠ΈΔ >eff.cowles <-allEffects(model2, xlevels =list(extraversion = seq(0,24,6)),given.values=c(sexmale = 0.5)) 15

    ͜ͷதʹGLMͷग़ ྗ͕ೖ͍ͬͯΔ xlevelsͰx࣠ͷ໨੝Γ Λࢦఆ ۠੾Γͷࢦఆɻʮ0͔Β 24·ͰΛ6ͣͭʯҙຯ ͜͏͢Δ͜ͱͰɼϞσϧ ͷத͔Βਤࣔʹඞཁͱͳ ΔΦϒδΣΫτΛ࡞Δ
  5. 18

  6. 19 extraversion = 0 extraversion = 6 extraversion = 12

    extraversion = 18 extraversion = 24
  7. 23

  8. • 10ม਺ • vote • Ͳͷ੓ౘʹ౤ථ͔ͨ͠ • Conservative, Labour, Liberal

    Democratͷ3ͭ • age • ೥ྸ • economi.cond.national • ݱࡏͷࠃͷܦࡁঢ়گʢ1-5Ͱධఆʣ • economic.cond.household • ݱࡏͷՈܭͷܦࡁঢ়گʢ1-5Ͱධఆʣ • Blair • ࿑ಇౘౘटBlairͷධՁʢ1-5Ͱධఆʣ • Hague • อकౘౘटHagueͷධՁʢ1-5Ͱධఆʣ • Kennedy • ࣗ༝ຽओౘౘटKennedyͷධՁʢ1-5Ͱධఆʣ • Europe • Ԥभջٙओٛʹର͢Δଶ౓ʢ1-11Ͱධఆʣ • ਺஋͕ߴ͍΄ͲԤभջٙओٛత • political.knowledge • ͦΕͧΕͷౘ͕Ԥभջٙओٛʹରͯ͠Ͳ͏͍ͬͨϙδγϣϯΛऔ͍ͬͯΔ͔ʹؔ͢Δ஌ࣝʢ0-3 Ͱධఆʣ • gender • male͔female͔ͷ2ਫ४ 25
  9. • 10ม਺ • vote • Ͳͷ੓ౘʹ౤ථ͔ͨ͠ • Conservative, Labour, Liberal

    Democratͷ3ͭ • age • ೥ྸ • economi.cond.national • ݱࡏͷࠃͷܦࡁঢ়گʢ1-5Ͱධఆʣ • economic.cond.household • ݱࡏͷՈܭͷܦࡁঢ়گʢ1-5Ͱධఆʣ • Blair • ࿑ಇౘౘटBlairͷධՁʢ1-5Ͱධఆʣ • Hague • อकౘౘटHagueͷධՁʢ1-5Ͱධఆʣ • Kennedy • ࣗ༝ຽओౘౘटKennedyͷධՁʢ1-5Ͱධఆʣ • Europe • Ԥभջٙओٛʹର͢Δଶ౓ʢ1-11Ͱධఆʣ • ਺஋͕ߴ͍΄ͲԤभջٙओٛత • political.knowledge • ͦΕͧΕͷౘ͕Ԥभջٙओٛʹରͯ͠Ͳ͏͍ͬͨϙδγϣϯΛऔ͍ͬͯΔ͔ʹؔ͢Δ஌ࣝʢ0-3 Ͱධఆʣ • gender • male͔female͔ͷ2ਫ४ 28 ैଐม਺ ಠཱม਺
  10. ࢀߟจݙ Cowles, M., & Davis, C. (1987). The subject matter

    of psychology: Volunteers. British Journal of Social Psychology, 26, 97–102. Fox, J. (2003) Effect displays in R for generalised linear models. Journal of Statistical Software, 8, 1–27, doi: 10.18637/jss.v008.i15 Fox, J., Weisverg, S., Friendly, M., & Hong, J (2016) effects [R package version 3.0-7] Retrieved from https://cran.r-project.org/ package=effects 43