Hello R-helpers, I would like to calculate least square means after having built a GLM with quasipoisson errors. In my model the dependent variable is continuous, I have one continuous independent variable and one categorical independent variable (that is the variable for which I would like to calculate the least square means). I've looked around for the command to calculate the least square means, but I can't find it. Thanks for your help, Mark [[alternative HTML version deleted]]
Bill.Venables at csiro.au
2008-Aug-06 03:41 UTC
[R] How to calculate GLM least square means?
Can you explain what is a "least square mean"? It sounds like SAS talk to me. Also, care to tell us who you really are? Bill Venables http://www.cmis.csiro.au/bill.venables/ "A propaganda ? a alma do negocio" -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of mtb954 Sent: Wednesday, 6 August 2008 1:09 PM To: r-help at r-project.org Subject: [R] How to calculate GLM least square means? Hello R-helpers, I would like to calculate least square means after having built a GLM with quasipoisson errors. In my model the dependent variable is continuous, I have one continuous independent variable and one categorical independent variable (that is the variable for which I would like to calculate the least square means). I've looked around for the command to calculate the least square means, but I can't find it. Thanks for your help, Mark [[alternative HTML version deleted]] ______________________________________________ R-help at 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.
Fernando Marmolejo Ramos
2008-Aug-06 03:46 UTC
[R] About colours in violin and simple violin plots
Dear R users Let?s assume I have the following batches of data a <- rnorm(20,200,100) b <- rnorm(20,250,100) c <- rnorm(20,300,100) # I plot them as violin plots require(vioplot) vioplot(a, b, c) # I plot them as simple violin plots require(UsingR) simple.violinplot(a, b, c) # I plot them as boxplots boxplot(a, b, c) # I know that for boxplots I can colour them by col=c("white", "blue", "red") # but this does not work for the other plots :-( The question is: How can I give different colours to each violin plot? How can I put labels to each violin/boxplot plot instead of the numbers that appear underneath them? Cheers, Fer
Hi Bill, Thanks for your reply. I do work with SAS people, so I may have picked up some of their jargon. I've also heard least square means referred to as marginal means. I understand them to be group means after having controlled for a covariate (i.e. holding it constant at some typical value of the covariate, such as its mean value). As an example, if my model is specified as: model<-glm(count~value+group,quasipoisson) where count is to be explained by value and group (which are continuous and categorical predictors, respectively) I would like to calculate mean counts for each group while controlling for value (i.e., holding it constant). Thank you. -- Mark Tuscan Ph.D. Candidate Cornell University> From: <Bill.Venables@csiro.au> > Date: Tue, Aug 5, 2008 at 9:41 PM > Subject: RE: [R] How to calculate GLM least square means? > To: mtb954@gmail.com, r-help@r-project.org > > > Can you explain what is a "least square mean"? It sounds like SAS talk to > me. > > Also, care to tell us who you really are? > > > Bill Venables > http://www.cmis.csiro.au/bill.venables/ > > "A propaganda é a alma do negocio" > > > -----Original Message----- > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org] > On Behalf Of mtb954 > Sent: Wednesday, 6 August 2008 1:09 PM > To: r-help@r-project.org > Subject: [R] How to calculate GLM least square means? > > Hello R-helpers, > > I would like to calculate least square means after having built a GLM with > quasipoisson errors. > > In my model the dependent variable is continuous, I have one continuous > independent variable and one categorical independent variable (that is the > variable for which I would like to calculate the least square means). > > I've looked around for the command to calculate the least square means, but > I can't find it. > > Thanks for your help, Mark > > [[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. > > > >[[alternative HTML version deleted]]
Dear Mark, The effects package (see the JSS article at http://www.jstatsoft.org/v08/i15/paper) will probably do what you want. I hope this helps, John ------------------------------ John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]On> Behalf Of mtb954 > Sent: August-05-08 11:09 PM > To: r-help at r-project.org > Subject: [R] How to calculate GLM least square means? > > Hello R-helpers, > > I would like to calculate least square means after having built a GLM with > quasipoisson errors. > > In my model the dependent variable is continuous, I have one continuous > independent variable and one categorical independent variable (that is the > variable for which I would like to calculate the least square means). > > I've looked around for the command to calculate the least square means,but> I can't find it. > > Thanks for your help, Mark > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.