-
Notifications
You must be signed in to change notification settings - Fork 45
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
Estimated residual variance is negative #188
Comments
Here is a full repro, with simplified input files: library(data.table)
library(susieR)
set.seed(1)
raw_file <- "raw.txt"
raw_matrix <- fread(raw_file, sep=" ", header=FALSE)
num_samples <- nrow(raw_matrix)
cor_matrix <- cor(raw_matrix)
eqtl_file <- "eqtl.txt"
eqtl <- fread(eqtl_file, sep=" ", header=TRUE)
fitted_rss <- susie_rss(
bhat = eqtl$beta,
shat = eqtl$se,
n = num_samples,
R = cor_matrix,
estimate_residual_variance = TRUE,
verbose = TRUE) |
@karenfeng Since you have the full (individual-level) data, you could also try running |
Note I made a couple small changes to your example above to make it reproducible. |
@karenfeng I can also confirm that setting |
When running Susie RSS with the following command:
I encounter the following issue:
I am using an in-sample LD matrix generated with
cor()
, so it is symmetric positive semi-definite (as discussed in #91).The issue goes away if I change
estimate_prior_method
from the default (optim
) toEM
orsimple
.Could you clarify how to resolve this problem? I also saw the suggestion that
estimate_residual_variance
should always beFALSE
as in #162 (comment), but I'm not sure if this is a universal suggestion.The text was updated successfully, but these errors were encountered: