mc_sample_simple.Rd
Once you have gotten an object of class Qij from simulate_Qij
you can pass that
to this function along with instructions on what quantities to compute.
This version assumes that the denominator of Lambda and the true relationship can be specified as a
a simple, single
relationship (typically, and by default, "U"), rather than a mixture of
possible relationships. Code for the latter has not yet been implemented.
the Qij object that is the output of simulate_Qij.
the name of the relationship that is in the numerator
of the likelihood ratio (Lambda) whose distribution you wish to learn about.
It is a string, for example "FS", or "PO", or "U". The Q values for that
relationship must be included in parameter Q. If this is a vector, then
all different values are used in combination with all the values of
de
, tr
, and, possibly, pstar
. Corresponds to column "numerator" in the output
the relationship that appears in the denominator of Lambda.
By default it is "U". Corresponds to column "denominator" in the output. If it
is a vector, then all values are done iteratively in combination with other values as
described for nu
.
the true relationship of the pairs. Default is "U". (i.e. you are going to get samples of Lambda under their distribution when the true relationship is tr). Operates over all values if a vector. Corresponds to column "true_relat" in the output.
the Monte Carlo method to use. Either "IS" for importance sampling, "vanilla" for vanilla Monte Carlo---regular Monte Carlo without importance sampling---or or "both". The method that was used for any row of the output is reported in the column "mc_method".
the relationship used for the importance sampling distribution.
If set as NA and importance sampling (method == "IS" or "both") is used, then
the value of nu
is used as need be. If not NA, then this can be a vector
of relationships. Each value will be used in all combinations of pstar, nu, de, and tr.
This is reported in column "pstar" in the output. For the vanilla method this is
actually set to the be denominator for each lambda.
the false negative rates at which to evaluate the false positive rates. These are reported in column "fnr" in the output. These should all be between 0 and 1. By default fnr is c(0.3, 0.2, 0.1, 0.05, 0.01, 0.001).
Additional values of lambda to consider as cutoffs. The corresponding false negative rates will be computed for each of these and will be presented in the output.
The Qij struct to use to compute the Lambda values corresponding to the given FNRs. This is used primarily for the situation where you are importance sampling with truth = Unrelated and doing physically linked markers.
A long format data frame. It will have a column of tot_loci
that gives the total
number of loci.
The output is a long format data frame.