神論文,@kohske さんが解析再現記事を書いてくださるのを待とう https://t.co/UgcU404pvc
— Haruhiko Okumura (@h_okumura) March 25, 2019
ふられてしまったので、Nature神論文についてのメモ書きです。あくまで解析コードについてのメモ書きということで。内容についても思うところはたくさんありますが、それは本業とも関係するので、また別のどこかで。
論文はこちら
Whitehouse, H., François, P., Savage, P. E., Currie, T. E., Feeney, K. C., Cioni, E., Purcell, R., Ross, R. M., Larson, J., Baines, J., ter Haar, B., Covey, A., Turchin, P. (2019). Complex societies precede moralizing gods throughout world history. Nature.
コードはgithubに上がっています。
https://github.com/pesavage/moralizing-gods
このドキュメントでは、 https://github.com/pesavage/moralizing-gods/commit/28794692f2615bfdedcf037b186bd8d5e54c10b4 このコミットを使ってます。
CC By-NC SA License
Copyright (c) 2018 Peter Turchin and Patrick E. Savage
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software under the conditions of Creative Commons Attribution Non-Commercial (CC By-NC SA) licensing (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode), subject to the following conditions:
Please include the following text in any publication using these data:
This research employed data from the Seshat Databank (seshatdatabank.info) under Creative Commons Attribution Non-Commercial (CC By-NC SA) licensing (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
and cite:
Whitehouse, Francois, Savage, et al. (2019) Complex societies precede moralizing gods throughout world history. Nature.
Turchin, P. et al. (2018) Quantitative historical analysis uncovers a single dimension of complexity that structures global variation in human social organization. Proc. Natl. Acad. Sci. U. S. A. 115, E144-E151 .
Turchin, P. (2018) Fitting dynamical regression models to Seshat data. Cliodynamics 9(1):25-58 .
Turchin P. et al. 2015. Seshat: The Global History Databank. Cliodynamics 6(1):77-107.
The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official positions, either expressed or implied, of the Seshat Databank, its collaborative scholarly community, or the Evolution Institute.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
本ドキュメントもCC By-NC SAになります。
!MoralizingGods.R!MoralizingGods.Rというファイル。exportdat.csv(seshatからのもの)。precheck.r: 下処理とデータ整合性チェック。生データから必要な部分を抽出したり、コード化したり。SCdat.csvというのができます。これ大事(social complexity)。source("ConstrMI.R"), source("AggrMI.R"), source("ImputeMI.R")あたり。このあたりの中身はまだ細かくは見てません。source("BigGodAnalysesEditedV2.R")ここで神信仰のタイミングとか計算(後述)。source("RegrDat.R") ロジスティック回帰のためのデータづくり。メソッドに乗ってるロジスティックモデルの各項を作ってます。BigGodAnalysesEditedV2.Rfor(i in 1:length(NGAs))のループの中で、地域を抜き出すMoralisingGods=="1"となる最初の時期を「神出現時期」RegrDat.Rについては、また今度ということで(こっちは特にややこしいことはないと思う)。
exportdat.csvですが、これ以外も必須なものがあります。polities.csvは必須なんですが、解析途中で上書きされます。新たに解析するには、オリジナルファイルを復元して使う必要がある(かもしれない)。今回使われてるseshatデータの中に日本(Kansai)があります。弥生時代から始まって、古墳時代、飛鳥時代と続きます。弥生・古墳は儀式はありで、神はなし。飛鳥時代に神出現です。日本のSCだけ抜き出しておきました(Extended Data Fig. 1のもの)。
横軸は西暦、先は社会の複雑性、青は儀式開始、赤は神出現。
ローカルな儀礼は弥生時代からあった。古墳時代に、社会の複雑性が一気に上がって、飛鳥時代に神出現、というストーリーが浮かびます。真実だったかどうかは置いといて、こういった新しいアプローチで、いろいろなものの再解釈が進んでいって、より精度の高い推定が行えるようになる、というのがいいですね。
再現可能なデータ解析について興味ある人は、R/RStudioとRマークダウンを使った共立出版WonderfulRシリーズの「再現可能性のすゝめ」おすすめですよ。
データとかコードが使えるのはとてもいいですね。そんなオープンサイエンス、オープンデータについてのセミナーが今年の認知心理学会のサテライトイベントとして開催されるとか?