11. SASプログラム(GLM)
proc glimmix data=HessianFly;
class block entry;
model y/n =block entry / solution;
run;
class statement:block,entry
model statement:結果変数→二項分布
リンク関数→logit
オプションにdist=binomial link=logitを挿入しても同じ
11
12. 結果:model
The GLIMMIX Procedure
Model Information
Data Set WORK.HESSIANFLY
Response Variable (Events) Y
Response Variable (Trials) n
Response Distribution Binomial
Link Function Logit
Variance Function Default
Variance Matrix Diagonal
Estimation Technique Maximum Likelihood
Degrees of Freedom Method Residual
検定の自由度はresidual法で計算
→オブザベーション数から計画行列のランクを引く方法
DDFMオプションで変更可能 12
13. 結果:class,observation
Class Level Information
Class Levels Values
block 4 1234
entry 16 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16
Number of Observations Read 64
Number of Observations Used 64
Number of Events 396
Number of Trials 736
13
14. 結果:dimension
Dimensions
Columns in X 21
Columns in Z 0
Subjects (Blocks in V) 1
Max Obs per Subject 64
計画行列 X :切片,block×4,entry×16
14
15. 結果:optimization
Optimization Information
Optimization Technique Newton-
Raphson
Parameters in Optimization 19
Lower Boundaries 0
Upper Boundaries 0
Fixed Effects Not Profiled
デフォルト:Newton-Raphson法
T
X X のランク数だけのパラメータを推定
15
20. 結果:test
Type III Tests of Fixed Effects
Num Den
Effect DF DF F Value Pr > F
block 3 45 1.42 0.2503
entry 15 45 6.96 <.0001
固定効果に対するWald流の検定
entry効果が有意
→entry間で害の受けやすさが異なる
20
23. 結果:model,dimension
Estimation Technique Residual PL
Degrees of Freedom Method Containment
条件付モデルの場合はREMLを使用する
Columns in X 17
Columns in Z 4
計画行列 X:切片,entry×16
Z :block×4 23
24. 結果:optimization
Optimization Technique Dual Quasi-
Newton
Parameters in Optimization 1
GLMMではQuasi-Newton法がデフォルト
この方法は二次導関数を必要としない
共分散を指定していない
→Dual Quasi-Newton法
24
45. モデル
1.固定効果のみのモデル
log µi= log ni + α 0 + α1 xi /10
b
2.郡の変量効果が独立であると仮定
log µi= log ni + α 0 + α1 xi /10 + bi , bi ~ N ( 0, σ 2 ) , i.i.d .
b
3.郡の変量効果に自己回帰構造を想定
log µi= log ni + α 0 + α1 xi /10 + bi
b
R :Basag(1991)の構造を仮定
45