Commit ed93a054 by Eric Coissac

Ajout des aides

parent c921b9c4
......@@ -18,4 +18,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
PackageRoxygenize: rd,collate,namespace,vignette
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{AIC.pm}
\alias{AIC.pm}
\title{Compute the Akaike Information criterion (AIC) for a procruste model.}
\usage{
\method{AIC}{pm}(object, ..., k = length(object$coefficients))
}
\description{
Compute the Akaike Information criterion (AIC) for a procruste model.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{BIC.pm}
\alias{BIC.pm}
\title{Compute the Bayesian Information criterion (BIC) for a procruste model.}
\usage{
\method{BIC}{pm}(object, ..., k = length(object$coefficients))
}
\description{
Compute the Bayesian Information criterion (BIC) for a procruste model.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{as.procmod.frame}
\alias{as.procmod.frame}
\title{Coerce to a ProcMod Frame.}
\usage{
as.procmod.frame(data, ...)
}
\description{
Coerce to a ProcMod Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{as.procmod.frame.array}
\alias{as.procmod.frame.array}
\title{Coerce to a ProcMod Frame.}
\usage{
\method{as.procmod.frame}{array}(data, ...)
}
\description{
Coerce to a ProcMod Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{as.procmod.frame.list}
\alias{as.procmod.frame.list}
\title{Coerce to a ProcMod Frame.}
\usage{
\method{as.procmod.frame}{list}(data, ...)
}
\description{
Coerce to a ProcMod Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{as.procmod.frame.pm}
\alias{as.procmod.frame.pm}
\title{Coerce to a ProcMod Frame.}
\usage{
\method{as.procmod.frame}{pm}(data, ...)
}
\description{
Coerce to a ProcMod Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{as.procmod.frame.procmod.frame}
\alias{as.procmod.frame.procmod.frame}
\title{Coerce to a ProcMod Frame.}
\usage{
\method{as.procmod.frame}{procmod.frame}(data, ...)
}
\description{
Coerce to a ProcMod Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariate.R
\name{bicenter}
\alias{bicenter}
\title{Double centering of a matrix.}
\usage{
bicenter(m)
}
\description{
colSums and rowSums of the returned matrix are all equal to zero.
}
\details{
Inspired from the algorithm described in stackoverflow
\url{https://stackoverflow.com/questions/43639063/double-centering-in-r}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{deviance.pm}
\alias{deviance.pm}
\title{Model Deviance for the procruste model.}
\usage{
\method{deviance}{pm}(object, ...)
}
\value{
The value of the deviance extracted from the object object.
}
\description{
Returns the deviance of a fitted model object.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{dim.procmod.frame}
\alias{dim.procmod.frame}
\title{Dimensions of a Matrix Frame.}
\usage{
\method{dim}{procmod.frame}(x)
}
\description{
Dimensions of a Matrix Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariate.R
\name{dist2orthospace}
\alias{dist2orthospace}
\title{Project a distance matrix in a euclidean space.}
\usage{
dist2orthospace(distances, tol = 1e-07)
}
\description{
Project a set of points defined by a distance matrix in
an eucleadean space. If the used distance is a metric,
this is done using the \code{\link[ProcMod]{pcoa}} function,
otherwise the \code{\link[ProcMod]{nmds}} is used.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{extractAIC.pm}
\alias{extractAIC.pm}
\title{Compute the Akaike Information criterion (AIC) for a procruste model.}
\usage{
\method{extractAIC}{pm}(fit, scale, k = 2, ...)
}
\description{
Compute the Akaike Information criterion (AIC) for a procruste model.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formula.procmod.frame.R
\name{formula.procmod.frame}
\alias{formula.procmod.frame}
\title{Build a formula from a procmod.frame.}
\usage{
\method{formula}{procmod.frame}(x, ...)
}
\description{
Build a formula from a procmod.frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anova.pm.R
\name{getPermuteMatrix}
\alias{getPermuteMatrix}
\title{Generate permutation matrix according to a schema.}
\usage{
getPermuteMatrix(perm, N, strata = NULL)
}
\description{
The permutation schema is defined using the `how` function.
The implementation of this function is currectly extraced
from the VEGAN package and just copied pasted here to avoid
dependency on an hidden vegan function.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariate.R
\name{is.euclid}
\alias{is.euclid}
\title{Test if the distance matrix is euclidean.}
\usage{
is.euclid(distances, tol = 1e-07)
}
\description{
Actually a simplified version of the ADE4 implementation
(\code{\link[ade4]{is.euclid}}).
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{is.pm}
\alias{is.pm}
\title{Tests that the object is as `pm` instance.}
\usage{
is.pm(obj)
}
\description{
Tests that the object is as `pm` instance.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{is.procmod.frame}
\alias{is.procmod.frame}
\title{Check if an object is a Matrix Frame.}
\usage{
is.procmod.frame(x)
}
\description{
Check if an object is a Matrix Frame.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcov.R
\name{mcor}
\alias{mcor}
\title{Compute the person correlation matrix of K coordinate matrices}
\usage{
mcor(...)
}
\description{
Compute the person correlation matrix of K coordinate matrices
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcov.R
\name{mcor.partial}
\alias{mcor.partial}
\title{Compute the person partial correlation matrix of K coordinate matrices}
\usage{
mcor.partial(...)
}
\description{
Compute the person partial correlation matrix of K coordinate matrices
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcov.R
\name{mvar}
\alias{mvar}
\title{Compute the variance, covariance matrix of K coordinate matrices.}
\usage{
mvar(...)
}
\arguments{
\item{...}{the set of matrices}
}
\description{
Covariance between two matrices is defined as the sum of the
sigular values of the X'Y matrix. All the matrices must have
the same number of rows.
}
\examples{
# Build Three matrices of 3 rows.
A <- matrix(1:9,nrow=3)
B <- matrix(10:15,nrow=3)
C <- matrix(20:31,nrow=3)
# compute the variance covariance matrix
mvar(A,B,C)
mvar(A=A,B=B,C=C)
}
\author{
Eric Coissac & Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariate.R
\name{nmds}
\alias{nmds}
\title{Project a distance matrix in a euclidean space (NMDS).}
\usage{
nmds(distances, maxit = 50, trace = TRUE, tol = 0.001, p = 2)
}
\description{
Project a set of points defined by a distance matrix in
an eucleadean space using the Kruskal's Non-metric
Multidimensional Scaling. This function is mainly a simplified
interface on the \code{\link[MASS]{isoMDS}} function using as
much as possible dimensionsto limit the stress. The aims of this
NDMS being only to project point in an orthogonal space therefore
without any correlation between axis. Because a non-metric method
is used no condition is required on the used distance.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariate.R
\name{pca}
\alias{pca}
\title{Project a set of points in a euclidean space (PCA).}
\usage{
pca(data, scale = FALSE)
}
\description{
Project a set of points in a euclidean space (PCA).
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariate.R
\name{pcoa}
\alias{pcoa}
\title{Project a distance matrix in a euclidean space (PCOA).}
\usage{
pcoa(distances)
}
\description{
Project a set of points defined by a distance matrix in
an eucleadean space using the Principal Coordinates Analysis
method. This function is mainly a simplified
interface on the \code{\link[stats]{cmdscale}} function using as
much as possible dimensions for the projection. The aims of this
PCoA being only to project point in an orthogonal space therefore
without any correlation between axis. Because a metric method
is used the used distance must be euclidean
(cf \code{\link[ProcMod]{is.euclid}}).
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.pm.R
\name{plot.pm}
\alias{plot.pm}
\title{Default plot function for `pm` objects.}
\usage{
\method{plot}{pm}(m, points.cex = 0.6, labels.cex = 0.6,
arrow.length = 0.05, asp = 1, ...)
}
\description{
Default plot function for `pm` objects.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{pm}
\alias{pm}
\title{Performs a procruste model on a set of coordinate matrices}
\usage{
pm(formula, data, subset, weights, na.action, method = "qr",
singular.ok = TRUE, tol = 1e-07, model = TRUE, x = TRUE, y = TRUE,
A = TRUE)
}
\description{
Performs a procruste model on a set of coordinate matrices
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{print.pm}
\alias{print.pm}
\title{Default display function for `pm` objects.}
\usage{
\method{print}{pm}(m, ...)
}
\description{
Default display function for `pm` objects.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod.frame.R
\name{procmod.frame}
\alias{procmod.frame}
\title{Build a procmod.frame data structure.}
\usage{
procmod.frame(..., row.names = NULL, check.rows = FALSE,
check.names = TRUE, reorder.rows = FALSE)
}
\description{
Build a procmod.frame data structure.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{residuals.pm}
\alias{residuals.pm}
\title{Extract Model Residuals.}
\usage{
\method{residuals}{pm}(object, type = c("working", "response", "deviance",
"pearson", "partial"), ...)
}
\arguments{
\item{type}{the type of residuals which should be returned.
Can be abbreviated.}
\item{obj}{R object of class `pm`}
}
\value{
Numeric matrix of n rows, where n is the number
of observations.
}
\description{
residuals is a generic function which extracts model
residuals from objects returned by modeling functions.
The abbreviated form resid is an alias for residuals.
It is intended to encourage users to access object
components through an accessor function rather than by
directly referencing an object slot.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.procmod.R
\name{vars.procmod}
\alias{vars.procmod}
\title{Plays the role of model.matrix in classical lm}
\usage{
vars.procmod(object, data = environment(object), xlev = NULL, ...)
}
\description{
Plays the role of model.matrix in classical lm
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mprocuste.R
\name{weighted.residuals}
\alias{weighted.residuals}
\title{Compute Weighted Residuals.}
\usage{
weighted.residuals(obj, drop0 = TRUE)
}
\arguments{
\item{obj}{R object of class `pm`}
\item{drop0}{logical. If `TRUE``, drop all cases with `weights` == 0.}
}
\value{
Numeric matrix of n' rows, where n' is the number
of of non-0 weights (drop0 = TRUE) or
the number of observations, otherwise.
}
\description{
Computed weighted residuals from a procrustean model fit.
}
\author{
Eric Coissac
Christelle Gonindard-Melodelima
}
## ----setup, include = FALSE----------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ------------------------------------------------------------------------
library(ProcMod)
## ------------------------------------------------------------------------
data("eukaryotes")
data("bacteria")
## ------------------------------------------------------------------------
data("soil")
data("climat")
data("geography")
## ------------------------------------------------------------------------
library(vegan)
bac.hellinger = decostand(bacteria,method ="hellinger")
euk.hellinger = decostand(eukaryotes,method ="hellinger")
## ------------------------------------------------------------------------
bac.bray = vegdist(bac.hellinger,method = "bray")
euk.bray = vegdist(euk.hellinger,method = "bray")
## ------------------------------------------------------------------------
soil.rescaled = scale(soil, center = TRUE, scale = TRUE)
climat.rescaled = scale(climat, center = TRUE, scale = TRUE)
## ------------------------------------------------------------------------
data = procmod.frame(euk = euk.bray,
bac = bac.bray,
climat = climat,
soil = soil,
geography = geography)
## ------------------------------------------------------------------------
euk.pm = pm(formula = euk ~ soil + climat + geography, data = data)
euk.pm
## ------------------------------------------------------------------------
plot(euk.pm)
## ------------------------------------------------------------------------
anova(euk.pm)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment