GithubHelp home page GithubHelp logo

mraid's People

Contributors

yuanzhongshang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mraid's Issues

How to comfirm the suitable parametters of MRAID

Hi,
I found in my analysis, in a situation that uses the same data, the default parameters of MRAID, the results are so different, the difference of causal_pvalue between two runnings could be three orders of magnitude. It may be due to the unsuitable parameters I have used but without any way to check whether they are suitable or not, and I don't know how to find the suitable parameters in the right way.
Thanks for any help!

Issue with Gibbs sampler when standard errors are small

Hi Zhongshang,
Thank you for making this nice method!

We have been experimenting with it and have mostly gotten very good results but ran into some issues where it seems like the Gibbs sampler may be failing to explore the whole likelihood leading to occasionally very "off" estimates. We found that artificially increasing the noise of the estimates solves the problem so it could be related to the sampling strategy or step size.

I am attaching an example data set where we see the issue. In this data, the true causal effect is 0.1. The sample size for trait 1 is 10k and the sample size for trait 2 is 500k. If we run MRAID on the original data, it usually generates a causal estimate near -0.05

library(dplyr)
library(MRAID)
library(purrr)
dat <- readRDS("mraid_debug_data.RDS")
set.seed(1)
fit_orig <-  replicate(n = 10, expr = { with(dat,
                                             MRAID(Zscore_1 = SNP_data$bx/SNP_data$bxse,
                                                   Zscore_2 = SNP_data$by/SNP_data$byse,
                                                   Sigma1sin = LD_matrix,
                                                   Sigma2sin = LD_matrix,
                                                   samplen1 = 10000, samplen2 = 500000,
                                                   burninproportion = 0.2, Gibbsnumber = 1000))}, simplify = FALSE)
map(fit_orig, "causal_effect") %>% unlist()
# [1] -0.04894335 -0.04813901 -0.05256924 -0.04656615 -0.05139219 -0.05226496 -0.05669891 -0.04600676 -0.04565323 -0.05410061

In this example, the sampler is always giving a similar result, though we have also seen examples where we get a range of results over different runs of MRAID.

However, when we artificially increase the standard error for trait 2 estimates and decrease the trait 2 sample size we get much better solutions and MRAID consistently gives the same/similar results over multiple runs:

fit_more_noise <-  replicate(n = 10, expr = { with(dat,
                                             MRAID(Zscore_1 = SNP_data$bx/SNP_data$bxse,
                                                   Zscore_2 = SNP_data$by/(sqrt(10)*SNP_data$byse),
                                                   Sigma1sin = LD_matrix,
                                                   Sigma2sin = LD_matrix,
                                                   samplen1 = 10000, samplen2 = 50000,
                                                   burninproportion = 0.2, Gibbsnumber = 1000))}, simplify = FALSE)
map(fit_more_noise, "causal_effect") %>% unlist()
# [1] 0.09584193 0.09732339 0.09578834 0.09525779 0.09496835 0.09560519 0.09525171 0.09473296 0.09605512 0.09543104

We were hoping to find a solution to this issue. Perhaps you could add user facing options for tuning the Gibbs sampler. Also -- would it be possible to return the likelihood at the the returned solution? That would help in diagnosing which mode was better if we see multiple solutions over several runs.

Thanks!
Jean
mraid_debug_data.RDS.tar.gz

Issue Installing MRAID

Hello I am trying to install MRAID and getting the following error message:

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [MRAID.so] Error 1
ERROR: compilation failed for package ‘MRAID’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/MRAID’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/c2/5ksg_m2x2s12wrg58xkrp4fw0000gn/T//RtmpQoKMoF/file5b9164c83e9b/MRAID_1.0.tar.gz’ had non-zero exit status

I haven't had any other issues installing R packages in R recently so I'm wondering if this has something to do with MRAID?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.