Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computation of neutral Z when simulating varying Va values #1

Open
YannDussert opened this issue Oct 11, 2019 · 2 comments
Open

Computation of neutral Z when simulating varying Va values #1

YannDussert opened this issue Oct 11, 2019 · 2 comments

Comments

@YannDussert
Copy link

Hi,

I would like to use the Qpc approach on some data and I had a question about the simulations incorporating environmental variation with varying Va values (Simulations-traitqpc).

In the neutQpc function, breeding values (Z) for neutral traits are simulating using:
myZneutral = mvrnorm(n=1, rep(0,dim(myK)[1]), myVamyK + myVediag(dim(myK)[1]))

However, the equation 19 (appendix 1) from the paper indicates:
vector Z ~ MVN(µ, 2VaK + Ve*I)

Could there be a missing factor of 2 in the R command?
In relation to that, it is indicated that the variance of Cm should be centred around Va, but following equation 6 (Cm ~ N(0, 2Va) ), should it be around 2Va?

I am not a skilled quantitative geneticist (and an even worst mathematician), so I apologize in advance if I missed something.

Best regards,
Yann

@emjosephs
Copy link
Owner

Hi Yann -- thanks for pointing this out. This is indeed a factor of 2 error in the code. I've updated the code in Simulations-traitqpc and plotted a new figure (while leaving the original one to compare). Let me know if you find any other issues or have any questions.
-- Em

@YannDussert
Copy link
Author

Hi,

Thank you for your quick reply. No other question from me (yet ...).

Thanks for putting up the code and results from the paper here by the way, this is very useful.

Best regards,
Yann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants