I have two groups, drug treated vs control, and obtained tissue and made measurements at 5 different time points. A 2-way ANOVA works for some of the variables which are normally distributed, however I'm not sure what test to use for the non-normally distributed ones. Samples size varies but ranges from 7-15 per group at each time point.
Dear Robert,
Take a look at the Sokal and Rohlf's "Biometry" (chapter 13, page 446 of the third edition, that I have). There you will find the Scheirer-Ray-Hare extension of the Kruskal Wallis test, which meets your need. You can perform part of the test in SPSS (data ranking and two-way anova of the ranked data). You have to use the spss output to calculate the SS/MS values (which is the H value) for each factor and interaction. The significance of H is tested as a chi-square variable, with the degrees of freedom pertaining to the SS being tested. This is how I do it.
Good luck.
PS: If you need a post-hoc analysis after that, use Mann-Whitney U test with Bonferroni correction of alpha for the number of comparisons (divide alpha by the number of comparisons).
All the best,
Carlos
It depends on what do you consider to be "non-parametric". If you are talking about classical tests like Friedman and Kruskal-Wallis, I believe the answer is "no". But you can try two-way ANOVA based on Monte Carlo simulations or bootstrap. This way, you will construct your own "null distribution", without Normality assumption.
But are you really sure that you can not use usual two-way ANOVA? There are a lot of discussions here about the real need of Normality.
.
hi sandro,
i am certainly missing something here : why wouldn't Friedman's Two-Way Analysis of Variance by Ranks work (in theory, at least !) ?
.
Is it because of the different sample size across time points, Sandro? A mixed-effect model might be in order, with or without the MC/bootstrap options. I agree that non-normality is not so worrisome on the outcome-measure side. Non-normality on the predictor side can be trouble, but it sounds like you have a fairly straightforward design without non-normal covariates.
Fabrice,
It could be a possible solution, but I do not know it enough to recommend. I have three reasons: first, I do not know studies testing its power; second, I do not performed any simulation to test it; third, I have serious doubts about the use of classical non-parametric tests simple because sample size is small. Aditionally, it is important to remember that changing from ANOVA to Friedman or other non-parametric test changes the statistic analysed and the interpretation.
But if you can solve my doubts about studies using this test, who knows, it can be my next recommendation?
.
sandro, got your point ; i too would not "recommend" this test for want of sufficient experience with it but i still would "suggest" that the closest "thing" to a "non parametric 2 way anova" is this Friedman test (and yes, it changes the interpretation as it tests a difference in the medians ... but well, this is often the case when you go from parametric to non parametric !)
.
You can use the 'aligned rank transform' before applying a regular ANOVA
See e.g.:
-ARTool by Wobbrock et al. : http://depts.washington.edu/aimgroup/proj/art/
-Beasley & Zumbo: http://www.soph.uab.edu/Statgenetics/People/MBeasley/Beasley-Zumbo-AlignedRanks-JMASM-2009.pdf
- Kaptein et al, http://dmrussell.net/CHI2010/docs/p2391.pdf
-Brunner: http://www.jstatsoft.org/v50/i12/paper
- Rodriguez: http://www.ncbi.nlm.nih.gov/pubmed/19178870
or a randomization test:
e.g. Cassell: http://www2.sas.com/proceedings/sugi27/p251-27.pdf
Try Wilcoxon sign rank-sum test or Mann–Whitney U test and Kruskal-Wallis test, these are the appropriate statistical test for non-normal distributed data set.
You can use the Kruskal-Wallis test or Friedman test.
A good site: http://www.portalaction.com.br
Before trying to use non parametrics tests, do you made transformation of your data ? I have the same problem i have 2 factors also (photoperiod and time) and when my data are not normally distrubuted i apply a log transformation, a square root transformation and even arcsin transfoamtion when my data are proportions (little link to explain transformation http://udel.edu/~mcdonald/stattransform.html). And if it does'nt work, I use Kruskal-Wallis and Mann whitney test and apply them on factors and interactions (Photoperiod -Time 1 vs photoperiod 1 Time 2, photoperiod 1 Time 1 vs photoperiod 1 Time 3 etc.) and make one Kruskal-Wallis test on photoperiod and one on time.
Imen ben ammar, you essentally are doing a posteriori tests. You should first (a priori) test whether at all there is an interaction between 'PhotoperiodxTime'. You could try the 'aligned rank transform' . See my first answer to this topic above. In any case, you should make corrections (e.g. Bonferroni) is you perfomr multiple tests/comparisons on the same data.
There are different methods dependin on whether you want to include an interaction in your test. I suggest you to see: van der Laan, P. & Verdoren, L.R. (1987). Classical Analysis of Variance Methods and Nonparametric Counterparts. Biom. J. 29, 635-665
Hierarchical log linear analysis also works like two way ANOVA,particularly its k-way and higher order effects.
Thanks for all your responses. All very helpful. They definitely highlight the point that for, what I thought was quite a standard experimental design, there is a lot of variation in the opinions of how to analyse this.
The KW Test is for the one factor case only.
In the two factor case, we have limited options available.
When one of the two factors is a blocking factor, the we can use Friedman's Test for a nonparametric Randomized Complete Block Design.
With a factorial experiment with two (or more factors), I opt for a rank based method that works very well. Some would call it "robust" and not nonparametric, but it explained well in the text by William Conover. I mean the Normal Scores Test that is similar to what originally Van der Waerden proposed as a test with Asymptotic Relative Efficiency of at least 1.
Basically, we map the ordered array of raw data into a standard normal distribution, and we use the corresponding z values, or the normal scores. Among all proposed rank based tests, only this tests has been shown to have an acceptable test for interaction. Main effects tests have no problems for many rank based tests as each main effect is like a one factor case.
In SAS, I prefer the BLOM option for the normal scores. I have been using this approach for several years now. I do not know of any other valid options here.
A nice plus for this method is making the interpretations of the results much easier since z scores follow a Normal (0,1) distribution, and the differences are expressed in standard errors.
I do have ordinal data that are simultaneously affected by two factors. Since a standard 2-way ANOVA requires interval data, I've just tried the ARTool suggested above to align-rank my original data. Now I'm a bit puzzled how to make use of the output. I understand that I may use the ART columns created for main effects as input for a one-way ANOVA (since they have basically been stripped of other main effects). But how would I make use of the final column created for interaction effects? How would I get the A*B factor? I'd like to use SPSS for the subsequent analyses, so any suggestions would be much appreciated.
Dear Robert,
Take a look at the Sokal and Rohlf's "Biometry" (chapter 13, page 446 of the third edition, that I have). There you will find the Scheirer-Ray-Hare extension of the Kruskal Wallis test, which meets your need. You can perform part of the test in SPSS (data ranking and two-way anova of the ranked data). You have to use the spss output to calculate the SS/MS values (which is the H value) for each factor and interaction. The significance of H is tested as a chi-square variable, with the degrees of freedom pertaining to the SS being tested. This is how I do it.
Good luck.
PS: If you need a post-hoc analysis after that, use Mann-Whitney U test with Bonferroni correction of alpha for the number of comparisons (divide alpha by the number of comparisons).
All the best,
Carlos
Hi Carlos, many thanks for your suggestions. I'll take a look at the book chapter you've recommended but basically I was hoping to make do with a regular factorial ANOVA after having align-ranked the data. This procedure has been described here: http://terpconnect.umd.edu/~leahkf/pubs/CHI2011-wobbrock-AlignedRankTransform.pdf I'm just trying to understand how to further process the output of the rank-alignment.
There is a R package suited voor your design: npIntFactRep
http://cran.r-project.org/web/packages/npIntFactRep/npIntFactRep.pdf
With SAS you could use the macro in attachment.
Both are based on: Beasley & Zumbo (2009). Aligned rank tests for interactios in split-plot designs: ... Journal of Modern Applied Statistical Methos, 8, 16-50.
Thank you for the very helpful question and replies. I am also happy to see the specific chapter and page reference to Sokal and Rohlf -biometry (my STATs bible from grad school).
Hi, is there a similar package in R, to address performing an alternative to two-way ANOVA of data which are not normal and violate homoscedascity but are not reapeated measures?. Tank you
You might also want to look into CHAID (CHi-squared Automatic Interaction Detection), a set of nonparametric procedures for constructing interactions generally in the form of contingent decision trees. Versions of this procedure, originally developed at the University of Michigan's Survey Research Center, have been used for nearly 50 years now in the analysis of extremely complex social research data. Check the link below for more information.
http://www.statisticssolutions.com/non-parametric-analysis-chaid/
Dear Dr. Andrew Bond,
I am working on analyses of designed experiments for non-normal data (parametric inference). If you can share the data with me, I can see which distribution it fits well and suggest a parametric appropriate procedure for the same.
If u can share the data, it will be a great help to me also.
Often if a particular distribution fits well to the data, it can produce more efficient inference than a non-parametric version.
Dr. Kulkarni.
Agree with Carlos. There is no single straight forward test/procedure in any of the software to deal this type of problem.
Dear Andrew,
PERMANOVA is entirely capable of taking this on. There are at least two implementations in R (adonis and vegan) that can deal with unbalanced repeated measures. That said, Anderson herself warns that in some cases the unbalanced nature will lead to biased p values. Since this is something that can be easily verified it is still my preferred option.
I will also point out that you can analyse this in a Bayesian way using BAYESFACTOR or JASP. Again, some homework is required to makes sense of the results but bayesian shrinkage is perfect for the unequal n. However this is 'somewhat' parametric so it depends on your reasoning for wanting a non-parametric test.
Your choice should be guided by what you believe is the reason for the unequal variances. I trust PERMANOVA for this sort of job, but am not sure why you avoid all parametric testing. You can accommodate a wide variety of distributions using a gllmm representation which will naturally accommodate differences in dispersion over conditions.
Oh dear - I just saw the date on the original question. I hope it all went well!
Hi all,
I have two groups (one experimental which took exercises) and another control. I used the ankle joint functional tool in assessment twice; before and after exercises for the experimental group and twice at the same time intervals for the control group. I found both the homogenity of variance and normality tests violated. Accordingly, I want to know the non-parametric equivalent of the Mixed Design ANOVA test......Can you help me with this?
Regards
Amira
You can use the Quade (1967) RANCOVA, i.e. an ANCOVA for the
between group effect on the residuals from the regression of the ranked aftertest (criterion) on the ranked beforetest (covariate). Alternatively, you could first rank before- and aftertetests separately and the run an ANCOVA with the ranked aftertest as outcome and the groups as predictor togetthger with the ranked bofore test as covariate, i.e. a regression analysis: rank_after = group + rank_before.
D. Quade. Rank analysis of covariance. Journal of the American Statistical Association, 62(320):1187–1200,
1967.
Quade's RANCOVA is a simple ANOVA for the Group effect on the residuals of a regression of ranked after-test on ranked before-test. So, 1) rank the before- and after-tests separalety, over Groups, 2) run a regression analysis of ranked after-test on ranked before-test (after = before), select the residuals, 3) run an regular ANOVA on these residuals for the between Group effect. Succes!
We have just published an article to solve this problem:
Fan and Zhang (2017). Rank Repeated Measures ANCOVA. Communications in Statistics-Theory and Methods, 46, 1158-1183.
http://www.tandfonline.com/doi/abs/10.1080/03610926.2015.1014106
SAS code using traditional PROC MIXED to realize the method can be found in the Appendix of the article.
You must account for repeated measures. Check Fan and Zhang (2017) and other papers on repeated measures.
The Aligned Rank Transform (ART) procedure was designed to solve your problem. ARTool is an R package implementing the Aligned Rank Transform for conducting nonparametric analyses of variance on factorial models. The package automates the Aligning-and-Ranking process using the art function. It also automates the process of running a series of ANOVAs on the transformed data and extracting the results of interest. It supports traditional ANOVA models (fit using lm), repeated measures ANOVAs (fit using aov), and mixed effects models (fit using lmer); the model used is determined by the formula passed to art.
You can see this package manual by this link address:
https://cran.r-project.org/web/packages/ARTool/ARTool.pdf
It seems to me that the med2way function included in the WRS2 package for R should answer the question. See the example included, which uses repeated measurements.
Hello ,
You may use the Scheirer-Ray-Hare Test : https://www.youtube.com/watch?v=N729aMGIUOk
and available as a R package
regards
Fabien, SRH test does not seem different than ANOVA for ranks.
Raid, R's nparLD may help you and I second that WRS2 has valuable methods.
Hello,
You're perfectly right, it works on ranks. You may also use, as you suggested, analysis on trimmed mean as explained in the excellent book : Discovering statistics using R by Andy Field.
I quote :
As with one-way ANOVA, Wilcox (2005) describes robust procedures for conducting factorial ANOVA. To access these we need to load the WRS package (see section 5.8.4.). There are four functions that we will look at:
t2way(): This performs a two-way independent ANOVA on trimmed means.
mcp2atm(): This performs post hoc tests for a two-way independent design based on trimmed means.
pbad2way(): This performs a two-way independent ANOVA using M-measures of location (e.g., the median) and a bootstrap.
mcp2aQ: This performs post hoc tests for the above function.
I would not recommend the Scheirer-Ray-Hare test. Calvin Dytham has shown (on page 175 in his book 'Choosing and Using Statistics', 3rd Ed, Wiley, 2011) that: " In the parametric version of the test [on the starlings data] both factors were significant as was the interaction, which demonstrates how weak this test is." In the parametric test, all effects (sex, day and the interaction) are significant. Wit the SRH test, only sex is significant. With the aligned ranks test from the ART package, again all factors are significant.
You can apply the Aligned Rank Transform to conduct nonparametric analyses of variance on factorial models using the ARTool library in R. An explanation of the package and examples are given in the following site:
https://github.com/mjskay/ARTool .
hello,
The problem raised by Jos is different. A weakness or a robustness of a test may be a concern but this is not the critical point to me.
One should not choose the test that gives the best outcome in terms of significance (or non significance). P(
Kind of late to this, but here it goes. One can try a rank transform on the data and running a regular 2-factor ANOVA over the transformed data.
Just be careful of the interaction term, which may have an inflated type I error if H0 is also rejected for both the two factors. If this happens, instead of a straight forward rank transform, try instead the so-called "aligned rank transform" (available on the R package: ARTool) before running the ANOVA.
See e.g. https://www.researchgate.net/publication/268028362_An_aligned_rank_transform_test_for_interaction
Article An aligned rank transform test for interaction
Raid Amin please give some references for Van der Waerden scores methods..
See if this is what you need:
https://www.unistat.com/guide/nonparametric-tests-friedman-two-way-anova/
From the description it looks like pharmacodynamic or pharmacokinetic setup. Then you might consider looking at the tools able for such investigations. In that case the whole ANOVA problem becomes irrelevant. I also just realized that your question was put four years ago so this input is likely irrelevant too...
See the paper:
Comparison of nonparametric analysis of variance
methods - a Vote for van der Waerden by Haiko Luepsen
Link: Article Comparison of nonparametric analysis of variance methods a M...
Yes the most widely used one is Friedman's two-way ANOVA which is basically suing ranks instead of Y values. It is available in most Stat softwares such as SAS and SPSS
Friedman test considers 2 factors of classification, and consequently is equivalent to 2-way ANOVA.
Mourad: There is a difference between a block design and a factorial experiment. A 2 factor ANOVA usually means testing the two main effects and the interaction between the two factors. In a block design (such as the Friedman Test) we remove from the random variability any systematic error due to the blocking, and we only test the treatment factor. There is no interaction test possible and the block test is meaningless since usually blocks are not replicated unless you use a replicated block design.
If there are only two groups, drug treated vs control, and obtained tissue and made measurements at 5 different time points then I have not understood how a 2-way ANOVA can be applicable here. This is an study between two groups. Accordingly, the test statistic depends on the objective of what is to be known.
you can have a look in the following paper for parametric non-normal two group comparisons which although deals with zero inflated data, can also be used for purely continuous or purely discrete data by taking weight (probability of zeros) associate with zerPreprint Two Sample Comparisons Including Zero-Inflated Continuous Da...
o portion equal to zero.As I understand, this is a case of two sample comparison: one sample on drug treated and the other on control. Accordingly, 2 way ANOVA will not be applicable here. Thus, searching for some non-parametric alternative of 2 way ANOVA will not come to benefit in the case of this problem.
It is possible that the "5 time points" refer to the 5 levels of the second factor. It is not clear to me whether this is a repeated measures design or whether different experimental units were used at each of the five time points in this post from over 4 years ago. In the end, it was a good discussion about the two factor case here.
Hi Andrew,
I think Friedman's Two-way Analysis of Variance can do it.
Please take a looke at the following:
http://psych.unl.edu/psycrs/handcomp/hcfried.PDF
https://www.youtube.com/watch?v=fBlwUeldVrA
Thanks, Ahmad
There is a small problem with the time series measurements since they are not independent of another. The sample taken at a given point in time is depending on the previous one. Have you tried to solve this problem as a pharmacokinetic one?
There are several questions that should be considered. The first: is the drug having any effects? second: how does time effect controls and treatments? If there are no time effects in controls and there are time effects with treatments, then the treatment effects can be related to the drug. If both control and treatment groups change over time, how different are the changes? And how does multiple doses over time effect the outcome? Also is there much noise in the measurements or are they error free? Your sample size is small, so look at your data. How much difference is there between the start of the study and the end of the study both within the test group, within the control group, and between test group and control group? Plot changes over time for each tissue sample and compare the plots. Are changes over time linear, asymptotic, etc.? And if there are affects are they of practical significance? Good luck with the study.
Kruskal-Wallis H test can be an alternative of ANOVA and hence may be used.
The KW Test is a rank based one factor ANOVA methodology. It would not be suitable if in fact the experiment involves two factors and an interaction term. The most appropriate modeling depends on a full understanding of the posted question, which may not have been very clearly stated over 4 years ago.
Hello,
Raid is right. Many appropriated) answers have been given over 4 years. This is not a forum to post any idea passing trough your mind. Read the question, read the answers, read stat books and the try to give a pertinent answer.
Have a good evening
Some of you (Joel Aclao, Dhritikesh Chakrabarty) recommended Kruskal-Wallis H test. Is it OK to use it for, definitely, dependent variables, i.e. same people/animals from several time points?
KW is for independent groups. Think the Friedmann test is preferable for dependent groups, i.e. same subjects under different circumstances.
The point raised by Robert Kuba Filipkowski is to be thought of and to be analyzed.
Robert Kuba Filipkowski , Kruskal-Wallis assumes independence of observations, so having dependent, repeated, or paired measurements would violate this assumption.
As Nuno Miguel Marques de Sousa suggests, Friedman test is a possibility for dependent observations. However, it is can be used only in cases of unreplicated complete block design. That is, one and only one observations per person per time. And it can't handle observations any more complex than that.
The solution for most of these questions is the aligned ranks approach that Raid Amin and @Jos Feys mentioned above. It allows for relatively complex designs, factorial designs, and repeated measures. Its limitations are 1) that is allows only factor independent variables; no continuous predictors. And 2) it uses a subtraction step to make the alignment, so the data have to be at least interval in nature; that is, you can't have a truly ordinal DV.
Thank you! Still, a practical question: Statistica (the program) allows to run KW test with GROUP independent variable and many dependent variables (columns) at the same time. In the GROUP one can program 2 or more groups (control, experimental 1, 2, etc.; independent(!)) and then ask the program to run one analysis on many columns of results with one final result (p level). I was encouraged this can analyze many timepoints (dependent variables) of the same measurements for 2-3 independent groups and signal whether there are at all any differences within any of the columns (timepoints). Is this all wrong?
Otherwise, what would the program measure in such situation?
I would check out the user manual to see if such an approach takes into account the experimentwise Type I Error rate, in addition to checking whether such modeling results in an inflated mean square error. Not all software packages are 100% error free, and it is important to have a detailed documentation of the used procedure. SAS has a detailed user manual online, with clearly listed references and explanations on the theory being behind each procedure in SAS. I would never depend fully on some software packaage unless you fully understand the theory behind the used methodology.
I agree with Robert. This applies very well with group independent variable and many dependent variables.
Robert Kuba Filipkowski
Is the program Statistica working such as you wrote ??
" In the GROUP one can program 2 or more groups (control, experimental 1, 2, etc.; independent(!)) and then ask the program to run one analysis on many columns of results with one final result (p level). I was encouraged this can analyze many timepoints (dependent variables) of the same measurements for 2-3 independent groups and signal whether there are at all any differences within any of the columns (timepoints). "
How could you do it??
Thank you for your advise.
I do agree with the explanation given by Alexandra Tijerina .
Dear Dr. Andrew Bond,
There is Robust ANOVA, used for Measurement uncertainty arising from sampling: http://www.rsc.org/Membership/Networking/InterestGroups/Analytical/AMC/Software/RobustStatistics.asp
Yours sincerely,
Elcio Cruz de Oliveira
Have you considered the Central Limit Theorem? Does your data meet its requirements? Then you can use parametric tests.
There is a misunderstanding that data as to be normal. What is required is that the distribution of sampling means need to be normal.
If it looks like looks like your data comes from a distribution that is highly skewed. Then you can transform your data.