This function implements Bartlett's Test for equality of variance across groups. It can be used to detect problems of heteroskedasticity in a series, e.g., the residuals of a regression. The calculation is as shown by the National Institute of Standards and Technology's Engineering Statistics Handbook; for more information please visit: http://www.itl.nist.gov/div898/handbook/ . The function bartlett(y, x, nbins) does not return anything, but prints output. The y series is the variable you want to test for homogeneity. The x series gives the basis for dividing the y values into groups. The third argument gives the number of groups or bins to create. If it is omitted or given as zero a group is created for each distinct value of x, otherwise the y values are grouped corresponding to nbins equally sized ranges for the x series. Note that each group must contain at least two y values. For more information about this function or if you want to give me some advice or improvement, please do send me an e-mail to ... (Note by Sven in July 2017: The email address given by Marcos Larios Santa Rosa isn't working anymore. Marcos if you read this, please get back to the gretl team and update your contact information. Thanks.) Partial changelog: v0.4 (by the gretl team) - internally replace deprecated syntax