stephens999 / ashr

An R package for adaptive shrinkage
GNU General Public License v3.0
79 stars 35 forks source link

diagnostic plot for normal likelihood and normal prior mixture #61

Closed LSun closed 7 years ago

LSun commented 7 years ago

diag.ash(ash_obj) produces a Q-Q plot for estimated Fhat vs uniform, which should look like a straight line from 0 to 1 under goodness of fit. please check it makes sense. can add more cosmetic effect to the plot later.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.0%) to 73.875% when pulling 2af50143689f1c51f1be21672b52382df664af7f on LSun:master into b19552efddd8e8da71760aead1e1be5ff3a190d8 on stephens999:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.7%) to 73.185% when pulling f7f8c7c80e5bc9d5e6022bf47a9721255f140161 on LSun:master into b19552efddd8e8da71760aead1e1be5ff3a190d8 on stephens999:master.

LSun commented 7 years ago

removed copied code from plot_diagnostic, used my own simpler implementation implemented uniform prior + normal likelihood uniform prior + t likelihood not yet implemented, can be implemented in future

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.6%) to 73.237% when pulling f8a8462d7cf9d63c1f80de502c969ac8e3cc877b on LSun:master into b19552efddd8e8da71760aead1e1be5ff3a190d8 on stephens999:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.7%) to 73.185% when pulling f8a8462d7cf9d63c1f80de502c969ac8e3cc877b on LSun:master into b19552efddd8e8da71760aead1e1be5ff3a190d8 on stephens999:master.

stephens999 commented 7 years ago

just two things: i) can you add plot.it=TRUE flag to the plot function? Then if it is false don't actually plot the plot? That would allow someone to use this function to compute the cdf values only if they want to. ii) any particularly reason you return it as a list() with a single element, rather than just return a matrix? If not, can you just return a matrix?

LSun commented 7 years ago

i) sure it's done. ii) i just want to give the output a name. no particular reasons, just thought a name would be informative i guess? now it's removed and the function just returns a matrix.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.8%) to 73.08% when pulling ba82bbd02e941d9daa2bef4152cb814bcc68a084 on LSun:master into b19552efddd8e8da71760aead1e1be5ff3a190d8 on stephens999:master.