进化分析模型优劣判别理论学习笔记
Likelihood
Ratio Test可能性比值检验
The likelihood ratio
test (LRT) is a statistical test of the goodness-of-fit between two
models. 可能性比值检验是对两种模型符合度进行的统计检验。A
relatively more complex model is compared to a simpler model to see
if it fits a particular dataset significantly better.
将复杂模型与简单模型进行比较,从而对复杂模型是否更好进行判断。If
so, the additional parameters of the more complex model are often
used in subsequent analyses.如果更好,在后续分析中复杂模型的附加参数将被更多的使用。
The
LRT is only valid if used to compare hierarchically
nested models. 可能性比值检验仅适用于级联套式模型间的比较。That
is, the more complex model must differ from the simple model only by
the addition of one or more parameters.
也就是说,更复杂模型必须是在简单模型的基础上逐渐增加一个或多个参数。Adding
additional parameters will always result in a higher likelihood
score.参数增加可以使得可能性一直提高。但是,达到一定值后这种增加不再显著。
However,
there comes a point when adding additional parameters is no longer
justified in terms of significant improvement in fit of a model to a
particular dataset. The LRT provides one objective criterion for
selecting among possible models. 可能性比值检验为模型选择提供了一个客观标准。The
LRT begins with a comparison of the likelihood scores of the two
models: 首先,可能性比值检验对两个模型的可能性分值进行比较:
LR
= 2*(lnL1-lnL2)
This LRT statistic
approximately follows a chi-square
distribution. 可能性比值检验的统计分布(LR)大体呈卡方差分布。To
determine if the difference in likelihood scores among the two models
is statistically significant, we next must consider the degrees of
freedom. 然后,为了对模型间的可能性分值差异的显著性进行判定,我们必须考虑自由度。In
the LRT, degrees of freedom is equal to the number of additional
parameters in the more complex model.这里,自由度等于参数的增加数目。
Using
this information we can then determine the
critical value of the test statistic from standard statistical
tables. 最后,我们通过标准的统计表就可以查得检验统计的判别值(p)。——对显著性做出判别,决定是否有必要继续增加参数。
The LRT is explained in
more detail by Felsenstein
(1981),
Huelsenbeck
and Crandall (1997),
Huelsenbeck
and Rannala (1997),
and Swofford
et al. (1996).
关于可能性比值检验的更多细节请参阅Felsenstein
(1981),
Huelsenbeck
and Crandall (1997),
Huelsenbeck
and Rannala (1997),
和Swofford
et al. (1996)。While
the focus of this page is using the LRT to compare two competing
models, under some circumstances one can compare two competing trees
estimated using the same likelihood model.
此处,我们简述了应用可能性比值检验比较两个模型,在某些场合,可能性比值检验能用于同一模型推测的两个进化树的比较。相关的拓展请阅读下面的文献。There
are many additional considerations (e.g., see Kishino
and Hasegawa 1989,
Shimodaira
and Hasegawa 1999,
and Swofford
et al. 1996).
Examples 实例
Example 1 例1-
Comparing Likelihood Models:可能性模型比较:
Consider
the HKY85 and GTR models. The GTR model differs from HKY85 by the
addition of four additional rate parameters (see DNA
substitution models).
GTR模型较HKY85模型增加了四个比率参数(参阅DNA
substitution models)。因此,这两个模型间是级联套式的关系——LRT的基本要求。These
models are therefore hierarchically nested - an imperative
requirement of the LRT. Imagine calculating the likelihood scores of
the two models after acquiring a simple neighbor-joining
tree假设通过两个模型得到的邻位连接树的可能性分值如下:
HKY85 -lnL =
1787.08
GTR
-lnL = 1784.82
Then, 那么,
LR = 2 (1787.08 -
1784.82) = 4.53
degrees of freedom 自由度=
4 (GTR adds 4 additional parameters to HKY85)
查卡方差表得到判别值critical
value (P = 0.05) = 9.49 大于4.53
因此,在这个例子中,GTR模型并不优于HKY85模型,我们可以推测增加的四个比率参数的比率没有生物学意义(考虑到我们侦测差别的能力)。In
this case, GTR does not fit the data significantly better than HKY85,
and we infer that the four rate additional rate parameters are not
biologically meaningful (given our power to detect such differences).
From this simple example, one could exhaustively test any number of
substitution models to determine the best model for a given dataset.
通过这个简单的例子,我们可以对任何数目的置换模型进行穷尽检验,从而确定特定数据的最佳分析模型。
Example 2 例2-
Testing the Molecular Clock分子钟的检验:
Lets say you are interested whether a DNA segment evolves at a
homogeneous rate along all branches in a phylogeny.
我们假设你想知道某一DNA片段是否在各个进化支都依照同样的速率演化。That
is, you want to test whether the assumption of a molecular clock is a
valid one. 也就是说,你想检验某一分子钟是否有效。Since
a molecular clock only allows a single rate, this is the simpler,
hierarchically nested, null model.既然分子钟仅有单一速率,它就是简单、级联套式的零模型。
In
testing a molecular clock, the degrees of freedom work out to be s-2,
where s is the number of taxa in the phylogeny (Felsenstein
1981).
此处的自由度依照进化支的数目而定。首先,我们按照例1的方法比较有无分子钟状况下的可能性差异。Here
after determining the best likelihood model (similar to Example 1
above), we calculate the likelihood scores for a 5 taxon statement
with and without a molecular clock:
HKY85 + clock -lnL =
7573.81
HKY85
-lnL = 7568.56
Then,
LR = 2 (7573.81 -
7568.56) = 10.50
degrees of freedom =
s-2 = 5-2 = 3
critical value (P = 0.05) = 7.82 小于10.50
因此,零假设,即各支间进化率一致的假设不成立。The
null hypothesis, that the rate of evolution is homogeneous among all
branches in the phylogeny, is rejected. Rates of substitution
significantly vary among branches and a molecular clock is
inappropriate. 置换在各支间存在显著差异,分子钟不是单一的。
卡方差分布的判别值计算请点击这里或者here。A
Web site to determine the critical values for the chi-square
distribution is available here.
另外一个同仁的类似文章http://blog.roodo.com/will11/archives/2666723.html
January 24,2007
Likelihood Ratio Test Likelihood Ratio Test
Likelihood
Ratio Test,簡稱LRT,是一種用來比較兩種模型的統計方法。
Likelihood Ratio Test,简称LRT,是一种用来比较两种模型的统计方法。
它的原理是將一個複雜的模型拿來和另一個簡單的模型比較比較,判斷這個複雜的模型在詮釋一組特定的統計資料時是否比另一個模型更合適。它的原理是将一个复杂的模型拿来和另一个简单的模型比较比较,判断这个复杂的模型在诠释一组特定的统计资料时是否比另一个模型更合适。
這種方法只適用於比較hierarchically
nested models,也就是複雜的模型和簡單的模型比較,它們的差異僅止於參數的多寡。这种方法只适用于比较hierarchically
nested models,也就是复杂的模型和简单的模型比较,它们的差异仅止于参数的多寡。
以PAML中所建議的一個site-model
LRT pairs為例:以PAML中所建议的一个site-model
LRT pairs为例:
M1a
(NearlyNeutral)-M2a (PositiveSelection) M1a (NearlyNeutral)-M2a
(PositiveSelection)
Parameters
of M1a: p0 (p1 = 1 – p0), ω0 < 1, ω1 = 1
Parameters of M1a: p0 (p1 = 1 – p0), ω0 < 1, ω1
= 1
Parameters
of M2a: p0, p1 (p2 = 1 – p0 – p1), ω0 < 1, ω1
= 1, ω2 > 1 Parameters of M2a: p0, p1 (p2 = 1 – p0 –
p1), ω0 < 1, ω1 = 1, ω2 > 1
M2a多出了p1和ω2兩個參數。
M2a多出了p1和ω2两个参数。
因為M1a的p1和M2a的p2並不是自由的參數,所以不算在參數的差異內。因为M1a的p1和M2a的p2并不是自由的参数,所以不算在参数的差异内。
在理論上增加更多參數可以得到和真實情況更高的近似度,但是如果一個複雜的模型與簡單模型相比,相似度沒有顯著提高,這時候我們只要使用簡單的模型來詮釋研究資料就可以了。在理论上增加更多参数可以得到和真实情况更高的近似度,但是如果一个复杂的模型与简单模型相比,相似度没有显著提高,这时候我们只要使用简单的模型来诠释研究资料就可以了。
LRT的功能便是幫助我們找到最能代表資料的簡單模型。
LRT的功能便是帮助我们找到最能代表资料的简单模型。
LRT的方法是比較兩個模型的likelihood
scores,它的簡單公式如下:
LRT的方法是比较两个模型的likelihood
scores,它的简单公式如下:
LR
= 2*(lnL1-lnL2) LR = 2*(lnL1-lnL2)
以PAML的codeml程式為例,在它的main
output file (mlc)內即有lnL的數值。以PAML的codeml程式为例,在它的main
output file (mlc)内即有lnL的数值。
LRT的統計分部和chi-square分布大致相同,因此只要知道自由度,便能藉由查表的方式知道LRT結果是否顯著。LRT的统计分部和chi-square分布大致相同,因此只要知道自由度,便能藉由查表的方式知道LRT结果是否显著。
LRT的自由度為較複雜的模型所增加的參數數量。
LRT的自由度为较复杂的模型所增加的参数数量。
以M1a-M2a的LRT為例,自由度便是2。以M1a-M2a的LRT为例,自由度便是2。
這是在練習PAML時去查的資料,事實上有些解釋會用到更複雜的數學公式,而這個版本的內容比較簡單易懂,而且也能直接套用在PAML的運算結果上。这是在练习PAML时去查的资料,事实上有些解释会用到更复杂的数学公式,而这个版本的内容比较简单易懂,而且也能直接套用在PAML的运算结果上。
没有评论:
发表评论