mc_sample_simple | R Documentation |
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.
mc_sample_simple(
Q,
nu,
de = "U",
tr = "U",
method = c("IS", "vanilla", "both")[1],
pstar = NA,
FNRs = c(0.3, 0.2, 0.1, 0.05, 0.01),
lambda_stars = NULL,
Q_for_fnrs = NULL
)
Q |
the Qij object that is the output of simulate_Qij. |
nu |
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 |
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 |
tr |
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. |
method |
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". |
pstar |
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 |
FNRs |
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). |
lambda_stars |
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. |
Q_for_fnrs |
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. |
The output is a long format data frame.
A long format data frame. It will have a column of tot_loci
that gives the total
number of loci.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.