# leveneTest

0th

Percentile

##### Levene's Test

Computes Levene's test for homogeneity of variance across groups.

Keywords
htest
##### Usage
leveneTest(y, ...)
## S3 method for class 'formula':
leveneTest(y, data, ...)
## S3 method for class 'lm':
leveneTest(y, ...)
## S3 method for class 'default':
leveneTest(y, group, center=median, ...)
##### Arguments
y
response variable for the default method, or a lm or formula object. If y is a linear-model object or a formula, the variables on the right-hand-side of the model must all be factors and must be completely
group
factor defining groups.
center
The name of a function to compute the center of each group; mean gives the original Levene's test; the default, median, provides a more robust test.
data
a data frame for evaluating the formula.
...
arguments to be passed down, e.g., data for the formula and lm methods; can also be used to pass arguments to the function given by center (e.g., center=mean and trim=0.1
 
 
 Value returns an object meant to be printed showing the results of the test. Note adapted from a response posted by Brian Ripley to the r-help email list. References Fox, J. (2008) Applied Regression Analysis and Generalized Linear Models, Second Edition. Sage. Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage. Aliases leveneTest leveneTest.formula leveneTest.lm leveneTest.default Examples with(Moore, leveneTest(conformity, fcategory)) with(Moore, leveneTest(conformity, interaction(fcategory, partner.status))) leveneTest(conformity ~ fcategory*partner.status, data=Moore) leveneTest(lm(conformity ~ fcategory*partner.status, data=Moore)) leveneTest(conformity ~ fcategory*partner.status, data=Moore, center=mean) leveneTest(conformity ~ fcategory*partner.status, data=Moore, center=mean, trim=0.1) Documentation reproduced from package car, version 2.0-20, License: GPL (>= 2) Community examples Looks like there are no examples yet. Post a new example: 
 
 
 R package Rdocumentation.org Created by DataCamp.com 
 Learn R at work MathJax.Hub.Config({ messageStyle: "none", jax: ["input/TeX","output/CommonHTML"], extensions: ["tex2jax.js","MathMenu.js","MathZoom.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] }, tex2jax: { inlineMath: [ ['$','$'], ['\$','\$'] ], displayMath: [ ['$$','$$'] ], processEscapes: true, preview: 'none' } }); var $jq = jQuery.noConflict(); ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o);n.async=1; n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//cdn.datacamp.com/sp/2.9.3.js","snowplow")); var options = { appId: 'rdocumentation', platform: 'web', post: true, discoverRootDomain: true, contexts: { webPage: true, performanceTiming: true } }; options.forceSecureTracker = true; options.postPath = '/spevent'; window.snowplow('newTracker', 'co', "www.datacamp.com", options); window.snowplow('enableActivityTracking', 10, 10); // Ping every 10 seconds after 10 seconds window.snowplow('enableLinkClickTracking'); window.snowplow('trackPageView', null, [ { schema: 'iglu:com.datacamp/user/jsonschema/1-0-0', data: { anonId:$jq.cookie('dc_aid'), } } ]); var config = { forms: { whitelist: ["snowplow_tracked"] }, fields: { blacklist: ['password', 'password_confirmation'] } }; window.snowplow('enableFormTracking', config); (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o);a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41577880-1', 'rdocumentation.org'); ga('send', 'pageview');