Stata 15 help for gladder

[R] ladder -- Ladder of powers

Syntax

Ladder of powers

ladder varname [if] [in] [, generate(newvar) noadjust]

Ladder-of-powers histograms

gladder varname [if] [in] [, histogram_options combine_options]

Ladder-of-powers quantile-normal plots

qladder varname [if] [in] [, qnorm_options combine_options]

by is allowed with ladder; see [D] by.

Menu

ladder

Statistics > Summaries, tables, and tests > Distributional plots and tests > Ladder of powers

gladder

Statistics > Summaries, tables, and tests > Distributional plots and tests > Ladder-of-powers histograms

qladder

Statistics > Summaries, tables, and tests > Distributional plots and tests > Ladder-of-powers quantile-normal plots

Description

ladder searches a subset of the ladder of powers (Tukey 1977) for a transform that converts varname into a normally distributed variable.

gladder and qladder each display a graph matrix. gladder displays nine histograms of transforms of varname according to the ladder of powers. qladder displays the quantiles of transforms of varname according to the ladder of powers against the quantiles of a normal distribution.

Options for ladder

+------+ ----+ Main +-------------------------------------------------------------

generate(newvar) saves the transformed values corresponding to the minimum chi-squared value from the table. We do not recommend using generate() because it is literal in interpreting the minimum, thus ignoring nearly equal but perhaps more interpretable transforms.

noadjust is the noadjust option to sktest; see [R] sktest.

Options for gladder

histogram_options affect the rendition of the histograms across all relevant transformations; see [R] histogram. Here the normal option is assumed, so you must supply the nonormal option to suppress the overlaid normal density. Also, gladder does not allow the width(#) option of histogram.

combine_options are any of the options documented in [G-2] graph combine. These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

Options for qladder

qnorm_options affect the rendition of the quantile-normal plots across all relevant transformations. See options2 in [R] diagnostic plots.

combine_options are any of the options documented in [G-2] graph combine. These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

Examples

Setup . sysuse citytemp

Search ladder of powers for a function that transforms tempjuly to normality . ladder tempjuly

Draw histogram for each transformation; remove axis labels . gladder tempjuly, l1title("") ylabel(none) xlabel(none)

Draw quantile-normal plot for each transformation; remove axis labels . qladder tempjuly, ylabel(none) xlabel(none)

Stored results

ladder stores the following in r():

Scalars r(N) number of observations r(invcube) chi-squared for inverse-cubic transformation r(P_invcube) p-value for normality test after inverse-cubic transformation r(invsq) chi-squared for inverse-square transformation r(P_invsq) p-value for normality test after inverse-square transformation r(inv) chi-squared for inverse transformation r(P_inv) p-value for normality test after inverse transformation r(invsqrt) chi-squared for inverse-root transformation r(P_invsqrt) p-value for normality test after inverse-root transformation r(log) chi-squared for log transformation r(P_log) p-value for normality test after log transformation r(sqrt) chi-squared for square-root transformation r(P_sqrt) p-value for normality test after square-root transformation r(ident) chi-squared for untransformed data r(P_ident) p-value for normality test of untransformed data r(square) chi-squared for square transformation r(P_square) p-value for normality test after square transformation r(cube) chi-squared for cubic transformation r(P_cube) p-value for normality test after cubic transformation

Reference

Tukey, J. W. 1977. Exploratory Data Analysis. Reading, MA: Addison-Wesley.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index