我将此问题提交给 stat.stackexchange
https://stats.stackexchange.com/questions/147909/puzzling-average-of-correlated-measurements
但看起来它更适合该论坛,因为它可能更多的是计算问题而不是统计问题:
我想平均相关测量。给定一组测量值:
x = ( x1, x2, x3 )
其内部相关性由协方差矩阵 C 给出。
Chi2 最小化导致以下平均值:
<x> = C^-1 * x / C^-1
但是下面的例子让我很困惑:
让我们考虑以下树:
树.mod:
(((oryLat2:0.3,(HLnotFur1:0.3001,HLxipMac2:0.3001)HLnotFur1-HLxipMac2:0.0001)oryLat2-HLnotFur1:0.05,(gasAcu1:0.01,tetNig2:0.02)gasAcu1-tetNig2:0.1)oryLat2-gasAcu1:0.4,danRer7:0.5)oryLat2-danRer7;
并在 R 中执行:
R
library(ape)
# Read the tree
tree <- read.tree( "tree.mod" )
# Extract a clade of 3 species
clade <- extract.clade( phy=tree, node="oryLat2-HLnotFur1")
# Measurements
x <- c(1,4,4)
# Covariance of the clade
V = vcv(clade)
oryLat2 HLnotFur1 HLxipMac2
oryLat2 0.3 0.0000 0.0000
HLnotFur1 0.0 0.3002 0.0001
HLxipMac2 0.0 0.0001 0.3002
# Replace zero-entries
V[V==0] = 1e-5
oryLat2 HLnotFur1 HLxipMac2
oryLat2 3e-01 0.00001 0.00001
HLnotFur1 1e-05 0.30020 0.00010
HLxipMac2 1e-05 0.00010 0.30020
# Formulas
# Weights
r <- 1/V
oryLat2 HLnotFur1 HLxipMac2
oryLat2 3.3 100000 100000
HLnotFur1 100000 3.3 10000
HLxipMac2 100000 10000 3.3
#Mean
meanX = sum(x %*% r) / sum(r)
2.500008
我很困惑,因为meanX = 2.5,这对应于高相关性的情况,而在那个例子中,协方差矩阵几乎是对角线,所以我期望meanX = 3。
我一定遗漏了什么,欢迎任何意见!谢谢