On 24/05/11 11:23, Richard Friedman wrote:
> Dear R-list,
>
>     In the R-book, p.464, Michael Crawley recommends that error
> bars for bar plots of normally distributed continuous response
> variables with categorical explanatory variables be given by
> 1/2 of the least significant difference, where the least significant
> difference is defines as
>
> qt(0.975,degrees_of_freedom)*standard_error_of_the_difference.
>
> The idea is that the above quantity visually conveys whether or not
> the means are different more realistically than do standard errors.
>
>     I have analyzed proportions with categorical variables using
> the glm function with a binomial error model. I wish to plot a bar
> graph with the height of the bars the proportions. Is there a way
> to define error bars analogous to the least significant difference bars
> described above that can convey the overlap of proportions?
> The experimentalists with whom I work just love error bars. I would 
> like to
> make them as meaningful as possible.

(1) The errbar() function in the Hmisc package will allow you to set any
``spread'' that you wish on your error bars.

(2) In respect of maximal meaningfulness:  The naive viewer tends to
interpret error bars by concluding that if the ranges of two pairs of
error bars do not overlap then the two quantities being estimated are
``significantly different''.  Hence it strikes me that you might want to
imitate what is done for the notches in boxplots, which are designed
to make such an interpretation roughly correct.

 From the help on boxplot.stats():

> The notches (if requested) extend to |+/-1.58 IQR/sqrt(n)|. This seems 
> to be based on the same calculations as the formula with 1.57 in 
> Chambers /et al./ (1983, p. 62), given in McGill /et al./ (1978, p. 
> 16). They are based on asymptotic normality of the median and roughly 
> equal sample sizes for the two medians being compared, and are said to 
> be rather insensitive to the underlying distributions of the samples. 
> The idea appears to be to give roughly a 95% confidence interval for 
> the difference in two medians. 

     cheers,

         Rolf Turner


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to