partialF: A function to compute partial F statistics

Description Usage Arguments Value References See Also Examples

View source: R/partialF.R

Description

This is an internal function used in FSelect. It can only be used for two groups. The partial F statistic is the additional contribution to the model from adding one more trait.

Usage

1
partialF(m.lda, GROUP, T_pm1)

Arguments

m.lda

An object of class 'lda'

GROUP

A factor vector indicating group membership

T_pm1

The F statistic calculated for a discriminant analysis with only the most informative trait.

Value

Returns a partial F statistic

References

Habbema J, Hermans J (1977). Selection of Variables in Discriminant Analysis by F-Statistics and Error Rate. Technometrics, 19(4), 487 - 493.

See Also

FSelect

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Internal function used in FSelect

data(Nuclei)
data(Groups)

NPC<-floor(ncol(Nuclei)/5)

DAT.comp<-completeData(Nuclei, n_pcs = NPC) 
Groups.use<-c(1,2) 
use.DAT<-which(Groups==Groups.use[1]|Groups==Groups.use[2])

DAT.use<-Nuclei[use.DAT,]
GR.use<-Groups[use.DAT]

traitA<-2

mlda<-MASS::lda(GR.use~DAT.use[,traitA])

F1<-partialF(mlda,GR.use,0)

traitB<-1

mlda2<-MASS::lda(GR.use~DAT.use[,c(traitA,traitB)])

partialF(mlda2,GR.use,F1)

multiDimBio documentation built on April 14, 2020, 5:41 p.m.