All Is there an R command to produce error bars around a plotted point. Crawley's book uses the command error.bar() but my version of R rejects it. Must be an S+ command(?). Thanks REX [[alternative HTML version deleted]]
See errbar in Hmisc. I found this with: help.search("error bar") And it's in the html help too. And on the r site: http://cran.r-project.org/search.html http://www.google.com/search?q=error+bar&domains=r-project.org&sitesearc h=r-project.org # Example require(Hmisc) set.seed(1) x <- 1:10 y <- x + rnorm(10) delta <- runif(10) errbar( x, y, y + delta, y - delta ) HTH, Andy
Hi, I try to run the linear discriminant analysis using the following command but got an error like the following. lda1 <- lda(retention ~ . , data=RetentionDF40[1:10000,]); Can someone tell me what I should do to fix the error? thanks, Yun-Fang
Check out plotCI in package gregmisc. --- Date: Fri, 19 Dec 2003 17:16:43 -0700 From: rex_bryan at urscorp.com <rexbryan1 at comcast.net> To: <r-help at stat.math.ethz.ch> Subject: [R] error bars around a point All Is there an R command to produce error bars around a plotted point. Crawley's book uses the command error.bar() but my version of R rejects it. Must be an S+ command(?). Thanks REX
At 06:13 PM 12/19/2003, Yun-Fang Juan wrote: >Hi, >I try to run the linear discriminant analysis using the following command >but got an error like the following. >lda1 <- lda(retention ~ . , data=RetentionDF40[1:10000,]); > What error did you get? Did you read the help file for lda? What version of R and what version of VR are you using? What platform?
oh sorry here is the error. Please advice. thanks, Yun-Fang> lda1 <- lda(retention ~ . , data=RetentionDF40[1:10000,]);Error in lda.default(x, grouping, ...) : variable(s) 11 14 24 29 30 31 32 33 34 35 41 43 44 47 48 49 50 51 54 55 56 57 58 59 60 61 65 66 67 68 70 71 72 74 78 82 85 87 88 89 91 92 93 101 102 103 107 108 109 111 112 117 122 124 125 127 148 151 153 155 156 162 170 173 176 181 182 183 184 186 189 190 192 193 194 196 200 209 212 213 214 215 216 218 220 222 223 224 228 230 231 234 235 236 237 appear to be constant within groups ----- Original Message ----- From: "Marc R. Feldesman" <feldesmanm at pdx.edu> To: "Yun-Fang Juan" <yunfang at yahoo-inc.com>; <r-help at stat.math.ethz.ch> Sent: Friday, December 19, 2003 6:38 PM Subject: Re: [R] Error running LDA> At 06:13 PM 12/19/2003, Yun-Fang Juan wrote: > >Hi, > >I try to run the linear discriminant analysis using the followingcommand> >but got an error like the following. > >lda1 <- lda(retention ~ . , data=RetentionDF40[1:10000,]); > > > > What error did you get? Did you read the help file for lda? What version > of R and what version of VR are you using? What platform? > >
As it says, some of your variables appear not to vary, which means LDA is not appropriate. LDA assumes a common multivariate normal distribution for the variation of each group about the group centre, and that cannot generate data like yours. On Fri, 19 Dec 2003, Yun-Fang Juan wrote:> oh sorry > here is the error. > Please advice. > > thanks, > > Yun-Fang > > > lda1 <- lda(retention ~ . , data=RetentionDF40[1:10000,]); > Error in lda.default(x, grouping, ...) : variable(s) 11 14 24 29 30 31 > 32 33 34 35 41 43 44 47 48 49 50 51 54 55 56 57 58 59 60 > 61 65 66 67 68 70 71 72 74 78 82 85 87 88 89 91 92 93 101 > 102 103 107 108 109 111 112 117 122 124 125 127 148 151 153 155 156 162 170 > 173 176 181 182 183 184 186 189 190 192 193 194 196 200 209 212 213 214 215 > 216 218 220 222 223 224 228 230 231 234 235 236 237 appear to be constant > within groups > > ----- Original Message ----- > From: "Marc R. Feldesman" <feldesmanm at pdx.edu> > To: "Yun-Fang Juan" <yunfang at yahoo-inc.com>; <r-help at stat.math.ethz.ch> > Sent: Friday, December 19, 2003 6:38 PM > Subject: Re: [R] Error running LDA > > > > At 06:13 PM 12/19/2003, Yun-Fang Juan wrote: > > >Hi, > > >I try to run the linear discriminant analysis using the following > command > > >but got an error like the following. > > >lda1 <- lda(retention ~ . , data=RetentionDF40[1:10000,]); > > > > > > > What error did you get? Did you read the help file for lda? What version > > of R and what version of VR are you using? What platform? > > > > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Andy Thank you. Downloaded Hmisc using the Packages button in the RGUI for Windows. My hat's off to the programmers... the system of downloading and installing a package works like a champ. I then tried your code and it too works great. I've added your suggested http://cran.r-project.org/search.html to my Favorites list. Very helpful. Merry Christmas REX Message: 36 Date: Fri, 19 Dec 2003 17:31:52 -0700 From: "Andy Bunn" <abunn@montana.edu> Subject: RE: [R] error bars around a point To: "'rex_bryan@urscorp.com'" <Rex_Bryan@urscorp.com>, <r-help@stat.math.ethz.ch> Message-ID: <003101c3c690$bc166380$78f05a99@msu.montana.edu> Content-Type: text/plain; charset="us-ascii" See errbar in Hmisc. I found this with: help.search("error bar") And it's in the html help too. And on the r site: http://cran.r-project.org/search.html http://www.google.com/search?q=error+bar&domains=r-project.org&sitesearc h=r-project.org # Example require(Hmisc) set.seed(1) x <- 1:10 y <- x + rnorm(10) delta <- runif(10) errbar( x, y, y + delta, y - delta ) HTH, Andy [[alternative HTML version deleted]]