forked from mycecilia/FaST-LMM
-
Notifications
You must be signed in to change notification settings - Fork 11
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
LMM.getPosteriorWeights() returns inconsitent results #12
Comments
remomomo,
I'm sorry I don't have a good handle on using the inference.lmm.LMM class directly. It's an internal class and not documented externally. Here are some ideas:
* We moved away from using inference.lmm.LMM to inference.lmm_cov.LMM. For example, the single_snp function uses "lmm_cov.LMM". The two LMM classes are similar, but not identical. I think one may not offer REML.
* If you could use an externally documented and supported function such as single_snp, that would have the benefit of using the lmm_cov.LMM class in a way that has been tested. (But I don't know if that is practical for you.)
* I think I remember moving from logdelta to h2 because it seemed more stable to search. This was in the context of the single_snp function and lmm_cov.LMM.
* I think Christoph Lippert was the original author of "lmm.LMM" and Christian Widmer of "lmm_cov.LMM".
Thanks again for using FaST-LMM,
* Carl
From: Carl KADIE
Sent: Wednesday, January 20, 2021 7:26 AM
To: fastlmm/FaST-LMM <reply@reply.github.com>; fastlmm/FaST-LMM <FaST-LMM@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: RE: [fastlmm/FaST-LMM] LMM.getPosteriorWeights() returns inconsitent results (#12)
remomomo,
Thanks for using FaST-LMM!
I should be able to look into this today.
Yours,
Carl
Carl Kadie, Ph.D.
FaST-LMM & PySnpTools Team<https://fastlmm.github.io/>
(Microsoft Research, retired)
https://www.linkedin.com/in/carlk/
Join the FaST-LMM user discussion and announcement list via email<mailto:fastlmm-user-join@python.org?subject=Subscribe> (or use web sign up<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman3%2Flists%2Ffastlmm-user.python.org&data=02%7C01%7C%7C13a5c33d7cd84cad5cdf08d7bba56e20%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637184191498409587&sdata=2CQWjQEwOpQol2rQ1eoyVTgY8WvInV8UH31Wtl68FzY%3D&reserved=0>)
From: remomomo <notifications@github.com<mailto:notifications@github.com>>
Sent: Wednesday, January 20, 2021 2:12 AM
To: fastlmm/FaST-LMM <FaST-LMM@noreply.github.com<mailto:FaST-LMM@noreply.github.com>>
Cc: Subscribed <subscribed@noreply.github.com<mailto:subscribed@noreply.github.com>>
Subject: Re: [fastlmm/FaST-LMM] LMM.getPosteriorWeights() returns inconsitent results (#12)
replace sns.scatterplot by plt.scatterplot in the example above. Sorry for the error!
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffastlmm%2FFaST-LMM%2Fissues%2F12%23issuecomment-763494516&data=04%7C01%7C%7Ca84cac7f32374201ccdd08d8bd2bc702%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637467343000767367%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Q0Ika3aalHHCuz4rQwe11WNWPhmvl5mnxlgNH7iiwtQ%3D&reserved=0>, or unsubscribe<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABR65PZWNGPACLAGPERFEHDS22T5VANCNFSM4WKNQZHQ&data=04%7C01%7C%7Ca84cac7f32374201ccdd08d8bd2bc702%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637467343000777322%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=F1cVXchmXDTP%2FuQnqi5ZUwsknFsU95xkpo5NR%2Baw3G4%3D&reserved=0>.
|
Hi Carl, Thanks for looking in to it and thanks for your suggestions! I use the LMM class to calculate log likelihoods for a custom implementation of likelihood ratio tests. I also stumbled across lmm_cov yesterday... but it unfortunately doesn't have the function that returns posterior weights. I'm working with Christoph actually! I'll see if he remembers anything about these things. cheers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm using
fastlmm.inference.lmm.LMM
to fit mixed models with no background kernel.After fitting the model, I want to get the posterior weights of the SNPs in the kernel. I do this with
LMM.getPosteriorWeights
. I've noticed thatgetPostiorWeights
returns inconsistent results, depending on how it's parameterized.Here is a full reproducible example:
I now use the second approach with
logdelta
instead ofh2
, because these tests show that the estimated weights are much closer to the true weights.My question is now: am I doing something wrong, or is this a bug?
Also, I would have liked to get the posterioir variances as well. The documentation states that this can be triggered by setting the flag
returnVar = True
. However, this option is not actually an argument to the function.The documentation regarding what is returned is wrong as well. It states that the function should return a dictionary: " weights : [k0+k1] 1-dimensional array of predicted phenotype values". However, it simply returns a numpy array of weights.
The text was updated successfully, but these errors were encountered: