16. Stanコードへ
data{
int ld; // length of data
int nt; // number of treatment
int ns; // number of study
int study[ld]; // vector of the study id
int treatment[ld]; //vector of the treatment id
int dead[ld]; // vector of the number of dead
int sampleSize[ld]; // vector of the number of patient
}
parameters{
real d01;
real mu[ns];
}
r[ , ]やn[ , ]などの行列形式は,ネッ
トワークメタ分析に拡張した時に,
やや面倒になるので,今回は,各変
数を1列のベクターにしている
(long形式にしたものの各列を読み
込む感じです)
推定するパラメータは,mu(各研究におけ
るベースライン=各研究での治療0の効果)
とd01(治療0と治療1の差=治療0を基準と
したときの治療1の相対効果)
16
25. Stanコードへ
data{
int ld; // length of data
int nct; // number of compared treatment
int ns; // number of study
int study[ld]; // vector of the study id
int treatment[ld]; // vector of the treatment id
int dead[ld]; // vector of the number of dead
int sampleSize[ld]; // vector of the number of patient
int baseline[ld]; // vector of baseline treatment each study
}
parameters{
real d[nct];
real mu[ns];
}
各変数を1列のベクターにしている
(long形式にしたものの各列を読み
込む感じ)
なお,treatmentでリファレンス治療
SKは,0とコードした
推定するパラメータは,
mu(各研究におけるベースラインの効果)と
d[nct](リファレンスに対する6つの治療の
相対効果) 25