I tried to respect your format for the flow matrix, using your description here. Is this network correctly defined ?
I then tried to compute the associated variance matrix.
> sigma2 = 1
> x <- c(sigma.sq = sigma2, mu = 0, SE = 0)
> actual.params <- c("sigma.sq", "mu", "bt", "vh", "SE")
> GetVModified(x, network$phy, network$flow, actual.params)
R Y X
R 0.85 0.70 0.15
Y 0.70 0.85 0.15
X 0.15 0.15 1.00
In this matrix, if the network is correctly defined and my computations right, I think that Cov[R,Y] is not correct. I think it should be:
What do you think about it ? Did I make a mistake somewhere ?
I did not dive into your code very deep, but from what I understood of your algorithm, you are modifying all the couple (recipient, donors) one by one (browsing through your flow matrix), but never the couples (recipient1, recipient2), when there are several descendants from a single event, as it is the case here.
In the example above, the function indeed gives Cov[R,Y]=0.70, which seems like the non-actualized variance one would get from the underlying tree.
But it's possible I misunderstood something, please correct me if I'm wrong !
Variance between hybrid descendants
Hi again, @bomeara and @djhwueng
This might be related to #13.
I tried a network a little more sophisticated, with an hybrid having several descendants, here R and Y.
I tried to respect your format for the flow matrix, using your description here. Is this network correctly defined ?
I then tried to compute the associated variance matrix.
In this matrix, if the network is correctly defined and my computations right, I think that Cov[R,Y] is not correct. I think it should be:
What do you think about it ? Did I make a mistake somewhere ?
I did not dive into your code very deep, but from what I understood of your algorithm, you are modifying all the couple (recipient, donors) one by one (browsing through your flow matrix), but never the couples (recipient1, recipient2), when there are several descendants from a single event, as it is the case here. In the example above, the function indeed gives Cov[R,Y]=0.70, which seems like the non-actualized variance one would get from the underlying tree.
But it's possible I misunderstood something, please correct me if I'm wrong !
Thanks again !
Session infos: