View source: R/instability_scans.R
generate.simple.sample.outcomes.matrix | R Documentation |
This function draws simple bootstraps or permutations from a data set and returns a specified number of outcome samples.
generate.simple.sample.outcomes.matrix(
formula,
data,
pheno.id = "SUBJECT.NAME",
method = c("bootstrap", "permutation"),
use.REML = TRUE,
num.samples,
seed = 1
)
formula |
An lm style formula with functions of outcome and covariates contained in data frame. |
data |
A data frame with outcome and potential covariates. Should also have IDs that link to IDs in the genome cache, often with the individual-level ID named "SUBJECT.NAME", though others can be specified with pheno.id. |
pheno.id |
DEFAULT: "SUBJECT.NAME". The is the individual-level ID that is associated with data points in the phenotype data. Generally this should be unique for each data point. |
method |
DEFAULT: "bootstrap". "bootstrap" specifies that bootstrap samples are drawn from a simple Gaussian based on the formula argument. "permutation" specifies simple permutations, essentially re-mixing the actual outcome vector. |
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). |
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.simple.sample.outcomes.matrix()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.