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 |
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).
additivityPvalues(ymtx.out)
additivityPvalues(ymtx.out)
ymtx.out |
An object of class |
A list with five component p-values.
Jason A. Osborne [email protected], Christopher T. Franck and Bongseog Choi
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.
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) pvalues <- additivityPvalues(cjejuni.out) print(pvalues)
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) pvalues <- additivityPvalues(cjejuni.out) print(pvalues)
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.
## S3 method for class 'HiddenF' anova(object, warncat = TRUE, method = "HiddenF", return = FALSE, print = TRUE, stars = FALSE, ...)
## S3 method for class 'HiddenF' anova(object, warncat = TRUE, method = "HiddenF", return = FALSE, print = TRUE, stars = FALSE, ...)
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 |
An object of class ‘anova’
Jason A. Osborne, Bongseog Choi and Christopher T. Franck
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.
data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) anova(cjejuni.out) anova(cjejuni.out,method="KKSA")
data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) anova(cjejuni.out) anova(cjejuni.out,method="KKSA")
Performance of a multiple-headed machine used to fill bottles. Weights for six heads on five occasions were recorded.
data(Boik.mtx)
data(Boik.mtx)
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.
data(Boik.mtx) Boik.out <- HiddenF(Boik.mtx) anova(Boik.out)
data(Boik.mtx) Boik.out <- HiddenF(Boik.mtx) anova(Boik.out)
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.
data(cjejuni.mtx)
data(cjejuni.mtx)
matrix of C.jejuni fractions
data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) plot(cjejuni.out)
data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) plot(cjejuni.out)
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.
data(cnv1.mtx)
data(cnv1.mtx)
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. |
data(cnv1.mtx) cnv1.out <- HiddenF(cnv1.mtx) summary(cnv1.out)
data(cnv1.mtx) cnv1.out <- HiddenF(cnv1.mtx) summary(cnv1.out)
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’.
data(cnvall.mtx)
data(cnvall.mtx)
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. |
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)
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 from four genotypes in randomized block design with 13 locations.
data(Graybill.mtx)
data(Graybill.mtx)
Graybill.mtx |
Matrix of wheat yields, rows are locations, columns are genotypes |
Graybill, FA. (1954) Variance Heterogeneity in a Randomized Block Design, Biometrics, 10:516-520.
## Not run: data(Graybill.mtx) Graybill.out <- HiddenF(Graybill.mtx) plot(Graybill.out) ## End(Not run)
## Not run: data(Graybill.mtx) Graybill.out <- HiddenF(Graybill.mtx) plot(Graybill.out) ## End(Not run)
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.
HiddenF(ymtx)
HiddenF(ymtx)
ymtx |
A matrix of responses, with rows corresponding to levels of one factor, and columns the levels of a second factor |
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 |
Jason A. Osborne [email protected], Christopher T. Franck and Bongseog Choi
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.
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) summary(cjejuni.out)
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) summary(cjejuni.out)
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.
KKSAPvalue(hfobj)
KKSAPvalue(hfobj)
hfobj |
An object of class |
Requires that data matrix has more than four rows (r > 4)
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.
Jason A. Osborne, Christopher T. Franck and Bongseog Choi
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.
HiddenF, additivityPvalues
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) KKSA.out <- KKSAPvalue(cjejuni.out) print(KKSA.out$pvalue)
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) KKSA.out <- KKSAPvalue(cjejuni.out) print(KKSA.out$pvalue)
Computes the p-value from the clustering-based test for non-additivity developed in Malik, et al. (2015).
MalikPvalue(hfobj, N=500,pnote=TRUE)
MalikPvalue(hfobj, N=500,pnote=TRUE)
hfobj |
An object of class |
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 |
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.
Jason A. Osborne, Christopher T. Franck and Bongseog Choi
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.
HiddenF, additivityPvalues
## Not run: library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) cjejuni.MalikPvalue <- MalikPvalue(cjejuni.out) ## End(Not run)
## Not run: library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) cjejuni.MalikPvalue <- MalikPvalue(cjejuni.out) ## End(Not run)
This function computes Monte Carlo estimates of critical values for Malik's test for non-additivity at significance levels .01,.05 and .1
MalikTab(r, c, N=1000)
MalikTab(r, c, N=1000)
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 |
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 |
Jason A. Osborne, Christopher T. Franck and Bongseog Choi
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
MalikPvalue
# 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)
# 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)
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.)
MandelPvalue(hfobj)
MandelPvalue(hfobj)
hfobj |
An object of class |
A p-value from a test of the hypothesis of additivity, along with component sums of squares used to compute p-value.
Jason A. Osborne and Christopher T. Franck and Bongseog Choi
Mandel J. (1961) Non-Additivity in Two-Way Analysis of Variance, Journal of the American Statistical Association, 56:878-888.
HiddenF, additivityPvalues
## Not run: library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) kksa.pvalue <- KKSAPvalue(cjejuni.out) ## End(Not run)
## Not run: library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) kksa.pvalue <- KKSAPvalue(cjejuni.out) ## End(Not run)
Interaction plot with levels of row factor colored according to configuration that maximizes hidden additivity.
## 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,...)
## 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,...)
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 |
Jason A. Osborne, Christopher T. Franck and Bongseog Choi
data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) plot(cjejuni.out)
data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) plot(cjejuni.out)
‘print’ method for class ‘HiddenF’
## S3 method for class 'HiddenF' print(x, method = "ACMIF", ...)
## S3 method for class 'HiddenF' print(x, method = "ACMIF", ...)
x |
An object of class ‘HiddenF’ |
method |
The name of the test for interaction. Could be "ACMIF","TUKEY","MANDEL","KKSA", or "MALIK" |
... |
further arguments |
Jason A. Osborne, Christopher T. Franck and Bongseog Choi
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.
HiddenF
data(cnv1.mtx) cnv1.out <- HiddenF(cnv1.mtx) print(cnv1.out)
data(cnv1.mtx) cnv1.out <- HiddenF(cnv1.mtx) print(cnv1.out)
Summarize the results of the ACMIF test for nonadditivity
## S3 method for class 'HiddenF' summary(object, method="HiddenF",...)
## S3 method for class 'HiddenF' summary(object, method="HiddenF",...)
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 |
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 |
Christopher T. Franck and Jason A. Osborne
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.
HiddenF
data(Boik.mtx) Boik.out <- HiddenF(Boik.mtx) Boik.summary <- summary(Boik.out)
data(Boik.mtx) Boik.out <- HiddenF(Boik.mtx) Boik.summary <- summary(Boik.out)
Reports the p-value from Tukey's single degree of freedom test for non-additivity
TukeyPvalue(hfobj)
TukeyPvalue(hfobj)
hfobj |
An object of class |
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.
Jason A. Osborne, Christopher T. Franck and Bongseog Choi
Tukey, JW (1949). One Degree of Freedom for Non-Additivity. Biometrics, 5:232-242.
additivityPvalues
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) tukey.pvalue <- TukeyPvalue(cjejuni.out)
library(hiddenf) data(cjejuni.mtx) cjejuni.out <- HiddenF(cjejuni.mtx) tukey.pvalue <- TukeyPvalue(cjejuni.out)