Title: | '--omics' Data Analysis Toolbox |
---|---|
Description: | A collection of functions to analyse '--omics' datasets such as DNA methylation and gene expression profiles. |
Authors: | Gianluca Campanella [aut, cre] |
Maintainer: | Gianluca Campanella <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1-5 |
Built: | 2024-11-15 04:06:25 UTC |
Source: | https://github.com/cran/omics |
Performs (signed) cross phenotype meta-analysis.
cpma(ps)
cpma(ps)
ps |
a (non-empty) numeric vector of |
A list with class htest
containing the following components:
statistic |
the value of the |
parameter |
the estimated rate |
p.value |
the |
method |
a character string indicating the type of test performed. |
data.name |
a character string giving the name of the data. |
Cotsapas, C., et al. 2011 Pervasive Sharing of Genetic Effects in Autoimmune Disease. PLOS Genetics 7(8):e1002254.
Fits multiple linear models.
mlm(formula, data, vars, save.residuals=FALSE)
mlm(formula, data, vars, save.residuals=FALSE)
formula |
an object of class |
data |
an optional data frame, list or environment (or object coercible
by |
vars |
a character vector of variables of interest. |
save.residuals |
whether model residuals should be stored and returned. |
A list with elements:
coefficients |
if 'vars' is missing or non-empty, an array (or data
frame, if |
residuals |
if |
coefs <- matrix(runif(6*10), 6, 10) X <- matrix(rnorm(100*5), 100, 5) Y <- cbind(1, X) models <- mlm(Y ~ X) str(models)
coefs <- matrix(runif(6*10), 6, 10) X <- matrix(rnorm(100*5), 100, 5) Y <- cbind(1, X) models <- mlm(Y ~ X) str(models)
Fits multiple linear mixed-effects models.
mlmer(formula, data, vars, lrt=TRUE, save.residuals=FALSE, save.ranks=TRUE)
mlmer(formula, data, vars, lrt=TRUE, save.residuals=FALSE, save.ranks=TRUE)
formula |
an object of class |
data |
an optional data frame, list or environment (or object coercible
by |
vars |
a character vector of variables of interest. |
lrt |
whether |
save.residuals |
whether model residuals should be stored and returned. |
save.ranks |
whether random effect ranks should be stored and returned. |
A list with elements:
coefficients |
if 'vars' is missing or non-empty, an array (or data
frame, if |
residuals |
if |
ranef.ranks |
if |
Counts the number of missing values.
na.count(X, margin, fraction=TRUE)
na.count(X, margin, fraction=TRUE)
X |
an array, including a matrix. |
margin |
a vector giving the subscripts to count over. |
fraction |
whether to return the fraction of missing values. |
The number (or fraction) of missing values.
-values
Computes value to produce a quantile-quantile plot in scale of
the given
-values.
pqq(ps) pqq.ci(n, level=0.95)
pqq(ps) pqq.ci(n, level=0.95)
ps |
a (non-empty) numeric vector of |
n |
number of |
level |
significance level. |
For pqq
, a list containing the following components (all in
scale):
x |
a vector of (sorted) expected |
y |
a vector of (sorted) observed |
For pqq.ci
, a matrix with the lower and upper bounds for the
confidence interval at the given significance level.
Extracts random effect rank distributions from a linear mixed-effects model.
## S3 method for class 'merMod' ranef.ranks(model, groups)
## S3 method for class 'merMod' ranef.ranks(model, groups)
model |
a linear mixed-effects model estimated using
|
groups |
a character vector of random effects of interest. |
If which
is missing, a list of rank distribution vectors for all
random intercepts in the model.
Otherwise, a list of rank distribution vectors for random intercepts
specified by which
.
Plots the rank distribution matrix for a random effect generated by
mlmer
.
ranks.heatmap(x, col="red")
ranks.heatmap(x, col="red")
x |
a matrix with the rank distribution for a random effect generated
by |
col |
the color corresponding to "higher-than-expected" counts. |
Generates a new plot.
Matches and extracts substrings using regular expressions.
re.match(pattern, x, ...)
re.match(pattern, x, ...)
pattern |
character string containing a regular expression. |
x |
a character vector where matches are sought, or an object which can
be coerced by |
... |
further arguments to be passed to |
This function is a wrapper for consecutive calls to regexec
and
regmatches
.
A matrix of matched substrings.
regexec
and regmatches
Performs set operations on multiple vectors.
mintersect(..., sorted=FALSE) munion(..., sorted=FALSE)
mintersect(..., sorted=FALSE) munion(..., sorted=FALSE)
... |
input vectors |
sorted |
whether the result should be sorted |
Set intersection or union of the given vectors
Extracts variance components from a linear mixed-effects model.
## S3 method for class 'merMod' var.components(model)
## S3 method for class 'merMod' var.components(model)
model |
a linear mixed-effects model estimated using
|
A data frame with elements:
group |
the name of the random effect. |
var.name |
the name of the variable. |
var |
the estimated variance. |
var.prop |
the estimated proportion of variance. |