bomeara / BMhyb

0 stars 1 forks source link

Fix wrong model #1

Closed bomeara closed 8 years ago

bomeara commented 8 years ago

From Tony:

After considering a more general case (please see the attach figure), we probably can use the code if you agree

V.modified[recipient.index, recipient.index] <-

(V.original[recipient.index, recipient.index] - sigma.sq_flow$time.from.root.recipient[flow.index]) # this equals to sigma.sqt3 = sigma.sq(t1+t2+t3) - sigma.sq_(t1+t2)

+

( flow$m[flow.index]^2 + (1- flow$m[flow.index])^2 ) * (flow$time.from.root.recipient[flow.index]) # this is m^2var(A) + (1-m)^2var(C) = m^2(t1+t2) +(1-m)^2(t1+t2)

+2m(1-m)_V.original[recipient.index, donor.index] # this is 2m(1-m)_cov(A,C) =2m(1-m)_t1 which is equal to 2m(1-m)_cov(X,Y)

vh

20151102_184315

djhwueng commented 8 years ago

more correction for the variance of the hybrid as following

V.modified[recipient.index, recipient.index] <- (V.original[recipient.index, recipient.index] - sigma.sq_flow$time.from.root.recipient[flow.index])

this equals to sigma.sqt3=sigma.sq(t1+t2+t3)-sigma.sq(t1+t2)

+ (flow$m[flow.index]^2 + (1- flow$m[flow.index])^2 ) *(flow$time.from.root.recipient[flow.index])_sigma.sq

this is m^2var(A) + (1-m)^2var(C) = (m^2 +(1-m)^2)_(t1+t2)_sigma.sq

+ 2m(1-m)_V.original[recipient.index, donor.index] #this is 2m(1-m)cov(A,C)=2m(1-m)t1_sigma.sq which is equals to 2m(1-m)cov(X,Y) + vh