時系列データ解析の手法:線形近似、変化点の同定などを行うpythonやRのモジュール

スポンサーリンク

研究のデザイン

観察研究

前後比較実験の研究デザイン

  1. Uncontrolled before-after studies: discouraged by Cochrane and the EMJ Steve Goodacre The simplest way to evaluate an intervention is to compare outcomes before and after implementation of the intervention. This method is known as an uncontrolled before-after study. The term ‘uncontrolled’ is used to distinguish this design from a controlled before-after study in which the before-after effect of implementation in the intervention group is compared with a control group that has no intervention. With the recent emphasis on improvements in healthcare delivery in particular, the number of uncontrolled before-after studies is increasing. Unfortunately, these present a problem. (中略)The use of historical controls in clinical trials has long been recognised to overestimate the benefit of new treatments, and has provided misleading information in emergency medicine.(中略)At the EMJ, we realise that a before and after design may be the most practical method for studying an intervention, and we will continue to publish these.
  2. Guidance Before-and-after study: comparative studies How to use a before-and-after study to evaluate your digital health product. From: UK Health Security Agency Published 30 January 2020

政策の実施前後におけるトレンド(長期的傾向)の変化の有無の検出方法

  • ‘Interrupted time-series studies can provide a robust method of measuring the effect of an intervention when randomization or identification of a control group are impractical’ (Grimshaw et al. 2003).
  • segmented regression analysis is a practical approach to assessing the impact of a health policy change in low- and middle-income health systems.

引用元:How to do (or not to do) … Assessing the impact of a policy change with routine longitudinal dat

  1. How to do (or not to do) … Assessing the impact of a policy change with routine longitudinal data Mylene Lagarde Health Policy and Planning, Volume 27, Issue 1, January 2012, Pages 76–83, https://doi.org/10.1093/heapol/czr004
  2. Methods for Evaluating Causality in Observational Studies Dtsch Arztebl Int. 2020 Feb; 117(7): 101–107. Published online 2020 Feb 14. doi: 10.3238/arztebl.2020.0101 PMCID: PMC7081045 PMID: 32164822 Review Article 例として挙げられているのが例えば、The effect of a smoking ban on the incidence of cardiovascular diseases

Rを用いた分析

  1. Rでサクッと時系列データの変化点を見つける方法 セールスアナリティクス 時系列データを手に入れたら、どのようなデータかなんとなく知りたくなります。その1つが構造が変化する時期(変化点)です。‥ RSS(残差平方和、Residual sum of squares)BIC(ベイズ情報量規準、Bayesian information criterion)は、どちらの数値も小さい方が良いとされています。 BICが最も小さいケースを最適としています。 今回のケースでは、変化点が3が最適になっています。

Pythonを用いた分析

PWLF

  1. pwlf: A Python Library for Fitting 1D Continuous Piecewise Linear Functions Charles F. Jekel,  Gerhard Venter † March 19, 2019

Prophet

  1. Prophetを、リクルートグループWebサイトの数カ月先の日次サーバコール数予測で活用してみた話 非統計家が高精度な時系列予測を行えるProphet(後編)2019年06月07日 羽鳥冬星
  2. PythonでProphetを使いたい(2:トレンドと転換) 2020-09-12 あれもPython,これもPython Prophetのトレンドはデフォルトでは線形という仮定
  3. 時系列解析ライブラリProphet 公式ドキュメント翻訳5(トレンドの変化点 編) @japanesebonobo 投稿日 2018年10月21日 更新日 2018年10月31日

参考

  1. 科学成果創出に向けた時系列解析の定石 2-b. 「傾向分析」詳細な解析のステップ Step-1 時間分解能を落として、長期傾向を捉えやすくします。平均処理 短周期変動成分の除去
  2. トレンドの転換 トレンド読解から予測までチャート活用ガイドChapter2  三菱UFJモルガン・スタンレー証券 時系列解析の手法を学ぶ際、株価がまさに時系列データですので、こういったウェブ記事も参考になります。
モバイルバージョンを終了
タイトルとURLをコピーしました