Mixed effects models 回顾(七)
A.F. Zuur et al., Mixed Effects Models and Extensions in Ecology with R, 11 Statistics
GLM and GAM for Count Data
Introduction
广义线性模型 (GLM) 以及广义加性模型 (GAM) 的构建包含三步:
(1) 响应变量 Y i Y_i Yi 的分布假设,同时定义 Y i Y_i Yi 的均值 (mean) 以及方差 (variance);
(2) 系统部分的说明,即定义解释变量的函数;
(3) 连接 Y i Y_i Yi 的均值与系统部分。
GLM/GAM with Gaussian distribution and identity link
在高斯线性回归模型中 (亦叫做 GLM with Gaussian distribution and identity link):
Y i ∼ N ( μ i , σ 2 ) Yi ∼ N(\mu_i, \sigma^2) Yi∼N(μi,σ2)
E ( Y i ) = μ i a n d v a r ( Y i ) = σ 2 E(Y_i) = \mu_i and var(Y_i) = \sigma^2 E(Yi)=μi and var(Yi)=σ2
μ i = η ( X i 1 , . . . , X i q ) \mu_i = \eta(X_{i1}, ..., X_{iq}) μi=η(Xi1,...,Xiq)
组合在一起即为:
E ( Y i ) = η ( X i 1 , . . , X i q ) = α + β 1 × X i 1 + . . . + β q × X i q E(Y_i) = \eta(X_{i1},..,X_{iq}) = \alpha + \beta_1 \times X_{i1} + ... + \beta_q \times X_{iq} E(Yi)=η(Xi1,..,Xiq)=α+β1×Xi1+...+βq×Xiq
在 GAM with Gaussian distribution中:
η ( X i 1 , . . . , X i q ) = α + f 1 ( X i 1 ) + . . . + f q ( x i q ) \eta(X_{i1},...,X_{iq}) = \alpha + f_1(X_{i1}) + ... + f_q(x_{iq}) η(Xi1,...,Xiq)=α+f1(Xi1)+...+fq(x