unitest: Univariate F or t testing

View source: R/unitest.R

unitestsR Documentation

Univariate F or t testing

Description

The functions perform F or t testing for several responses based on a matrix of hypothesis observations and a matrix of error observations.

Usage

unitests(xyObj)

unitest(modelData, errorData, dfError = dim(errorData)[1])

Arguments

xyObj

a design-with-responses object created by xy_Obj

modelData

matrix of hypothesis observations

errorData

matrix of error observations

dfError

Degrees of freedom for error needs to be specified if errorData is incomplete

Details

modelData and errorObs correspond to hypObs and errorObs calculated by xy_Obj. These matrices are efficient representations of sums of squares and cross-products (see xy_Obj for details). This means the univariate F-statistics can be calculated straightforwardly from these input matrices. Furthermore, in the single-degree-of-freedom case, t-statistics with correct sign can be obtained.

unitests is a wrapper function that calls unitest for each term in the xyObj (see xy_Obj for details) and collects the results.

Value

unitest returns a list with components

pValues

p-values

stat

The test statistics as t-statistics (when single degree of freedom) or F-statistics

unitests returns a list with components

pRaw

Matrix of p-values from unitest, one row for each term.

stat

Matrix of test statistics from unitest, one row for each term.

Note

The function calculates the p-values by making a call to pf.

Author(s)

Øyvind Langsrud and Bjørn-Helge Mevik

See Also

rotationtest, rotationtests


bhmevik/ffmanova documentation built on Oct. 23, 2023, 9:45 a.m.