[R] error.crosses

Marc Girondot marc_grt at yahoo.fr
Sat May 7 21:49:05 CEST 2016


Following the message of Bert Gunter, you should explain better what you 
have done (not everyone know that describeBy is a function of psych 
package) and what you want. You said "error bars"... but what "error 
bar"? (I don't like the term "error bars". Most often they are not 
errors but dispersion bar; if you read French, you can check this ppt 
from a conference I gave : Myths and legends in statistics : 
http://max2.ese.u-psud.fr/epc/conservation/Publi/Mythes.pdf

Here is a reproducible example, and it works:
 > library("psych")
 > df <- data.frame(A=rnorm(10, 10, 2), B=rnorm(10, 9, 3), 
C=sample(c("G", "H"), 10, replace=TRUE))
 > d <- describeBy(df[, c("A", "B")], group=df$C)
 > error.crosses(d$G, d$H)

Sincerely

Marc Girondot


Le 27/04/2016 20:54, Marlin Keith Cox a écrit :
> Hello all, I have used describeBy to generate the following summary
> statistics.  I simply need x and y error bars on a plot that has CQN
> (xaxis) and Price (yaxis).  There should be four total points on the graph
> (one for each supplier).
>
> Using "error.crosses(desc$CQN, desc$Price)" does not work.
>
>
>
> group: a
>            vars  n  mean    sd median trimmed   mad   min   max range skew
> CQN          1 65 48.22 11.12  49.61   47.86 13.79 31.30 72.71 41.41  0.1
> Price        2 65  6.65  0.06   6.69    6.66  0.01  6.48  6.70  0.22 -1.2
> Supplier*    3 65   NaN    NA     NA     NaN    NA   Inf  -Inf  -Inf   NA
>            kurtosis   se
> CQN          -1.01 1.38
> Price         0.70 0.01
> Supplier*       NA   NA
> ------------------------------------------------------------
> group: b
>            vars n  mean sd median trimmed mad   min   max range skew
> kurtosis se
> CQN          1 1 91.93 NA  91.93   91.93   0 91.93 91.93     0   NA
> NA NA
> Price        2 1  6.95 NA   6.95    6.95   0  6.95  6.95     0   NA
> NA NA
> Supplier*    3 1   NaN NA     NA     NaN  NA   Inf  -Inf  -Inf   NA
> NA NA
> ------------------------------------------------------------
> group: c
>            vars n  mean   sd median trimmed  mad   min   max range skew
> kurtosis
> CQN          1 6 63.11 2.58  62.04   63.11 1.53 60.66 67.19  6.53 0.55
>   -1.68
> Price        2 6  8.92 0.00   8.92    8.92 0.00  8.92  8.92  0.00  NaN
>   NaN
> Supplier*    3 6   NaN   NA     NA     NaN   NA   Inf  -Inf  -Inf   NA
>    NA
>              se
> CQN       1.05
> Price     0.00
> Supplier*   NA
> ------------------------------------------------------------
> group: d
>            vars n  mean  sd median trimmed  mad   min   max range skew
> kurtosis
> CQN          1 6 47.20 5.7  46.31   47.20 7.17 39.52 54.45 14.93 0.08
>   -1.79
> Price        2 6  7.17 0.0   7.17    7.17 0.00  7.17  7.17  0.00  NaN
>   NaN
> Supplier*    3 6   NaN  NA     NA     NaN   NA   Inf  -Inf  -Inf   NA
> NA
>              se
> CQN       2.33
> Price     0.00
> Supplier*   NA
>
> M. Keith Cox, Ph.D.
> Principal
> MKConsulting
> 17415 Christine Ave.
> Juneau, AK 99801
> U.S. 907.957.4606
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



More information about the R-help mailing list