1. Home
  2. SEDLSI procedure

SEDLSI procedure

Calculates least significant intervals (M.C. Hannah).

Options

PRINT = string tokens What to print (delta, lsi, fittedsed, discrepancy, maxdiscrepancy, %discrepancy); default delta, lsi, maxd
METHOD = string token Selects the method for computing the deltas (leastsquares, max, maxpse); default leas
PLOT = string tokens What to plot (sed, lsi); default sed, lsi
CHECKFIT = string token Which pairwise contrasts to use in printed output or plots involving the fitted SEDs (specified, all); default spec
PROBABILITY = scalar Significance level for the least significent intervals; default 0.05.
DF = scalar Degrees of freedom for the t-distribution use in calculation of the least significent intervals; default * assumes an infinite number of degrees of freedom (i.e. a Normal rather than a t-distribution)
WINDOW = scalar Window in which to plot the graphs
TITLE = text Title for the graphs; default 'Estimates with LSIs by Treatment'
YTITLE = text Title for the y-axis; default 'Estimates'

Parameters

ESTIMATES = tables or variates Parameter estimates; if these are not supplied SEDLSI can calculate the parameters {δi} but not the LSIs
SED = symmetric matrices Matrix containing standard errors of (pairwise) differences between estimates
VCOVARIANCE = symmetric matrices Matrix containing variances and covariances of estimates
WEIGHTS = symmetric matrices Weight (or importance) to be used for each pairwise difference; default is a matrix of ones (i.e. all pairwise differences of equal interest)
LABELS = texts Text vector (e.g. treatment labels) for labelling output; default takes the labels of levels of the factor classifying an ESTIMATES table or (if ESTIMATES is a variate or unset) row labels from SED or VCOVARIANCE
DELTA = variates Saves the estimated parameters {δi}
LSI = pointers Saves details of the least significant intervals
FITTEDSED = symmetric matrices Saves the fitted SED matrices

Description

Least significant intervals (LSIs) are used for comparing a set of estimates (e.g. predicted means from ANOVA or regression) graphically, especially when their SEDs differ. LSIs are intervals (or error bars) that are designed to overlap where there is no significant difference between estimates, and to be disjoint (i.e. not to overlap) where there are significant differences.

Presentation of results can be problematic when standard errors of differences vary appreciably due to unequal replication or an unbalanced design. LSIs attempt to address this difficulty, and are suitable for graphical presentation (Snee 1981). They can also be useful for presentation of results following a transformation of scale. Intervals can be formed on the scale on which the analysis of data took place (or the scale of a linear predictor for a generalized linear model) and be back-transformed, along with point estimates, to the original measurement scale for graphical presentation (see e.g. Hannah & Quigley 1996).

The SEDs can be supplied, in a symmetric matrix, using the SED parameter. Alternatively, you can provide a (symmetric) variance-covariance matrix, using the VCOVARIANCE parameter. SEDLSI uses these to compute parameters {δi} such that δi + δj is approximately equal to SEDij. The delta values can be saved, in a variate, using the DELTA parameter.

You can also supply parameter estimates (e.g. treatment means), in either a variate or a table, using the ESTIMATES parameter. If ESTIMATES is a variate, you may want to use the LABELS option to supply a text of labels. If estimates are available, SEDLSI can also construct least significant intervals (LSIs)

lower_LSI = ESTIMATES - EDT(1 - PROBABILITY/2; DF) * DELTA

upper_LSI = ESTIMATES + EDT(1 - PROBABILITY/2; DF) * DELTA

where the significance probability is specified by the PROBABILITY option (default 0.05), and the degrees of freedon are specified by the DF option. If DF is not set, the number of degrees of freedom is assumed to be infinite (and so SEDLSI uses a Normal rather than a t-distribution).

When the SEDs are all equal the calculation is trivial; δ = SED/2 (Snee 1981). When SEDs depend on the treatment pair, estimation of δ is more difficult and there may not be an exact solution. However, there is usually an adequately approximate or a conservative solution. SEDLSI offers three methods for estimating delta, requested using the METHOD option. The first method (leastsquares, the default) provides least-squares estimates such that δi + δj is approximately equal to SEDij. The second method (max) provides estimates such that δi + δj is greater than or equal to SEDij. For METHOD settings leastsquares and max at least one of the SED or the VCOVARIANCE parameters must be set. The third method (maxpse) is similar to the max method but the δ’s are constrained to be proportional to the standard errors of the estimates, SQRT(DIAG(VCOVARIANCE)). For this method, the VCOVARIANCE parameter must be set. This method may be considered desirable as it apparently constrains the width of resulting LSIs to reflect the relative precisions of the estimates more faithfully. However, it is often highly conservative, with some δi + δj values much greater than SEDij, and it often neglects an exact solution.

Usually only comparisons between certain pairs of means are of genuine interest. To restrict attention just to these pairwise differences, a symmetric matrix corresponding to the SED or VCOVARIANCE matrix can be supplied using the WEIGHTS parameter. This should contain zero in the positions of the contrasts that are not of interest, and one elsewhere. This then weights-out irrelevant SEDs from the calculation and thus avoids the δ’s being unnecessarily large (conservative) for the purpose at hand. For example, it could be that the only contrasts of interest are those between each treatment and a control treatment. This is specifed by a weights matrix with the row and column corresponding to the control containing ones, and with zeros elsewhere. By default all the weights are one (signifying all pairwise comparisons of interest). For the leastsquares or max methods, the weights can be any non-negative numeric values to reflect the (subjective) importance of particular pairwise contrasts.

Printed output is controlled by the PRINT option, with settings:

    delta prints the parameters {δi},
    lsi prints the least significant intervals,
    fittedsed prints the matrix [δi + δj] of fitted SEDs,
    discrepancy prints the difference between [δi + δj] and [SEDij],
    maxdiscrepancy prints the maximum difference between [δi + δj] and [SEDij],
    %discrepancy prints the difference as a percentage.

The default is PRINT=delta,lsi,maxd.

The PLOT option produces graphs:

    lsi plots the least significant interval for each estimate, and
    sed plots the difference between [δi + δj] and [SEDij].

By default PLOT=lsi,sed. The WINDOW option allows you to specify the window in which to plot the LSIs. By default a window is defined internally, within SEDLSI, to fill the whole screen. The TITLE option supplies the title for the plot (default 'Estimates with LSIs by Treatment'), and the YTITLE option supplies a title for the y-axis (default 'Estimates').

If the δ’s do not reproduce the SEDs exactly, it is recommended that the success of the approximation be checked, by examining the fitted SEDs, the differences, or the percent differences. By default, these outputs are produced only for differences of interest (indicated by non-zero weights in the WEIGHTS matrix). If you also wish to check how well the solution applies to contrasts that had weight zero, you can set option CHECKFIT=all to retain all the fitted SED values, provided their corresponding SEDi values were non-missing. (Note, though, that CHECKFIT controls only what contrasts are printed or plotted, not the ones that are used to estimate the deltas.)

The information defining the LSIs can be saved, in a pointer, using the LSI parameter. The components of the pointer are 'Label', 'lowLSI', 'estimate' and 'upLSI'; each is a variate except for 'Label' which is a text. The LSI pointer can be used as input to the LSIPLOT procedure, to plot the LSIs on a later occasion.

Options: PRINT, METHOD, PLOT, CHECKFIT, PROBABILITY, DF, WINDOW, TITLE, YTITLE.

Parameters: ESTIMATES, SED, VCOVARIANCE, WEIGHTS, LABELS, DELTA, LSI, FITTEDSED.

Method

Approximate least significant intervals are calculated as

lower_LSI = ESTIMATES + EDT(1 - PROBABILITY/2; DF) * DELTA

upper_LSI = ESTIMATES + EDT(1 - PROBABILITY/2; DF) * DELTA

where

EDT(1 - PROBABILITY/2; DF)

is the

1 - PROBABILITY/2

quantile of the t-distribution with DF degrees of freedom.

SEDLSI offers three methods of estimating δ. The first method (leastsquares, the default) provides weighted least squares estimates based on the model

SEDij = δi + δj

with weights optionally provided in the WEIGHTS parameter.

The second method (max) described in Hannah & Quigley (1996) uses

δi = max {SEDij / δoi + δoj: j} δoi

where the parameters {δoi} are those obtained from the ordinary least-squares method.

The third method (maxpse) is the same as the second method but with the parameters {δoi} being standard errors of estimates, obtained as square roots of the diagonal of the variance-covariance matrix for the estimates.

The leastsquares method generally gives closer approximations to SEDs, but may be anti-conservative for some comparisons and conservative for others. Maximum SED methods are never anti-conservative but can be excessively conservative. If an exact solution to δi + δj = SEDij exists, the leastsquares and max methods should find it.

If there is no contrast of interest for a particular estimate, due either to missing values in the SED or VCOVARIANCE matrix (zeros are interpreted as missing values here), or zeros specified in the WEIGHTS matrix, the corresponding δ is not estimated. SEDLSI also checks for missing values in the ESTIMATES parameter and sets SED elements corresponding to these as missing. If the only contrasts of interest are those between each treatment and a control treatment, the number of relevant SEDs is one fewer than the number of delta values requiring estimation. SEDLSI detects this treatments-verses-control scenario and, if METHOD=leastsquares, it imposes the arbitrary constraint δcontrol = SEcontrol if VCOVARIANCE is set, or δcontrol = min(SEcontrol,i) otherwise.

References

Snee, R.D. (1981). Graphical display and assessment of means. Biometrics, 37, 835-836.

Hannah, M.C. & Quigley, P. (1996). Presentation of ordinal regression analysis on the original scale. Biometrics, 52, 771-775.

Hannah, M.C. (1999). Usefully combining a series of unreplicated cheesemaking experiments. Journal of Dairy Research, 66, 365-374.

See also

Procedures: LSIPLOT, SED2ESE.

Commands for: Calculations and manipulation.

Example

CAPTION 'SEDLSI example',\
        !t('Experiment on foster feeding of rats from Scheffe (1959)',\
        'The Analysis of Variance; also see McConway, Jones & Taylor (1999)',\
        'Statistical Modelling using GENSTAT, Example 7.6.'); STYLE=meta,plain
FACTOR  [NVALUES=61; LABELS=!t('A','B','I','J')] litter
READ litter; FREPRESENTATION=labels
A A A A A A A A A A A A A A A A A B B B B B B B B B B B B B B B I I I I I I
I I I I I I I I J J J J J J J J J J J J J J J :
FACTOR  [NVALUES=61; LABELS=!t('A','B','I','J')] mother
READ mother; FREPRESENTATION=labels
A A A A A B B B I I I I J J J J J A A A A B B B B B I I I I J J A A A B B B
I I I I I J J J A A A A B B B I I I J J J J J :
VARIATE [NVALUES=61] littwt
READ    littwt
61.5 68.2 64 65 59.7 55 42 60.2 52.5 61.8 49.5 52.7 42 54 61 48.2 39.6 60.3
51.7 49.3 48 50.8 64.7 61.7 64 62 56.5 59 47.2 53 51.3 40.5 37 36.3 68 56.3
69.8 67 39.7 46 61.3 55.3 55.7 50 43.8 54.5 59 57.4 54 47 59.5 52.8 56 45.2
57 61.4 44.8 51.5 53 42 54 :
MODEL    littwt
FIT      [PRINT=accumulated; FPROBABILITY=yes] litter*mother
RKEEP    DF=rdf
PREDICT  [PREDICTIONS=mean; VCOVARIANCE=var] mother
SEDLSI   [DF=rdf; TITLE='Means and least significant intervals';\
         YTITLE='Weight'] mean; VCOVARIANCE=var
Updated on June 18, 2019

Was this article helpful?