rondolab / MR-PRESSO

Performs the Mendelian Randomization Pleiotropy RESidual Sum and Outlier (MR-PRESSO) method.
81 stars 30 forks source link

Results documentation #5

Closed jean997 closed 5 years ago

jean997 commented 5 years ago

Hi, I was wondering if it was possible to get more details about the output of the mr_presso function. In particular, sometimes I get NAs on the "outlier-corrected" line line of the "Main MR Results". It seems like perhaps this indicates that there are no outliers detected? Is this true? Is it intended that in this case the "Raw" analysis is the one to use?

jean997 commented 5 years ago

Just to follow up on this, it seems like sometimes the results object contains different output. For example, here are two different outputs I have gotten:

 names(x)
[1] "Main MR results"   "MR-PRESSO results"
> x["MR-PRESSO results"]
$`MR-PRESSO results`
$`MR-PRESSO results`$RSSobs
[1] 22.91759

$`MR-PRESSO results`$Pvalue
[1] 0.52

> x["Main MR results"]
$`Main MR results`
    Exposure       MR Analysis Causal Estimate         Sd   T-stat      P-value
1 beta_hat_1               Raw        0.102604 0.01292843 7.936309 1.318584e-07
2 beta_hat_1 Outlier-corrected              NA         NA       NA           NA
names(x)
[1] "Main MR results"   "MR-PRESSO results"
> x["Main MR results"]
$`Main MR results`
    Exposure       MR Analysis Causal Estimate         Sd    T-stat    P-value
1 beta_hat_1               Raw      0.01921694 0.03962269 0.4849984 0.63468417
2 beta_hat_1 Outlier-corrected      0.03866405 0.01502921 2.5725929 0.02317967

> x["MR-PRESSO results"]
$`MR-PRESSO results`
$`MR-PRESSO results`$`Global Test`
$`MR-PRESSO results`$`Global Test`$RSSobs
[1] 131.3622

$`MR-PRESSO results`$`Global Test`$Pvalue
[1] "<0.001"

$`MR-PRESSO results`$`Outlier Test`
         RSSobs Pvalue
1  8.904711e-05      1
2  2.477096e-05      1
3  3.701909e-03 <0.016
4  1.611971e-05      1
5  1.135607e-05      1
6  6.915967e-05      1
7  1.360702e-04      1
8  1.364427e-04      1
9  2.605893e-05      1
10 1.213919e-05      1
11 5.647508e-06      1
12 1.050940e-03 <0.016
13 6.410559e-05      1
14 6.436356e-05      1
15 4.046002e-06      1
16 6.507896e-05      1

$`MR-PRESSO results`$`Distortion Test`
$`MR-PRESSO results`$`Distortion Test`$`Outliers Indices`
[1]  3 12

$`MR-PRESSO results`$`Distortion Test`$`Distortion Coefficient`
beta_hat_1 
 -50.29766 

$`MR-PRESSO results`$`Distortion Test`$Pvalue
[1] 0.433

so the "MR-PRESSO results" object seems to contain different components.

rondolab commented 5 years ago

Hi, in the case where the argument "OUTLIERtest" is set to "FALSE", only the global test, and neither the outlier test nor the distortion test, are performed hence reported. This explains your first result object. In that case, x$`MR-PRESSO results` contains only one "RSSobs" value and one "Pvalue" which are associated with the global test. In addition, x$`Main results` contains NA instead of values for the Outlier-corrected MR results since outliers were not tested for. In that case, the "raw" results might be used if MR-PRESSO global test indicates no significant pleiotropy, that is if x$`MR-PRESSO results`$Pvalue > SignifThreshold.

We will modify this to keep the structure of the list no matter whether "OUTLIERtest" is set to "TRUE" or "FALSE".

rondolab commented 5 years ago

It has been modified accordingly. Let us know if this is not OK. Best.

heyiamstella commented 5 years ago

Hi, I was wondering why I didn't get the results from outliertest and distortion test? Is that mean there is no significant pleiotropy, because the results of Global Test`$Pvalue was 1(greater than SignifThreshold)?

The results as shown below. Thanks!

mr_presso(BetaOutcome = "beta_out", BetaExposure = "BETA_exp",SdOutcome = "SE", SdExposure = "SE_exp",OUTLIERtest = TRUE, DISTORTIONtest = TRUE,data = hdlc78_1,NbDistribution = 1000,SignifThreshold = 0.05) $Main MR results Exposure MR Analysis Causal Estimate Sd T-stat P-value 1 BETA_exp Raw -0.5950071 0.05968816 -9.968595 1.65948e-15 2 BETA_exp Outlier-corrected NA NA NA NA

$MR-PRESSO results $MR-PRESSO results$Global Test $MR-PRESSO results$Global Test$RSSobs [1] 30.83441

$MR-PRESSO results$Global Test$Pvalue [1] 1

rondolab commented 5 years ago

Hi, indeed you are not getting any results for the outlier or distortion tests because the global test is not significant so there is no reason to test for outliers since there is no horizontal pleiotropy according to the global test. The global test P-value is equal to 1 in your case and therefore > 0.05 (which is the significance threshold specified by the argument "SignifThreshold"). Best.