mlm: Non-parametric, Asymptotic P-values for Multivariate Linear...

View source: R/mlm.R

mlmR Documentation

Non-parametric, Asymptotic P-values for Multivariate Linear Models

Description

Fits a multivariate linear model and computes test statistics and asymptotic P-values for predictors in a non-parametric manner.

Usage

mlm(
  formula,
  data,
  transform = "none",
  contrasts = NULL,
  subset = NULL,
  fit = FALSE
)

Arguments

formula

object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which mlm is called.

transform

transformation of the response variables: "none", "sqrt" or "log". Default is "none".

contrasts

an optional list. See contrasts.arg in model.matrix.default. Default is "contr.sum" for ordered factors and "contr.poly" for unordered factors. Note that this is different from the default setting in options("contrasts").

subset

subset of predictors for which summary statistics will be reported. Note that this is different from the "subset" argument in lm.

fit

logical. If TRUE the multivariate fit on transformed and centered responses is returned.

Details

A Y matrix is obtained after transforming (optionally) and centering the original response variables. Then, the multivariate fit obtained by lm can be used to compute sums of squares, pseudo-F statistics and asymptotic P-values for the terms specified by the formula in a non-parametric manner.

Value

mlm returns an object of class "MLM", a list containing:

call

the matched call.

aov.tab

ANOVA table with Df, Sum Sq, Mean Sq, F values, partial R-squared and P-values.

precision

the precision in P-value computation.

transform

the transformation applied to the response variables.

na.omit

incomplete cases removed (see na.omit).

fit

if fit = TRUE the multivariate fit done on the transformed and centered response variables is also returned.

Author(s)

Diego Garrido-Martín

See Also

lm, Anova


isglobal-brge/EpiMutations documentation built on April 20, 2024, 9:05 a.m.