Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

StanとRで折れ線回帰──空間的視点取得課題の反応時間データを説明する階層ベイズモデルを例に──

3.704 visualizaciones

Publicado el

 心理学実験の実データに対し,Stanで階層折れ線回帰分析を行ってみました。Stanコードも載せてあります。この資料は,『StanとRでベイズ統計モデリング』読書会 (Osaka.Stan #6 2017.11.18)のLTで用いたものです。
 12/11追記:このスライドの紹介記事をブログに投稿しました。コピペしやすいStanコードも載せています。
URL: http://bayesmax.sblo.jp/article/181811562.html

Publicado en: Datos y análisis
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

StanとRで折れ線回帰──空間的視点取得課題の反応時間データを説明する階層ベイズモデルを例に──

  1. 1. StanとRで折れ線回帰 空間的視点取得課題の反応時間データを説明する階層ベイズモデルを例に Osaka.Stan #6 2017年11月18日 大阪大学大学院人間科学研究科D2・日本学術振興会 武藤 拓之 (Hiroyuki Muto) Twitter: @mutopsy Web: http://kiso.hus.osaka-u.ac.jp/muto/ 01/19
  2. 2. 自己紹介 武藤 拓之 (むとう ひろゆき) • 大阪大学大学院人間科学研究科D2 研究分野 • 認知心理学 • 主な研究テーマは身体と空間的思考のインタラクション 02/19
  3. 3. これまでの発表 Osaka.Stanで発表した資料 (SlideShareで公開中) 03/19
  4. 4. 折れ線回帰とは ふつうの単回帰 • 1本の直線で近似 折れ線回帰 (segmented regression) • 分割点 (break points) を持つ折れ線で近似 分割点が1つの場合の例 (Muto, Matsushita, & Morikawa, in prep. より) ← 04/19
  5. 5. 折れ線回帰とは ふつうの単回帰 • 1本の直線で近似 折れ線回帰 (segmented regression) • 分割点 (break points) を持つ折れ線で近似 分割点が1つの場合の例 (Muto, Matsushita, & Morikawa, in prep. より) ← 折れ線回帰をベイズでやってみたい。 その前に実際の適用例を説明。 05/19
  6. 6. 空間的視点取得とは 自分とは異なる視点から見た物の位置関係を把握 =空間的視点取得 (spatial perspective taking) 青い人からの 見え方は? 06/19
  7. 7. 角度差の効果 角度差の効果 「自分の視点─取得する視点」間の 角度差が大きいほど反応時間 (RT) が長くなる。 Shorter RT Longer RT 取得する視点の位置まで心的に体を移動させる, 運動シミュレーションが行われている (e.g., Muto et al., in press) 07/19
  8. 8. 角度差の効果の図示 Simple = 単純反応課題, SPT = 空間的視点取得課題 グラフはMuto, Matsushita, & Morikawa (in prep.) より。 08/19
  9. 9. 角度差の効果の原因 (量的 vs. 質的)  視点変換のコストが 量的に増加? 低角度と高角度で 質的に異なる処理? and/or 09/19
  10. 10. 質的な変化を検証する方法の例 (Muto, Matsushita, & Morikawa, in prep.) 1. 相関構造に注目する (see also 武藤・松下・森川, 2016) 2. 関数形に注目する 1つのやり方:折れ線回帰アプローチ 10/19
  11. 11. 折れ線回帰式 折れ線回帰 • 分割点 (break points) を持つ折れ線で近似 分割点が1つの場合の例 (Muto, Matsushita, & Morikawa, in prep. より) ←切片 (b0) 傾き1 (b1) 傾き2 (b2) 分割点 (BP) これらのパラメタを使って 回帰式を表現する 𝑏0 + 𝑏1 𝐴𝑛𝑔𝑙𝑒 if 𝐴𝑛𝑔𝑙𝑒 < 𝐵𝑃 𝑏0 + 𝑏1 𝐵𝑃 + 𝑏2(𝐴𝑛𝑔𝑙𝑒 − 𝐵𝑃) (if 𝐵𝑃 ≤ 𝐴𝑛𝑔𝑙𝑒) 𝑅𝑇 = 11/19
  12. 12. Stanで折れ線回帰 階層折れ線回帰モデルのStanコード例 分割点より高い角度の時の回帰式 全体平均と分散共分散行列から 個人パラメタを生成 (階層モデル) 分割点より低い角度の時の回帰式 12/19
  13. 13. 収束の確認 (N = 96) 収束OK ・・・ 13/19
  14. 14. 推定結果 パラメタ EAP 95%ベイズ信頼区間 BP 100.5 [94.6, 106.3] b0 895.9 [862.1, 931.6] b1 0.581 [0.429, 0.732] b2 5.071 [4.302, 5.873] この前後で処理が質的に変化すると解釈 個々の観測値 推定された回帰折れ線 (EAP) と95%ベイズ信頼区間 観測値の平均値 14/19
  15. 15. 補足(1) 微分が不連続な関数を使ったモデルはStanでは収束しにくい。 条件次第でパラメタが自由になりうるモデルでは注意が必要。 → モデルが複雑になる場合には工夫する必要あり (e.g., なるべくif文を回避し,既存の関数を活用する) 今回の設定は warmup = 500, iter = 8,500, chans=4, thin = 2 → つまり,MCMCサンプルの総数は16,000 15/19
  16. 16. 補足(2) 最尤法で解くならRのsegmentedパッケージが便利 (Muggeo, 2003, 2008) 16/19
  17. 17. まとめ&いんぷりけーしょん 折れ線回帰モデルの書き方とその適用例を紹介した。 if文を使ったモデルもStanで書ける。 (ただし収束しにくくなることがあるので注意) → JAGSならもっとうまくいくかも? ggplot2べんり ベイズたのしい 17/19
  18. 18. 18/19
  19. 19. 引用文献 Muggeo, V. M. R. (2003). Estimating regression models with unknown break- points. Statistics in Medicine, 22, 3055-3071. Muggeo, V. M. R. (2008). segmented: An R package to fit regression models with broken-line relationships. R News, 8/1, 20-25. Retrieved from https://cran.r-project.org/doc/Rnews/ Muto, H., Matsushita, S., & Morikawa, K. (in press). Spatial perspective taking mediated by whole-body motor simulation. Journal of Experimental Psychology: Human Perception and Performance. doi: 10.1037/xhp0000464 Muto, H., Matsushita, S., & Morikawa, K. (in prep.). Dissociating lower- and higher-angle processes in level-2 spatial perspective taking: Applications of segmented regression and exploratory factor analysis to response time data. 武藤 拓之・松下 戦具・森川 和則 (2016). 空間的視点取得に必要なスキルは認知的スキルと 知覚的スキルに分離できる――反応時間データに対する探索的因子分析の適用―― 日本 行動計量学会第44回大会抄録集, 376-377. 19/19

×