Package 'hiddenf'

Title: The All-Configurations, Maximum-Interaction F-Test for Hidden Additivity
Description: Computes the ACMIF test and Bonferroni-adjusted p-value of interaction in two-factor studies. Produces corresponding interaction plot and analysis of variance tables and p-values from several other tests of non-additivity.
Authors: Jason A. Osborne, Christopher T. Franck and Bongseog Choi
Maintainer: Jason A. Osborne <[email protected]>
License: GPL-2
Version: 2.0
Built: 2024-11-01 11:16:32 UTC
Source: https://github.com/cran/hiddenf

Help Index


Tests for nonadditivity using the hidden F test

Description

Fits a linear model to a (r-by-c) matrix of responses. Includes factorial effects of two factors, with rows of the matrix as one factor with r levels and columns as c levels of another factor. Configurations formed by placing rows into two groups and creating a third grouping factor. Linear models are fit for all b=2^(r-1)-1 possible configurations. The resulting pvalue for group-by-treatment interaction is reported, after Bonferroni correction for multiplicity of configurations.

Details

Package: hiddenf
Type: Package
Version: 2.0
Date: 2015-10-12
License: GPL-2

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi Maintainer: Jason A. Osborne <[email protected]>

References

Franck CT, Nielsen, DM and Osborne, JA. (2013) A Method for Detecting Hidden Additivity in two-factor Unreplicated Experiments, Computational Statistics and Data Analysis, 67:95-104.

Examples

data(cnv1.mtx)
cnv1.out <- HiddenF(cnv1.mtx)
anova(cnv1.out)

Non-additivity pvalues

Description

Reports p-values tests for non-additivity developed by Tukey (1949), Mandel (1961), Kharrati-Kopaei and Sadooghi-Alvandi (2007), Franck, Nielsen and Osborne (2014) and Malik, Mohring and Piepho (2015).

Usage

additivityPvalues(ymtx.out)

Arguments

ymtx.out

An object of class HiddenF created by the HiddenF function.

Value

A list with five component p-values.

Author(s)

Jason A. Osborne [email protected], Christopher T. Franck and Bongseog Choi

References

Tukey, JW (1949). One Degree of Freedom for Non-Additivity. Biometrics, 5:232-242.

Mandel J. (1961) Non-Additivity in Two-Way Analysis of Variance, Journal of the American Statistical Association, 56:878-888

Kharrati-Kopaei, M. and Sadooghi-Alvandi, SM. (2007). A New Method for Testing Interaction in Unreplicated Two-Way Analysis of Variance, Communications in Statistics - Theory and Methods, 36:2787-2803

Franck CT, Nielsen, DM and Osborne, JA. (2013) A Method for Detecting Hidden Additivity in two-factor Unreplicated Experiments, Computational Statistics and Data Analysis, 67:95-104.

Malik, WA, Mohring, J and Piepho, H. (2015) A clustering-based test for non-additivity in an unreplicated two-way layout, Communications in Statistics-Simulation and Computation.

Examples

library(hiddenf)
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
pvalues <- additivityPvalues(cjejuni.out)
print(pvalues)

anova function for the class ‘HiddenF’

Description

Reproduces the analysis of variance table appropriate to the chosen method of analysis. The table contains terms common to the additive model, with additional terms appropriate to the method of analysis. For method="ACMIF", additional terms are group, group-by-column and row-nested-in-group. For method="Mandel", there is a term for slopes, for Tukey, there is a term for the multiplicative coefficient. For method="KKSA", two anova tables are given for the two additive models that lead to the maximally significant F-ratio of error mean squares.

Usage

## S3 method for class 'HiddenF'
anova(object, warncat = TRUE, method = "HiddenF", 
return = FALSE, print = TRUE, stars = FALSE, ...)

Arguments

object

An object of class HiddenF

warncat

A boolean argument that can be used to suppress a warning message about multiplicity adjustment to reported pvalues

method

An argument to specify which test of non-additivity is to be considered

return

A boolean argument determining whether summary statistics are to be returned as a list

print

A boolean argument for whether to display the anova tables

stars

A boolean argument that may be used to suppress the stars in the anova tables

...

Additional Arguments

Value

An object of class ‘anova’

Author(s)

Jason A. Osborne, Bongseog Choi and Christopher T. Franck

References

Tukey, JW (1949). One Degree of Freedom for Non-Additivity. Biometrics, 5:232-242.

Mandel J. (1961) Non-Additivity in Two-Way Analysis of Variance, Journal of the American Statistical Association, 56:878-888

Kharrati-Kopaei, M. and Sadooghi-Alvandi, SM. (2007). A New Method for Testing Interaction in Unreplicated Two-Way Analysis of Variance, Communications in Statistics - Theory and Methods, 36:2787-2803

Franck CT, Nielsen, DM and Osborne, JA. (2013) A Method for Detecting Hidden Additivity in two-factor Unreplicated Experiments, Computational Statistics and Data Analysis, 67:95-104.

Examples

data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
anova(cjejuni.out)
anova(cjejuni.out,method="KKSA")

Multi-headed Machine Data

Description

Performance of a multiple-headed machine used to fill bottles. Weights for six heads on five occasions were recorded.

Usage

data(Boik.mtx)

Source

Boik, RJ. (1993) A comparison of three invariant tests of additivity in two-way classifications with no replications, Computational Statistics & Data Analysis, 15:411-424.

Examples

data(Boik.mtx)
Boik.out <- HiddenF(Boik.mtx)
anova(Boik.out)

Annual prevalence of C.jejuni strain of Campylobacter

Description

Data are courtesy of Dr. Sophia Kathariou and Yucan Liu, North Carolina State University. The entries in the matrix are fractions of campylobacter strains sampled that were classified as C.jejuni. Data were collected over 5 year period across four turkey plants in North Carolina. Rows are plants, columns are years 2008-2012.

Usage

data(cjejuni.mtx)

Value

matrix of C.jejuni fractions

Examples

data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
plot(cjejuni.out)

Copy Number Dataset, Probe #1

Description

Data from an experiment (courtesy of Matthew Breen, N.C. State University) to study copy number variation in dogs. Experiment included thousands of probes, one of which is included here.

Usage

data(cnv1.mtx)

Value

cnv1.mtx

Matrix of copy number measurements for one specific probe. Measured for two types of tissue (columns) on each of six dogs (rows) with lymphoma.

Examples

data(cnv1.mtx)
cnv1.out <- HiddenF(cnv1.mtx)
summary(cnv1.out)

Copy Number Variation

Description

Data from an experiment (courtesy of Dr. Matthew Breen, N.C. State University) to study copy number variation in dogs. Experiment included thousands of probes, several of which are included here, and indexed by the variable called ‘dataset’.

Usage

data(cnvall.mtx)

Value

cnvall.mtx

Matrix of copy number measurements for several probes. Measured for two types of tissue (columns) on each of six dogs (rows) with lymphoma. Copy Number measurements are one column in the matrix and it is not formatted for functions in 'hiddenf' that require matrix input.

Examples

data(cnvall.mtx)
cnvall.mtx
cnv3.mtx <- matrix(cnvall.mtx[25:36,3],byrow=TRUE,nrow=12,ncol=2)
cnv3.out <- HiddenF(cnv3.mtx)
print(cnv3.out$pvalue)
anova(cnv3.out)

Wheat Yields

Description

Wheat yields from four genotypes in randomized block design with 13 locations.

Usage

data(Graybill.mtx)

Value

Graybill.mtx

Matrix of wheat yields, rows are locations, columns are genotypes

Source

Graybill, FA. (1954) Variance Heterogeneity in a Randomized Block Design, Biometrics, 10:516-520.

Examples

## Not run: 
data(Graybill.mtx)
Graybill.out <- HiddenF(Graybill.mtx)
plot(Graybill.out) 

## End(Not run)

Hidden F function for matrix data

Description

Fits linear model to ymtx, a matrix of responses of dimension r-by-c. Constructs all possible configurations of rows into two non-empty groups, then, for each configuration, fits full factorial effects models with three factors for group, group-by-column, row and row nested within column. The maximum F-ratio for group-by-column interaction is reported along with Bonferroni-adjusted p-value.

Usage

HiddenF(ymtx)

Arguments

ymtx

A matrix of responses, with rows corresponding to levels of one factor, and columns the levels of a second factor

Value

List-object of class ‘HiddenF’ with components

adjpvalue

(Bonferroni-adjusted) pvalue from configuration with maximal hidden additivity

config.vector

Vector of group indicators for configuration with maximal hidden additivity

tall

A list with components y, row, col

cc

Number of possible configurations

Author(s)

Jason A. Osborne [email protected], Christopher T. Franck and Bongseog Choi

References

Franck CT, Nielsen, DM and Osborne, JA. (2013) A Method for Detecting Hidden Additivity in two-factor Unreplicated Experiments, Computational Statistics and Data Analysis, 67:95-104.

See Also

summary.HiddenF

Examples

library(hiddenf)
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
summary(cjejuni.out)

Kharrati-Kopaei and Sadooghi-Alvandi's test for non-additivity

Description

Reports the p-value from Kharrati-Kopaei and Sadooghi-Alvandi's test for non-additivity. This procedure searches over all configurations of rows of the input matrix into two non-empty sets, each having at least two elements. Separate linear models in which row and column effects are additive are fit to each set, and the configuration with maximum ratio of error mean squares is reported, along with a p-value.

Usage

KKSAPvalue(hfobj)

Arguments

hfobj

An object of class HiddenF created by the HiddenF function

Details

Requires that data matrix has more than four rows (r > 4)

Value

A list containing the input data matrix converted to list form, a numeric p-value from a test of the hypothesis of additivity, and a vector giving the corresponding configuration of rows into two groups.

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi

References

Kharrati-Kopaei, M. and Sadooghi-Alvandi, SM. (2007). A New Method for Testing Interaction in Unreplicated Two-Way Analysis of Variance, Communications in Statistics - Theory and Methods, 36:2787-2803.

See Also

HiddenF, additivityPvalues

Examples

library(hiddenf)
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
KKSA.out <- KKSAPvalue(cjejuni.out)
print(KKSA.out$pvalue)

Malik's test for non-additivity

Description

Computes the p-value from the clustering-based test for non-additivity developed in Malik, et al. (2015).

Usage

MalikPvalue(hfobj, N=500,pnote=TRUE)

Arguments

hfobj

An object of class HiddenF created by the HiddenF function

N

The number of Monte Carlo datasets used to determine critical thresholds for Malik's test statistic. Default value is N=500

pnote

Boolean variable that can be used to suppress note about number of Monte Carlo datasets used to estimate pvalue

Value

A Monte Carlo estimate of the p-value from the Malik et al (2015) test of non-additivity. The standard error of this estimate is inversely proportional to the square root of N.

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi

References

Malik, WA, Mohring, J and Piepho, H. (2014) A clustering-based test for non-additivity in an unreplicated two-way layout, Communications in Statistics-Simulation and Computation.

See Also

HiddenF, additivityPvalues

Examples

## Not run: 
library(hiddenf)
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
cjejuni.MalikPvalue <- MalikPvalue(cjejuni.out)

## End(Not run)

Malik's critical values

Description

This function computes Monte Carlo estimates of critical values for Malik's test for non-additivity at significance levels .01,.05 and .1

Usage

MalikTab(r, c, N=1000)

Arguments

r

Number of levels of row factor

c

Number of levels of column factor

N

Number of additive datasets to be generated for Monte Carlo estimation of critical values

Value

A list with several components:

Tcsim

a random sample of N test statistics from Malik's procedure under the hypothesis of additivity

q

a vector with first two elements equal to the number of levels of the row and column factors, along with the 99th, 95th and 90th quantiles from the random sample

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi

References

Malik, WA, Mohring, J and Piepho, H. (2014) A clustering-based test for non-additivity in an unreplicated two-way layout, Communications in Statistics-Simulation and Computation, just-accepted

See Also

MalikPvalue

Examples

# get critical values to conduct Malik's test of additivity
# in an experiment with row and column factors with 4 and 5 levels,
# respectively
## Not run: 
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
Malik.pvalue <- MalikPvalue(cjejuni.out)
cjejuni.Malikobj <- Maliktab(4,5,N=1000)
print(cjejuni.Malikobj$q)

## End(Not run)

Mandel's rows-linear test for non-additivity

Description

Computes the p-value from Mandel's rows-linear test for non-additivity. (The columns-linear test may be conducted by first transposing the input matrix argument.)

Usage

MandelPvalue(hfobj)

Arguments

hfobj

An object of class HiddenF created by the HiddenF function

Value

A p-value from a test of the hypothesis of additivity, along with component sums of squares used to compute p-value.

Author(s)

Jason A. Osborne and Christopher T. Franck and Bongseog Choi

References

Mandel J. (1961) Non-Additivity in Two-Way Analysis of Variance, Journal of the American Statistical Association, 56:878-888.

See Also

HiddenF, additivityPvalues

Examples

## Not run: 
library(hiddenf)
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
kksa.pvalue <- KKSAPvalue(cjejuni.out)

## End(Not run)

Interaction plot

Description

Interaction plot with levels of row factor colored according to configuration that maximizes hidden additivity.

Usage

## S3 method for class 'HiddenF'
plot(x,y=NULL,main="Hidden Additivity Plot",
rfactor="Rows Factor",cfactor="Columns Factor", colorvec=c("black","red"),
legendx=FALSE,center=FALSE,...)

Arguments

x

Object of class 'HiddenF'

y

Deprecated variable not used in this version of plot

main

Plot Title

rfactor

Label of trace variable (row factor) for optional legend of the interaction plot

cfactor

Label of variable (column factor) on the horizontal axis

colorvec

Vector of colors for the two groups in interaction plot

legendx

Graphical parameter that allows for an optional legend, whose location is determined by point-and-click interface

center

Center the data about the row means

...

Allows for the use of other graphical parameters for matplot or legend

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi

See Also

HiddenF

Examples

data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
plot(cjejuni.out)

Printing hiddenf objects

Description

‘print’ method for class ‘HiddenF’

Usage

## S3 method for class 'HiddenF'
print(x, method = "ACMIF", ...)

Arguments

x

An object of class ‘HiddenF’

method

The name of the test for interaction. Could be "ACMIF","TUKEY","MANDEL","KKSA", or "MALIK"

...

further arguments

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi

References

Tukey, JW (1949). One Degree of Freedom for Non-Additivity. Biometrics, 5:232-242.

Mandel J. (1961) Non-Additivity in Two-Way Analysis of Variance, Journal of the American Statistical Association, 56:878-888

Kharrati-Kopaei, M. and Sadooghi-Alvandi, SM. (2007). A New Method for Testing Interaction in Unreplicated Two-Way Analysis of Variance, Communications in Statistics - Theory and Methods, 36:2787-2803

Franck CT, Nielsen, DM and Osborne, JA. (2013) A Method for Detecting Hidden Additivity in two-factor Unreplicated Experiments, Computational Statistics and Data Analysis, 67:95-104.

Malik, WA, Mohring, J and Piepho, H. (2015) A clustering-based test for non-additivity in an unreplicated two-way layout, Communications in Statistics-Simulation and Computation.

See Also

HiddenF

Examples

data(cnv1.mtx)
cnv1.out <- HiddenF(cnv1.mtx)
print(cnv1.out)

Summary function for the class "HiddenF"

Description

Summarize the results of the ACMIF test for nonadditivity

Usage

## S3 method for class 'HiddenF'
summary(object, method="HiddenF",...)

Arguments

object

An object of class "HiddenF"

method

the method to be used; if "ACMIF", the configuration with maximal hidden additivity is printed along with the mean response for each column after grouping rows according to this maximal configuration. No summary generated for other methods

...

other arguments

Value

group1

Vector of levels of row factor in group 1

group2

Vector of levels of row factor in group 2

grp1means

Vector of column means among rows in group 1

grp2means

Vector of column means among rows in group 1

Author(s)

Christopher T. Franck and Jason A. Osborne

References

Franck CT, Nielsen, DM and Osborne, JA. (2013) A Method for Detecting Hidden Additivity in two-factor Unreplicated Experiments, Computational Statistics and Data Analysis, 67:95-104.

See Also

HiddenF

Examples

data(Boik.mtx)
Boik.out <- HiddenF(Boik.mtx)
Boik.summary <- summary(Boik.out)

Tukey's single degree of freedom test for nonadditivity

Description

Reports the p-value from Tukey's single degree of freedom test for non-additivity

Usage

TukeyPvalue(hfobj)

Arguments

hfobj

An object of class hiddenf created by the hiddenf function

Value

A list with two components: (1) a numeric p-value from Tukey's single degree of freedom test of the hypothesis of additivity and (2) an object of class ‘lm’ corresponding to the linear model additive in row and column effects.

Author(s)

Jason A. Osborne, Christopher T. Franck and Bongseog Choi

References

Tukey, JW (1949). One Degree of Freedom for Non-Additivity. Biometrics, 5:232-242.

See Also

additivityPvalues

Examples

library(hiddenf)
data(cjejuni.mtx)
cjejuni.out <- HiddenF(cjejuni.mtx)
tukey.pvalue <- TukeyPvalue(cjejuni.out)