[R] Post Hoc methods for anova in R
Does anyone know of some methods already programmed up ( ie freeware : ) ) in R for the post hoc methods in anova. Particularly Scheffe's method or Tukey's? Anna __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] anova and tukeyHSD
I would like to do a one way anova and then a tukeyHSD. I have three vectors A,B and C. In a previous help message, I was told to do the following for the anova: y = c(A,B,C) group = factor(rep(a:3,c(7,9,13))) #provided there a 7 elements in A,9 in B and 13 in C and then anova(lm(y~group)) Looking at the tukeyHSD method it looks like it wants the aov method which I don't understand. Using the above example, could someone continue the example and get the tukeyHSD method to work? Anna __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] anova
I looked at the Introduction to R and am still confused. Would it be possible to ask a question in which I have three vectors and I want to perform an anova on them. Say A,B, and C. Is there a standard form that I could use in lm to get a model that I could use in anova? Do I need to know more about my problem? I really appreciate any help in this. anna On Monday 04 August 2003 03:26, Jim Lemon wrote: Anna H. Pryor wrote: I am totally confused as to how to use anova. I have three vectors and would like to use anova on them but I don't understand how lm or glm comes into play. In matlab, you just give the three vectors. Why isn't it the same in R? R is almost entirely based on functions, more similar to a programming language (which in fact it is) than a pushbutton stats application. One good thing about this is that the user has to think about the type of ANOVA that is desired: factorial, mixed model, etc. Also, whether ANOVA is appropriate - is a linear model being tested? Is the response variable distributed normally, etc.? One of the disadvantages of R is that you do have to wade through a fair amount of material to decide the answers to such questions. The official documentation, An Introduction to R, should help you to make these decisions. I compiled one of the quickie introductions to R, Kickstarting R, but that will probably not go deeply enough. However, you might get a start by looking at it online at: http://cran.r-project.org under Contributed Documentation. A bit more advanced is Notes on the use of R... by Jonathan Baron Yuelin Li. Do have a look at An Introduction to R, though, it is much more comprehensive. Jim __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] anova
I am totally confused as to how to use anova. I have three vectors and would like to use anova on them but I don't understand how lm or glm comes into play. In matlab, you just give the three vectors. Why isn't it the same in R? Any help would be greatly appreciated. Anna __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] lines and legend
When I am trying to put a legend on a plot where I am using lines, R just ignores it. I can do it with boxplot or plot, but just not with lines. Am I doing something wrong? Maybe I am just making a mistake? Anna __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] lines and legend
Yes, I am using plot and then lines. The legend is just not appearing. I am using the coordinates of the legend (150,4) which work on boxplot and plot. I have not looked at the output of par (I don't know how to) to see if they are in the region. I assumed if they worked for plot and boxplot they would also for lines. Anna On Tuesday 01 July 2003 11:16, you wrote: I assume that you are calling 'plot' and then 'lines'. Is the legend just not appearing? what are you using for the coordinates of the legend? Have you looked at the output from par to see if these values are within the plot region? __ James Holtman What is the problem you are trying to solve? Executive Consultant -- Office of Technology, Convergys [EMAIL PROTECTED] (513) 723-2929 Anna H. Pryor [EMAIL PROTECTED]To: R-help mailing list [EMAIL PROTECTED] a.gov cc: Sent by: Subject: [R] lines and legend [EMAIL PROTECTED] ath.ethz.ch 07/01/2003 13:45 When I am trying to put a legend on a plot where I am using lines, R just ignores it. I can do it with boxplot or plot, but just not with lines. Am I doing something wrong? Maybe I am just making a mistake? Anna __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] source vs. editor
When I am trying to use the source function to read in some lines of code, I get an error. The code is simply a boxplot: boxplot(s$fitness2weightedSum,s$OffNader10xWeightweightedSum,s$OffNader5xWeightweightedSum,main=weightedSum,col=8) axis(1,at=seq(1,3,by=1),las=3,labels=c(fitness2,OffNader10xWeight,OffNader5xWeight)) The error I get is: Error in parse(file,n,text,prompt) However, when I simply copy it in from my editor into R it works just fine. Is there something obvious that I am doing wrong? A. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] indexing into a list 2
I didn't explain myself well. You are right about not needing a list on the right hand side of the equation below. What I end up with is a list of arrays. Now what i would like to do is to access the individual elements in the arrays in the list. For example, when I type, y[[1]], I just get the whole first array. How do I get the first element in the first array for instance? Is that not possible? Anna Anna H. Pryor wrote: I am trying to make an array of lists. I don't think that I am doing it right however because I cannot access the individual elements of the lists once I have created the array of lists. Can someone help? for(i in 1:3){ y[[i]] = list(name[((i-1)*index+1):(i*index)]) } Anna Certainly you are not going to create an array of lists, but you are going to create just a list. See the manuals for details. If name is an atomic vector, you won't need a list, but to stay within your example: y[[i]] - name[((i-1)*index+1):(i*index)] to write the assignment's right hand side to the i-th element of list y. Uwe Ligges __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] indexing into a list
I am trying to make an array of lists. I don't think that I am doing it right however because I cannot access the individual elements of the lists once I have created the array of lists. Can someone help? for(i in 1:3){ y[[i]] = list(name[((i-1)*index+1):(i*index)]) } Anna __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Fwd: Re: [R] legend() with option adj=1
Is there a simpler way then the solution to the one that was posted here? I'm not very proficient with legend, and I don't understand this solution. All I have is two or more lines on one plot that I want to put a legend on and I can't figure out how to do it from the examples. Can you give a very simple example? It does not have to be fancy!! I have never worked with a package where the legend was not automatic. -- Forwarded Message -- Subject: Re: [R] legend() with option adj=1 Date: Wed, 21 May 2003 09:19:11 +0200 From: Uwe Ligges [EMAIL PROTECTED] To: Jerome Asselin [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Jerome Asselin wrote: Hi there, I want to justify to right the text of my legend. Consider this short reproducable example. x - 1:5 y1 - 1/x y2 - 2/x plot(rep(x,2),c(y1,y2),type=n,xlab=x,ylab=y) lines(x,y1) lines(x,y2,lty=2) legend(5,2,c(1,000,1,000,000),lty=1:2,xjust=1,yjust=1) legend(5,1.5,c(1,000,1,000,000),lty=1:2,xjust=1,yjust=1,adj=1) Now, I would like to right-justify the text of the legend. As you can see, the option adj=1 does not give satisfactory results. Is this a bug or is there an easy way that I'm missing? Thanks, Jerome Works, e.g., with the following little trick: x - 1:5 y1 - 1/x y2 - 2/x plot(rep(x,2),c(y1,y2),type=n,xlab=x,ylab=y) lines(x,y1) lines(x,y2,lty=2) temp - legend(5, 2, legend = c( , ), text.width = strwidth(1,000,000), lty = 1:2, xjust = 1, yjust = 1) text(temp$rect$left + temp$rect$w, temp$text$y, c(1,000, 1,000,000), pos=2) See ?legend for details, in particular the returned value. Uwe Ligges __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help