1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statistic-mlm.R
\name{run_mlm}
\alias{run_mlm}
\title{Multivariate Linear Model (MLM)}
\usage{
run_mlm(
mat,
network,
.source = source,
.target = target,
.mor = mor,
.likelihood = likelihood,
sparse = FALSE,
center = FALSE,
na.rm = FALSE,
minsize = 5
)
}
\arguments{
\item{mat}{Matrix to evaluate (e.g. expression matrix).
Target nodes in rows and conditions in columns.
\code{rownames(mat)} must have at least one intersection with the elements
in \code{network} \code{.target} column.}
\item{network}{Tibble or dataframe with edges and it's associated metadata.}
\item{.source}{Column with source nodes.}
\item{.target}{Column with target nodes.}
\item{.mor}{Column with edge mode of regulation (i.e. mor).}
\item{.likelihood}{Deprecated argument. Now it will always be set to 1.}
\item{sparse}{Deprecated parameter.}
\item{center}{Logical value indicating if \code{mat} must be centered by
\code{\link[base:colSums]{base::rowMeans()}}.}
\item{na.rm}{Should missing values (including NaN) be omitted from the
calculations of \code{\link[base:colSums]{base::rowMeans()}}?}
\item{minsize}{Integer indicating the minimum number of targets per source.}
}
\value{
A long format tibble of the enrichment scores for each source
across the samples. Resulting tibble contains the following columns:
\enumerate{
\item \code{statistic}: Indicates which method is associated with which score.
\item \code{source}: Source nodes of \code{network}.
\item \code{condition}: Condition representing each column of \code{mat}.
\item \code{score}: Regulatory activity (enrichment score).
}
}
\description{
Calculates regulatory activities using MLM.
}
\details{
MLM fits a multivariate linear model for each sample, where the observed
molecular readouts in mat are the response variable and the regulator weights
in net are the covariates. Target features with no associated weight are set
to zero. The obtained t-values from the fitted model are the activities
(\code{mlm}) of the regulators in net.
}
\examples{
inputs_dir <- system.file("testdata", "inputs", package = "decoupleR")
mat <- readRDS(file.path(inputs_dir, "mat.rds"))
net <- readRDS(file.path(inputs_dir, "net.rds"))
run_mlm(mat, net, minsize=0)
}
\seealso{
Other decoupleR statistics:
\code{\link{decouple}()},
\code{\link{run_aucell}()},
\code{\link{run_fgsea}()},
\code{\link{run_gsva}()},
\code{\link{run_mdt}()},
\code{\link{run_ora}()},
\code{\link{run_udt}()},
\code{\link{run_ulm}()},
\code{\link{run_viper}()},
\code{\link{run_wmean}()},
\code{\link{run_wsum}()}
}
\concept{decoupleR statistics}
|