Learn R Programming

MRPC (version 2.0.0)

InferenceAccuracyExample: Comparison of inference accuracy with and without a v-structure

Description

This is the example comparison of inference accuracy with and without a v-structure by recall and precision of three methods, MPRC, mmhc, and pc, across 1000 data sets. Signal values indicate the signal strength: the larger the value the stronger the signal. The sample size in each simulated data set is 1000. See Badsha and Fu, 2018 for the comparison of inference accuracy with sample sizes of 50, 200, and 500 .

Usage

InferenceAccuracyExample(N = 1000, signal, model, ita = 1000)

Arguments

N

Number of observation

signal

The coefficient of parent nodes in the linear model. For example, strong = 1.0, moderate = 0.5, and weak = 0.2 signal strengths.

model

The model data will be simulated for. For example, if you want comparison of inference accuracy without a v-structure you would type 'model1' into the function. If you want comparison of inference accuracy with a v-structure you would type 'model2' into the function.

ita

Number of different data sets

Value

Matrix

Details

The output is a matrix, where the rows are the three methods, MRPC, mmhc, and pc, and the colums are mean Recall, sd Recall, mean Precision, and sd Precision, respectively.

References

1. Badsha MB, Fu AQ (2018). Learning causal biological networks with the principle of Mendelian randomization." bioRxiv. doi:10.1101/171348.

See Also

Recall_Precision: Performance Evaluation by Recall and Precision in MRPC.

Examples

Run this code
# NOT RUN {
# Comparison of inference accuracy without a v-structure 
# across 10 data sets and sample size in each simulated 
# data set is set to 100 with signal = 1.0. 
Result1 <- InferenceAccuracyExample(N = 100, signal = 1.0,
                                    'model1', ita = 10)

# Comparison of inference accuracy with a v-structure
# across 10 data sets and sample size in each simulated 
# data set is set to 100 with signal=1.0. 
Result2 <- InferenceAccuracyExample(N = 100, signal = 1.0,
                                    'model2', ita = 10)

# }

Run the code above in your browser using DataLab