Test for equality of variances: Parametric and nonparametric Levene's test in SPSS

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • Equality of variances is an assumption for statistical methods such as Analysis of Variance (ANOVA)-a parametric method-and the Kruskal-Wallis one-way analysis-a non-parametric method. We must be able to test for equality of variances in both normally distributed data and non-normally distributed data. There are two separate tests for equality of variances: 1) If you have normally distributed data, you should perform the parametric Levene's test. 2) If you have non-normally distributed data, you should perform the non-parametric Levene's test. In this video tutorial, I show you how to perform both, using SPSS, and I also show the necessary references, and how to write out your results.
    PARAMETRIC LEVENE'S TEST
    -Analyze, Compare Means, One Way ANOVA.
    -Put your data variable in the Dependent List.
    -Put your groups in the Factor Field.
    -Click on Options and check, Homogeneity of Variance Test, and then click Continue and OK.
    -Scrutinize the Test of Homogeneity of Variances.
    The null hypothesis for the parametric Levene's test is that there is an equality of variance. If the p-value is below 0.05, we reject the null hypothesis and assume that we do not have equality of variance. If it is above 0.05, we keep the null hypothesis.
    NONPARAMETRIC LEVENE'S TEST
    In SPSS, it is not yet possible to execute Levene's test for non-normally distributed data in one step. We need to prepare the data by taking some initial steps:
    Step 1) Create the ranked data and put them into a new variable. This is how I do it with my example data:
    -In the SPSS menu, select Transform, and then Rank Cases.
    -Put your data into the field Variable (in this example, it is "Score") and then click OK.
    SPSS will automatically create and label a new variable, "RScore," where the letter "R" stands for "ranked." In this new variable, each student has been given an individual rank based on their exam scores. Students with low exam scores are given lower rankings than students who performed better.
    Step 2) Based on these individual rankings, determine the mean ranks for each group. So, yet another variable has to be created in SPSS. This is how I do it:
    -In the menu, select Data, then Aggregate.
    -Put the variable previously created, "RScore," into the field Summaries of Variable.
    -Click on Function and select Mean. This will collect the numbers in the variable "RScore" and aggregate them in the form of mean values.
    -Put your groups in the field Break Variable, in our example "Town," and then click OK.
    SPSS will automatically create and label a new variable, this time entitled "RScore_mean_1". In this new variable, each student has been given a value based on their group. All members of the same group, or "Town" in my example, will have the same value. It is the group's mean rank.
    Step 3) Create a third variable, containing a measure of each individual's deviation from his or her group's mean rank.
    -Transform, Compute Variable.
    -Then, under Target Variable, provide a label for this third, new variable.
    -In the field Numeric Expression, enter the formula.
    -Before we click OK and execute this computation, we must instruct SPSS that we only want positive values. In the field Function group, click once on All. Then select the entire expression and double-click on Abs, in the field Functions and Special Variables. You have now instructed SPSS to transform all results to absolute values.
    -Click OK.
    The third variable is created and it contains individual measures of spread, i.e. how far each individual is to his or her group's mean.
    Next, you will perform an ANOVA on these individual differences. The null hypothesis is that there is an equality of variance. If the p-value is above 0.05, we keep the null hypothesis and assume equality of variance. If the p-value is below 0.05, we reject the null hypothesis and assume that the differences in variance or spread between the groups are statistically significantly.
    Suggested reading
    Nordstokke, D. W., & Zumbo, B. D. (2010). A new nonparametric Levene test for equal variances. Psicológica, 31(2), 401-430.
    Nordstokke, D. W., Zumbo, B. D., Cairns, S.L., & Saklofske, D.H. (2011). The operating characteristics of the nonparametric Levene test for equal variances with assessment and evaluation data. Practical Assessment, Research & Evaluation, 1(5). (Page numbers not available.)
    Martin, W. E., & Bridgmon, K. D. (2012). Quantitative and Statistical Research Methods: From Hypothesis to Results. Somerset, NJ: Wiley.
    In the video tutorial, I show examples of how to write out the results, for both the parametric Levene's test and the nonparametric Levene's test.
    Good luck with testing your data in SPSS for equality of variances, either through a parametric or a non-parametric Levene's test.
    Text and video (including audio) © Kent Löfgren, Sweden

Комментарии • 96

  • @adrianayub872
    @adrianayub872 2 года назад +2

    Thank you. Awesome stuff. Clear, detailed, and to the point. More please.

  • @lewchloe5827
    @lewchloe5827 Год назад +2

    Thank you so much. You have brightened up my day. I thought all my work shall go into the trash, the nonparametric method is brilliant and saved my work.

    • @kentlofgren
      @kentlofgren  Год назад +1

      Glad to hear that the video was appreciated. Good luck.

    • @AsselStambekova
      @AsselStambekova Год назад

      second it! I almost cried when I realised my non-normally distributed data fails to meet HOV. thank you for this fantastic tutorial! @@kentlofgren

  • @md.shahjahan9175
    @md.shahjahan9175 11 лет назад +1

    Just one word.......EXCELLENT! One of the best videos ever I have seen! Thanks indeed!

  • @23561avatar
    @23561avatar 8 лет назад +8

    Hi Kent, there is an even easier way to do the non-parametric Levene's test. Once you have calculated the ranks, you could also just perform an ANOVA on them, and have it report Levene's test (Options --> Homogeneity of variance test). It yields the exact same result, but it's quicker and probably less error-prone.
    That said, your method is very good if you want to understand what Levene's test is doing.

    • @ricardofb79
      @ricardofb79 8 лет назад +1

      Thank you so much for your comment! So helpful

    • @23561avatar
      @23561avatar 8 лет назад +1

      Glad it helped!

    • @cinematimestop39
      @cinematimestop39 4 месяца назад

      But the results it's different with this video even the significance all more than 0,05

  • @HKofficial15
    @HKofficial15 5 лет назад +1

    This is very easily done. Very Nice to watch this video.

    • @HKofficial15
      @HKofficial15 5 лет назад

      Welcome dear. I would keep on trying to do more videos for those who want to learn.

  • @akhilarajan3957
    @akhilarajan3957 9 лет назад +1

    Grateful for your help! It was the most useful video I watched on this topic.

  • @MubianaKatukula
    @MubianaKatukula 6 лет назад +1

    Wonderful tutorials indeed. Great video!

  • @JumpinJihad
    @JumpinJihad 10 лет назад

    You've got a gift my brother.

  • @shivanimalhotra8915
    @shivanimalhotra8915 4 года назад +1

    Your video helps very much , the explanation is really good , Thank you sir ))

  • @kentlofgren
    @kentlofgren  11 лет назад

    Thanks for your kind feedback. If I did not have equality of variances, I would look into the possibility of using Chi-square test for association.

  • @amandawinters2653
    @amandawinters2653 8 лет назад

    This was so straightforward and helpful. Thank you so, so much.

  • @sebastianbenavides4820
    @sebastianbenavides4820 3 года назад +1

    ty, you safe my life

  • @wulangouvara
    @wulangouvara 8 лет назад +2

    thank you, ur explaination is so clear

  • @dmeresearchconsult8635
    @dmeresearchconsult8635 4 года назад +2

    I am really enjoying your tutorials. Can you also provide the sample data for your tutorials?

  • @saminsiddiquee7302
    @saminsiddiquee7302 8 лет назад +3

    Thank you sir, it was very much needed

    • @kentlofgren
      @kentlofgren  8 лет назад +3

      Thank you +Samin Siddiquee for the first comment 2016. Good luck with all your projects!

    • @saminsiddiquee7302
      @saminsiddiquee7302 8 лет назад +1

      +Kent Löfgren My Pleasure Sir, Good Luck to You as Well !

  • @dejenebeyene7033
    @dejenebeyene7033 4 года назад +1

    interesting and brief tutor

  • @vineshprasad4975
    @vineshprasad4975 11 лет назад

    Finally I find video showing exactly what I want to test. Can you also show how to test for randomness in SPSS. Thanks

  • @kanwalpreet
    @kanwalpreet Год назад

    Best explanation!! Thanks a lot sir

  • @hannalchemist
    @hannalchemist 10 лет назад +1

    thanks for this video really helping me in my final year project.. =)

  • @ChicagoPalms
    @ChicagoPalms 10 лет назад

    Kent Lofgren's stuff is super helpful. I'm relying heavily on it as I work through dissertation analyses.

  • @ofirshorshy8281
    @ofirshorshy8281 2 года назад +1

    Thank you! your video is helpful :)

  • @katielui131
    @katielui131 4 года назад +1

    This is amazing - thank you!

  • @eyebutterfly
    @eyebutterfly 10 лет назад +3

    thank you this video helped me so much

  • @surajitsaha1447
    @surajitsaha1447 8 лет назад

    Thanks a lot sir, It was too much necessary for me.

  • @thaneswerpatel5526
    @thaneswerpatel5526 10 лет назад +3

    Thanks for sharing very nice and self explanatory tutorial...can you share data!!

  • @lbertolotti2560
    @lbertolotti2560 10 лет назад

    From my understanding it was published in a series of books called "Contributions to Probability and Statistics: Essays in Honor of Harold Hotelling" but it couldn't find anywhere on the web.

  • @marwashinwarie1463
    @marwashinwarie1463 8 лет назад +1

    Thanks, it was truly a helpful video :)

  • @Lilianm1
    @Lilianm1 11 лет назад

    I love hearing you.. It makes me feel so relaxed. :) Thanks for your videos. U saved my life withought knowing :)

  • @ahmedsaied7722
    @ahmedsaied7722 7 лет назад +1

    thank you sir very much, It really has helped a lot

  • @sitiyuyunrahayufitri2545
    @sitiyuyunrahayufitri2545 5 лет назад +1

    Thank you very much

  • @keithanderson6121
    @keithanderson6121 10 лет назад

    Very useful, Kent, thanks.

  • @TheGutFeels
    @TheGutFeels 10 лет назад

    this video helped me figure it all out!

  • @mnlz3c
    @mnlz3c 9 лет назад +3

    I'm afraid the "non-parametric levene test" method is not satisfying.
    Let's imagine we have three groups A, B and C with the following observations:
    in A: 0,2,1,3; in B: 5,8,15,12; and in C: 108, 255, 52, 462.
    We therefore have huge differences between the means of the groups, as well as huge differences in terms of variances.
    It shouldn't be too hard to detect such difference.
    Now let's apply the suggested method to these data:
    1) we rank the data. We therefore get a new variable that equals:
    in A: 1,3,2,4; in B: 5,6,8,7; and in C: 10, 11, 9, 12.
    2) we calculate the mean in each group (2.5 for A, 6.5 for B, 10.5 for C)
    3) we take the absolute value of the differences between the ranks and the mean ranks. We now have:
    in A: 1.5, 0.5, 0.5, 1.5; in B: 1.5, 0.5, 1.5, 0.5; in C: 0.5, 0.5, 1.5, 1.5
    that is exactly the same values in each groups.
    4) we compare the means using an ANOVA:
    all the values are the same, so the means as well and we therefore get a p-value of 1 that is non significant. We conclude that our hypothesis of equality of variance between the groups is not rejected, even if it is very obvious that the variances are different.
    To make the method "acceptable", before doing anything, the mean of each group should be subtracted from each observation. Then the test would indeed "try" to test if the variances are equals. However even then, the ANOVA procedure in the last step assumes that the variables in each group are normally distributed, which is not the case (as they are now based on the ranks). If you have looots of observation in each group, it will be ok, but in small samples, you cannot trust the p-value given by SPSS.
    If you want to use the ANOVA in your last step, you should make a quantile normalization (after substracting the means) instead of simply taking the ranks, that is you render the variable exactly normal. Then you can be more confident in the pvalue.
    To do that, after you ranked the data, you go to "compute new variable", and create a new variable equals to: IDF.NORMAL(RScore2-0.5/N,0,1)
    where RScore2 is the variable of score ranked after having subtracted the means, and N is the total number of observations.
    IDF.NORMAL calculates the expected normal value for a particular quantile value (simply the rank brought between 0 and 1).
    In my example I chose 0 and 1 as mean and standard deviation of my new variable. You could change it. It would not affect the final significance of the test.

  • @thyhuynh1752
    @thyhuynh1752 5 лет назад +1

    Thank you sir

  • @angelawilliams2194
    @angelawilliams2194 10 лет назад +1

    very helpful, thank you

  • @kentlofgren
    @kentlofgren  11 лет назад

    I would write something like: "A Kruskal-Wallis test (p

  • @ptmaster78
    @ptmaster78 8 лет назад +1

    Thank you so much.

  • @hariharyadi2574
    @hariharyadi2574 10 лет назад

    thanks for the tutorial. it helps me alot

  • @ASIFMALIK-co3qx
    @ASIFMALIK-co3qx 2 года назад +1

    How to enter data of test scores on SPSS. If we have 50 multiple choice items, and 54 students, how to enter their obtained marks on SPSS?

  • @md.shahjahan9175
    @md.shahjahan9175 11 лет назад

    Thank you, Sir! I have got it.

  • @abscissasun1753
    @abscissasun1753 8 лет назад

    Thank you so much! It's clear and easy to follow. I was wondering if you could do a video on testing for "Homogeneity of Within-Group Regression Slopes" (for ANCOVA with multiple covariates).

  • @m4dnus
    @m4dnus 10 лет назад

    Thanks for this heplful video.

  • @emmatonge4329
    @emmatonge4329 10 лет назад +2

    Can you explain why you used Annova - I have 2 groups with the same subject and assumed if i have non parametric data i would use the dependent t test ?

  • @karranajah
    @karranajah 9 лет назад +1

    Thanks a lot

  • @castelbu
    @castelbu 9 лет назад +1

    I have two factors (3x11) and a dependent variable, can I do a two-way ANOVA to calculate the univariate levene's test? If so, how would I report it --assuming I would have the test of between-subjects effects of the two factors and the interaction. In my case, they all turn out to be significant at the .000 level.

  • @johntialcungling5661
    @johntialcungling5661 8 лет назад +1

    Hello, Kent! Thank you very much for such a wonderful video, I was wondering whether you could kindly explain me regarding transformation, please? if I have not normally distributed data and not equality of variances (Levene's test), could i also transform the data (e.g., sqrt or log) first to get normality instead of trying non-parametric Levene's test? If so, which one is more applicable? many thanks in advance.

  • @jijial8590
    @jijial8590 9 лет назад +2

    Thank you so much for how to report results. I was watching a different video which said you should check the Box's test results. Do you need to report both or is one enough? Do they both check the same thing?
    Thanks

  • @skye4626
    @skye4626 10 лет назад +1

    I have 8 groups, but one of the group is not normally distributed, what should I use, Parametric or nonparametric Leven?

  • @kentlofgren
    @kentlofgren  11 лет назад

    Thanks. If I did not have normally distributed data, I would probably use a non-parametric method, such as a Chi-square test, but that is perhaps just me. On a side note: Whenever I am in doubt, I discuss the dilemma on the forum talkstats (dot) com. It is the best forum, imho.

  • @hayhacker55
    @hayhacker55 8 лет назад +1

    thanks , but my sample is non-normally distributed ,so i will use Kruskal-wallis test, but my result of test the Equality of variances after following your steps is 0.02 which is below p-value 0.05 then reject the null hypothesis , so i cant use Wallis test now ! , what test should i do then ? im working on my Master thesis. thanks

  • @alirafati2995
    @alirafati2995 2 года назад +1

    Hello there Kent. I have a situation. I have two variables that are numeric and scale. I want to compare these two to see if they are having the same pattern or not in increasing or decreasing during the time (during 10 years that the years are the rows of my dataset). Can you help me with that? Which analyze can I use in SPSS?

    • @kentlofgren
      @kentlofgren  2 года назад

      If you have two continious variables and you want to examine the correlation, you can use Pearson's correlation. The Pearson correlation does not make a distinction between an independent and dependent variable. If you want to make this distinction, you can do a linear regression.

  • @carolinepierard1985
    @carolinepierard1985 4 года назад +1

    Dear,
    Can I use the non parametric Levene's test with a factorial Anova (2 independent and 1 dependent variable , sample sizes not equal and not normally distributed).
    Hou should I proceed? do I have to create new variable for the 3 variables and the do the factorial anova again ???
    thank you for your answer because I'm really stuck here :)
    Gr
    Caroline

  • @kanwalpreet
    @kanwalpreet Год назад

    Sir, do we need to check normality of a univariate objective collected on a likert scale? If yes, is it also through skewness and Kurtosis value.

  • @cathrinekatsigianni8823
    @cathrinekatsigianni8823 5 лет назад +1

    -How can I transform negative to positive values when I want to perform a parametric Leven's test?

  • @kentlofgren
    @kentlofgren  11 лет назад

    For an interesting text on this topic see for example norusis (dot) com (slash) pdf (slash) DA_v13.pdf, page 277. Also, check/participate in the discussions on the forum talkstats (dot) com.

  • @dr.c.sumathi1768
    @dr.c.sumathi1768 4 года назад +1

    Hello Sir, This is sumathi , research scholar form India. I need one clarification. Kindly help me.
    If the Shapiro Wilk test is not significant (normality not established)
    When I perform Levenes test the data is not significance . (Homogentiy established)
    Should I go with t test value of unequal variance or Welch test

  • @Melted_Butter
    @Melted_Butter 8 лет назад +1

    Are there ways of compensating for unequality of variance in an ANOVA?
    (great video by the way)

    • @Melted_Butter
      @Melted_Butter 8 лет назад +2

      +Matthew Hunter Actually, referencing the Welch or Brown-Forsythe values are better when assuming inequality of veriance. But does anyone know a method in an ANCOVA?

  • @KuldeepSingh-xt7ku
    @KuldeepSingh-xt7ku 4 года назад

    I have two set of data for USA and non USA beer and I am confused which one should be used either parametric or non parametric because one data is normally distributed and other one is not normally distributted?

  • @iluvpilipins
    @iluvpilipins 3 года назад

    Hello sir. I appreciate your explanations and tips in citing references. Just one question, should we apply Welch ANOVA/Kruskal-Wallis on the derived values or on the original data after doing the non-parametric Levene's test?

  • @md.shahjahan9175
    @md.shahjahan9175 11 лет назад

    Thanks for your reply. I have done Kruskal-Wallis test (p

  • @davidsimiyu4817
    @davidsimiyu4817 9 лет назад +1

    Its in order...

  • @CobraUniverse
    @CobraUniverse 10 лет назад +1

    Hi Kent. Thank you for the video. Would the non-parametric method work for within subjects design? I have same participants over at 4 different conditions performing the same task i.e pointing task with 4 different conditions (normal, blindfolded, distraction, blindfolded+distraction). The dependent variable would be accuracy. Thanks!

    • @kentlofgren
      @kentlofgren  10 лет назад

      Hello. Afik, there are always non-parametric methods available for almost all parametric ones, so, yes, I would assume that you could use Chi-square or Kruskal-Wallis for example. Good luck.

  • @skye4626
    @skye4626 10 лет назад

    what do you mean by normally distributed data. in your example, Is that mean the female and male are normally distributed separately or regard them together as a whole data, and the whole data distribute normally?

  • @md.shahjahan9175
    @md.shahjahan9175 11 лет назад

    My data are divided into five groups. I have checked the individual one by Shapiro-Wilk test for normality (p>0.05) via SPSS. Unfortunately when I am checking the homogeneity of variances, it is showing significant (p

  • @2375nikhil
    @2375nikhil 8 лет назад

    Hello, Kent! Thank you very much for such a wonderful video, I was wondering whether you could kindly explain that whether one should proceed for kruskal Wallis test if significance value in nonparmetric ANOVA is found to be less than 0.05 i.e. there is no equality of variance?

  • @khadidjanamous8333
    @khadidjanamous8333 6 лет назад

    Hello, i was wondering how can i use levene's test to compare means of the control and the experimental groups PLEASE? can u help me?

  • @behnazbakhshi5291
    @behnazbakhshi5291 11 лет назад

    First of all, thank you so much for your useful tutorial...
    I need to compare five groups in terms of their mean values...my data are not normally distributed, so I performed non-parametric Levene's test but the results showed homogeneity of variances (p=0.645/F=0.627). Now how can I interpret the results?
    Can I conclude that the groups are now comparable?
    Thanks again

  • @nasrinasiddiqi7447
    @nasrinasiddiqi7447 8 лет назад

    Hi. Just an observation. You have subtracted the mean value by the corresponding rank while you are supposed to subtract the ranks by mean values. If I may ask, is it technically correct?

    • @mohd.faizalhassan1741
      @mohd.faizalhassan1741 6 лет назад

      See this video ruclips.net/video/_w5FM_1WL-M/видео.html. The person in the video did the same thing.

  • @ezejumo4343
    @ezejumo4343 7 лет назад

    Hi Kent
    Thanks so much for the excellent video - however as a complete newbie to SPSS i just need some assistance.
    So I've carried out a levene's test using the technique you showed however my obtained P value is 0.012 (thus it's greater than 0.05). And I need to do a two way ANOVA so how would I carry this out? To compensate for unequal variances, under the post hoc button in SPSS would I select either 'TAMHANES T2, DUNNETT'S T3 GAMES - HOWELL or DUNNETT'S C test?
    Thanks so much for your assistance.

    • @foziagul5862
      @foziagul5862 7 лет назад +1

      0.012 is less than 0.05 ( 0.012 < .05)

    • @purityrima1366
      @purityrima1366 5 лет назад

      Hello, was this question answered?. I have the same issue.

  • @zohaibamjad153
    @zohaibamjad153 8 лет назад +1

    Why can't you just run the Levene's test in a similar way for non-parametric data as you did it for parametric data? Considering the fact that SPSS is as alien to the parametric vs non-parametric information as we are, I personally think that that should really not be an issue!

    • @kentlofgren
      @kentlofgren  8 лет назад +1

      +zz123z1 Thanks for your relevant and interesting question. I'm far from a full-fledged statistician. Both the traditional Levene's Test for Equality of Variances as well as the Non-parametric Levene's Test can be performed in many situations. But the latter is said to be better when you have non-normal (skewed) data (even when un-equal sample sizes).

  • @bradrichards5196
    @bradrichards5196 11 лет назад

    URGENT! What test do I use to compare means when there is no equality of variances???!!

  • @lbertolotti2560
    @lbertolotti2560 10 лет назад

    Hi, can u provide the link to Levene's original papers?

  • @orchidee91
    @orchidee91 10 лет назад +1

    Hello! Thank you for the helpful video.
    I use a 1-5 scale with a big sample, so when I rank case, the manual option of SPSS give me a very wide range of rank. Is it legitimate to set rank as "Tie" and "Sequential rank as unique value"? I tried this option and the rank appeared to be between 1-5, which I assumed to be appropriate for Likert. Please let me know your opinions. Thank you very much

    • @kentlofgren
      @kentlofgren  10 лет назад +1

      I recommend the forum talkstats (dot) com because it is one of the best.

  • @manalahmadsamamahmas2213
    @manalahmadsamamahmas2213 7 лет назад

    Mr kent> why did use one way anova not t-test? thanx

    • @kentlofgren
      @kentlofgren  7 лет назад +2

      Because the Levene's test for normally distributed data is "inside" the ANOVA test in SPSS.

  • @worldofinformation815
    @worldofinformation815 3 года назад +1

    Thank you Sir