Files
ROBITools/man/dm.univariate.Rd

40 lines
1.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mstat.R
\name{dm.univariate}
\alias{dm.univariate}
\title{Simulate null distribion of the M statistics by Monte-Carlo}
\usage{
dm.univariate(w, groups, resampling = 100)
}
\arguments{
\item{w}{the weigth matrix indicating the presence probability of each motu
in each samples. Each line corresponds to a sample and each column
to a MOTU. \code{rownames} of the \code{w} matrix must be the sample
names.}
\item{groups}{the list of considered groups as computed by the \code{\link{dist.center.group}}
function}
\item{resampling}{the number of simulation to establish the null distribution}
}
\value{
a matrix of M score under the null hypothesis of random distribution of MOTUs
with a MOTUs per line and a culumn per simulation
}
\description{
Computes the null empirical distribution of the M statistics
by shuffling MOTUs among location.
}
\examples{
data(termes)
termes.ok = termes[,colSums(termes$reads)>0]
pos = expand.grid(1:3 * 10,1:7 * 10)
labels = rownames(termes.ok)
d = dist.grid(pos[,1],pos[2],labels)
groups = dist.center.group(d,20)
w = m.weight(termes.ok)
dnull = dm.univariate(w,groups)
}