生物統計学 2026 総研大

  1. 開講年度 / Academic Year: 2026

  2. 講義名 / Cource title: 生物統計学 Biostatistics

  3. 開講学期 / Term: 前学期 1st half (7月28, 29, 30, 31日)

  4. 代表教員 / Main Instructor:

    • 岩嵜航 (東北大学 生命科学研究科)
    • Watal M. Iwasaki (Graduate School of Life Sciences, Tohoku University)
  5. 授業の概要 / Outline:

    • 生物学における研究とは、大雑把に言うと 「生物に関するデータを集め、その背後にある理(ことわり)を読み解くこと」です。 そのため、データ解析はどんな研究をするにもほぼ不可欠となります。 このとき研究対象の全てをあるがままに捉えることはできません。 扱いやすいように単純化・理想化したモデルを作り、限られたデータを通して統計的に解釈するのが科学のやり方です。 本実習では、その基礎として回帰モデルの考え方を身につけていきます。 また、正しい結論を導くためには、データをいろいろな角度から可視化して全体の構造を見渡すことが特に重要です。 しかし観察・実験・データベースなどから得られるデータは多種多様であり、 そのまますぐ使えることはめったにありません。 まずデータを整形するところから始める必要があります。 この前処理にせよ、作図にせよ、 「エクセルであれをあっちにコピペして、メニューからあれを選択して…」 といった手作業でやるのは大変ですし、再現性が無いため科学の手続きとしても問題です。 いつでもだれでも再検証したり使いまわしたりできるように、 規則性のある退屈な仕事は機械に任せるのが得策です。 本実習では、近年さらに易しくなったR言語を用いることで、 生データから効果的な作図まで簡単に辿り着けるということを体験してもらいます。
    • Biological research is, roughly speaking, about collecting data on living organisms and deciphering the underlying principles. Data analysis is therefore almost indispensable for any research in this field. But we cannot capture everthing of the research subject as it is. The way science works is to create a model that simplifies and idealizes the phenomenon to make it easier to handle, and then interpret it statistically through limited data. In this course, we will learn the basics of regression models as a foundation for this approach. To draw correct conclusions, it is particularly important to visualize the data from various angles to get an overview of the whole structure. Moreover, the data obtained from observations, experiments, databases, etc. are diverse and rarely ready to use as they are. We need to start by preprocessing the data. Whether it’s preprocessing or visualization, doing it manually by copying and pasting in Excel and selecting from menus is cumbersome and problematic in terms of reproducibility as a scientific procedure. It’s best to let machines handle the tedious work with regularity so that anyone can verify or reuse it later. In this course, we will use the R language, which has become even easier to use in recent years, to experience how easily we can go from raw data to effective visualization.
  6. 到達目標 / Learning Objectives:

    • 生物学研究におけるデータ解析の重要性を理解し、 データの前処理・可視化・統計モデリングをRで実行できるようになる。
    • Understand the importance of data analysis in biological research, and perform data preprocessing, visualization, and statistical modeling in R.
  7. 成績評価方法 / Grading Policy:

    • 実習中の積極的な発言・取り組み40%、最終レポート60%
    • Active participation and engagement during the course 40%, final report 60%
  8. 授業計画 / Lecture Plan:

    1. 導入: データ解析の全体像
    2. Rの基本
    3. データの可視化
    4. 演習1
    5. データ構造の処理1: 抽出、集約など
    6. データ構造の処理2: 結合、変形など
    7. データ内容の処理: 数値、文字列など
    8. 演習2
    9. データ入力、レポート作成
    10. 直線回帰、確率分布、乱数生成
    11. 尤度、最尤推定
    12. 一般化線形モデル (GLM)
    13. 個体差、一般化線形混合モデル (GLMM)
    14. ベイズ統計学の基礎
    15. 演習3
    1. Introduction: Overview of data analysis
    2. Basics of R
    3. Data visualization
    4. Exercise 1
    5. Data structure processing 1: extraction, aggregation, etc.
    6. Data structure processing 2: merging, reshaping, etc.
    7. Data content processing: numeric, string, etc.
    8. Exercise 2
    9. Data input, reporting
    10. Linear regression, probability distributions, random number generation
    11. Likelihood, maximum likelihood estimation
    12. Generalized linear model (GLM)
    13. Individual differences, generalized linear mixed model (GLMM)
    14. Basics of Bayesian statistics
    15. Exercise 3
  9. 実施場所 / Location:

    • 総合研究大学院大学 葉山キャンパス
    • Hayama Campus, SOKENDAI
  10. 使用言語 / Language: 日本語 or English

  11. 教科書・参考図書 / Textbooks and References:

  12. 他コース学生が履修する際の注意事項 / Notes for students from other programs:

    • 事前に代表教員(大槻・岩嵜)にメールでコンタクトを取ること。
    • Contact Prof. Ohtsuki in advance in email.
  13. 授業を担当する教員 / Lecturers:

    • 岩嵜航 (東北大学 生命科学研究科 助教)
    • Watal M. Iwasaki (Assistant Professor, Graduate School of Life Sciences, Tohoku University)
  14. 関連URL / Related URL:

  15. 上記URLの説明 / Explanatory note on above URL:

    • 講義資料を公開しておくところ。
    • Lecture materials are published there.
  16. 備考 / Others

    • 下記の手順に従ってRの実行環境を事前に準備して持参すること。
    • Please follow the instructions below to prepare the R environment in advance.
  17. キーワード / Keyword

    • R、データ可視化、データ前処理、統計モデリング、一般化線形モデル、一般化線形混合モデル
    • R, data visualization, data preprocessing, statistical modeling, generalized linear model, generalized linear mixed model
  18. 講義に関する問い合わせ先 / Contact for course inquiries

    • ohtsuki_hisashiあsoken.a​c.jp
    • heavy­watalあtohoku.a​c.jp

Schedule

時間 7/28 Tue 7/29 Wed 7/30 Thu 7/31 Fri
09:00 構造処理1 入出力 GLM
10:40 構造処理2 確率分布 個体差
13:00 導入 内容処理 尤度 ベイズ
14:40 可視化 演習 演習 演習
16:20 演習

実習環境の事前準備

途中まででもいいので、できるかぎり実習前に済ませてもらえると助かります。

  1. OSのソフトウェア・アップデートを基本的に全て適用して再起動。

    • Windows 11 (≥25H2)
    • macOS Tahoe (≥26.5)
  2. ファイル名の末尾(.pdf とか .png とか)の拡張子を常時表示するようにOSを設定。

  3. https://cran.r-project.org/ から最新版の R本体 (≥ 4.6.0) をダウンロードしてインストール。 OK連打のデフォルト設定で。 古いものが既に入っている場合は念のため削除してから。

    • Windows → baseR-4.6.0-win.exe
    • MacR-4.6.0-arm64.pkg (Apple Silicon) or R-4.6.0-x86_64.pkg (Intel)
  4. https://posit.co/download/rstudio-desktop/ から最新版の RStudio (≥ 2026.04.0) をダウンロードしてインストール。 古いものが既に入っている場合は念のため削除してから。

  5. 開発者ツールをインストール。 ここでは必須ではないけどいずれ使うことになる。

    • Windows: Rtools (R本体のバージョンに合わせる)
    • Mac: Command Line Tools: ターミナルで xcode-select --install を実行。 Xcode環境は不要。
  6. RStudioを起動。初回は「開発元の不明なアプリ」を許可するような操作が必要かも。

  7. 次の2行をコピーし、RStudio左側のConsoleにペーストして実行:

    options(repos = getOption("repos", c(CRAN = "https://cloud.r-project.org")))
    install.packages("tidyverse", type = "binary")
    

    パッケージがたくさんインストールされる。 何か訊かれたら yes と回答。 エラーや警告らしきものがあれば全文コピーしておく。

  8. Consoleで次の2行を実行してメッセージとバージョンを確認:

    library(conflicted)
    library(tidyverse)
    
    ── Attaching core tidyverse packages ──── tidyverse 2.0.0 ──
    ✔ dplyr     1.2.1     ✔ readr     2.2.0
    ✔ forcats   1.0.1     ✔ stringr   1.6.0
    ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
    ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
    ✔ purrr     1.2.2
    

エラーや警告が出たら

  1. バージョン確認。OS、R、RStudioなどのソフトウェアが古すぎるかも。 それらが十分に新しければ、次に挙げる日本語やOneDriveの問題は対処済みのはず。

  2. 手元のコンピューターのホームフォルダ(Windowsの場合 %USERPROFILE%)を確認。 新しくターミナルを開いて pwd コマンドを実行。 ここに半角アルファベットじゃない文字(日本語とか記号とか空白とか)が含まれている場合、不具合の原因になりがち。 ここだけ修正するのはかなり難しい (ユーザー名のフルネーム表示は変更できるけどそれは無関係)。 新しいユーザーアカウントを作って引っ越すとか、 OSをクリーンインストールするとかしてやり直したほうが結局早そう。 半角アルファベット小文字のみで短いものを推奨。

    • ✅ Good: watal, tamakino
    • ❌ Bad: 岩嵜航, Watal Iwasaki, heavy.watal

    Windowsのホームフォルダ(%USERPROFILE%)はログインの仕方で決まるっぽい:

    • Microsoftアカウント(example@outlook.jp)でログイン: C:/Users/examp/ (ユーザー名が漢字だろうがなんだろうが、メールアドレスの最初の5文字が使われるのでセーフ)
    • Microsoftアカウントを使わず、ローカルユーザーとしてログイン
      • ✅ 半角英字のみのユーザー名なら問題ない: C:/Users/goodname/
      • ❌ 漢字など全角文字を含むアカウント名: C:/Users/朗軽 遊佐/
        RとRStudioは既に対応済みだけど、Quarto(あるいはPandoc?)は未対応らしくてエラー。 他のソフトウェアでも不具合が出る危険あり。 ローカルユーザーを作ったあとでMicrosoftアカウントと紐付けても直らなそう。
  3. Windowsの場合OneDriveが悪さしているかも。 参考:

  4. 実習当日チャット欄に投げてください。時間の許す限り対処します。

講義資料

キーで戻る・進むスライド形式。 vキーでスクロール形式に切り替え。