calcPillaiPval: Calculate the Pillai pvalue for a categorical predictor...

View source: R/CompDTUReg.R

calcPillaiPvalR Documentation

Calculate the Pillai pvalue for a categorical predictor (usually condition)

Description

calcPillaiPval calculate the Pillai pvalue for a categorical predictor

Usage

calcPillaiPval(
  SigmaTildeNull,
  SigmaTildeAlt,
  lm_model_fit = NULL,
  q,
  nsamp,
  df_residual = NA
)

Arguments

SigmaTildeNull

is the null covariance to be used

SigmaTildeAlt

is the alternative covariance to be used

lm_model_fit

is a lm object from the regression model if interest. If specified it can be used to extract the degrees of freedom of the residual (df_residual) otherwise this must be specified

q

is degrees of freedom of the categorical predictor being tested in the current hypothesis test (usually condition). For example, with 2 condition levels q is 1, with 3 levels q is 2, etc

nsamp

is the number of samples used in the analysis. Note that this is the number of unique biological samples and is thus not a function of the number of inferential replicates used in an analysis.

df_residual

is the degrees of freedom of the residual. Can be extracted from the lm_model_fit object otherwise has to be specified. Equal to the number of samples used minus the number of total coefficients fit by the model.

Value

The p-value from the Pillai significance test.


skvanburen/CompDTUReg documentation built on Jan. 23, 2025, 9:01 a.m.