View source: R/sampling.processes.R
generate.sample.outcomes.matrix | R Documentation |
This function takes an scan.h2lmm() object, and returns a specified number of outcome samples, either permutations or from the null model of no locus effect.
generate.sample.outcomes.matrix(
scan.object,
model.type = c("null", "alt"),
method = c("bootstrap", "permutation", "subsample"),
subsample.prop = 0.63,
subsample.chr = NULL,
use.REML = TRUE,
use.BLUP = FALSE,
num.samples,
seed = 1
)
scan.object |
A scan.h2lmm() object. |
model.type |
DEFAULT: "null". "null" specifies sampling processes from the null model. "alt" specifies sampling processes from the alternative model. |
method |
DEFAULT: "bootstrap". "bootstrap" specifies parametric bootstraps from the given model. "permutation" specifies parametric permutations that can respect the structure of the data. Permutations are more appropriate if the data have highly influential data points. "subsample" specifies randomly sampling without replacement some proportion of the data. This is done by placing NAs in the observations not selected. |
subsample.prop |
DEFAULT: 0.63. The proportion of the original data set to sample. |
subsample.chr |
DEFAULT: NULL. If method "subsample" is specified, no locus need be specified. If NULL, the default behavior is to grab the locus (and chromosome) with the peak association. If chromosome is specified, its peak locus will be grabbed to be passed to the scanning procedure. |
use.REML |
DEFAULT: TRUE. Determines whether the variance components for the parametric sampling are based on maximizing the likelihood (ML) or the residual likelihood (REML). |
use.BLUP |
DEFAULT: FALSE.This results in the BLUP value of the polgyene effect (assuming a GRM has been given) is used, rather than sampled. This reduces the variation seen across sampling, which can result in narrower positional confidence intervals. |
num.samples |
The number of parametric bootstrap samples to return. |
seed |
DEFAULT: 1. The sampling process is random, thus a seed must be set for samples to be consistent across machines. |
generate.sample.outcomes.matrix()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.