-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathws_mad_logratio.Rd
More file actions
31 lines (28 loc) · 1.19 KB
/
Copy pathws_mad_logratio.Rd
File metadata and controls
31 lines (28 loc) · 1.19 KB
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/singlesample-within-sample.R
\name{ws_mad_logratio}
\alias{ws_mad_logratio}
\title{Median-centred log-ratio with optional MAD scaling}
\usage{
ws_mad_logratio(x, pseudocount = 0.5, scale_by_mad = TRUE)
}
\arguments{
\item{x}{Samples x features matrix (rows = samples).}
\item{pseudocount}{Additive pseudocount before logging. Default 0.5.}
\item{scale_by_mad}{Logical. If \code{TRUE}, divides each sample by its
per-sample MAD after median-centering. Default \code{TRUE}.}
}
\value{
Same shape as \code{x}; the median-centred (MAD-scaled)
log-abundance values, with attributes \code{centering} and
\code{scaling}.
}
\description{
Robust descriptive transform on log-abundances: subtracts the per-sample
median log-abundance (more robust to outlier features than mean-centering
as in CLR/rCLR) and optionally divides by the per-sample median absolute
deviation (MAD; limits leverage from individual high-magnitude features).
This is NOT an Aitchison-valid simplex projection. It is a robust
descriptive transform on log-abundances, suitable as input to learners
that do not require the zero-sum compositional coordinate constraint.
}