Summary: proc mixed vs. lme The objective of this summary is to help people to get more familiar with the specification of random effects with proc mixed or lme. Very useful are the examples of Ramon Littell's book: "SAS System for Mixed Models (1996)" (http://ftp.sas.com/samples/A55235) The same data set's are kindly made available by Douglas Bates in the library(SASmixed). In the help file are examples of the lme statements equivalent to the proc mixed ones. To explain the different estimates, Hein and Brian suppose to check whether both analyses with SAS and R uses ML estimates or REML estimates. However, this was not the problem, the default in proc mixed and lme is already REML. Douglas advise me to use his option: options( contrasts = c(unordered = "contr.SAS", ordered = contr.poly")) However, I already used this option, because I copied the code from the SASmixed help file. Peter gave me the first hint and this solves the problem: To change the model formula in lme, from: strength ~ Program * Time to: strength ~ factor(Program) * factor(Time) Now the option statement grasp! For people like me who try to get familiar with the specification of random effects would it helpful if the help file of SASmixed would be updated or the variables time and program would be already introduced as factors in the Weights data set. Thank you all for the useful advises, Dominik -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Sorry to bother you. I want to know if there are some Logistical Regression functions in R? Thanks. ----- Original Message ----- From: "Grathwohl,Dominik,LAUSANNE,NRC/NT" <dominik.grathwohl at rdls.nestle.com> To: <r-help at stat.math.ethz.ch> Sent: Wednesday, October 09, 2002 1:19 PM Subject: [R] Summary: proc mixed vs. lme> Summary: proc mixed vs. lme > > The objective of this summary is to help people > to get more familiar with the specification of > random effects with proc mixed or lme. > Very useful are the examples of Ramon Littell's book: > "SAS System for Mixed Models (1996)" > (http://ftp.sas.com/samples/A55235) > The same data set's are kindly made available > by Douglas Bates in the library(SASmixed). > In the help file are examples of the lme statements > equivalent to the proc mixed ones. > > To explain the different estimates, > Hein and Brian suppose to check whether both > analyses with SAS and R uses ML estimates > or REML estimates. However, this was not the problem, > the default in proc mixed and lme is already REML. > Douglas advise me to use his option: > options( contrasts = c(unordered = "contr.SAS", > ordered = contr.poly")) > However, I already used this option, > because I copied the code from the SASmixed help file. > Peter gave me the first hint > and this solves the problem: > To change the model formula in lme, > from: strength ~ Program * Time > to: strength ~ factor(Program) * factor(Time) > Now the option statement grasp! > For people like me who try to get familiar > with the specification of random effects > would it helpful if the help file of SASmixed > would be updated or the variables time and program > would be already introduced as factors > in the Weights data set. > > Thank you all for the useful advises, > > Dominik > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Readhttp://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html> Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi Freq if you like to get familiar with logistic regression in R, I would recommend the text book of Venables and Ripley (Modern Applied Statistics with S-PLUS). All data sets and functions are available for R in the MASS-library. The MASS-library could be down loaded from http://cran.r-project.org/bin/windows/contrib/VR.zip (e.g.. Windows users). The glm function plays the key role. With the help of this function you could fit logistic regression models. First step in the material could be: library(MASS) ?glm Regards, Dominik> -----Original Message----- > From: Feng Zhang [mailto:f0z6305 at labs.tamu.edu] > Sent: mercredi, 9. octobre 2002 22:26 > To: Grathwohl,Dominik,LAUSANNE,NRC/NT; r-help at stat.math.ethz.ch > Subject: Re: [R] Summary: proc mixed vs. lme > > > Sorry to bother you. > I want to know if there are some Logistical Regression > functions in R? > > Thanks. > > > > ----- Original Message ----- > From: "Grathwohl,Dominik,LAUSANNE,NRC/NT" > <dominik.grathwohl at rdls.nestle.com> > To: <r-help at stat.math.ethz.ch> > Sent: Wednesday, October 09, 2002 1:19 PM > Subject: [R] Summary: proc mixed vs. lme > > > > Summary: proc mixed vs. lme > > > > The objective of this summary is to help people > > to get more familiar with the specification of > > random effects with proc mixed or lme. > > Very useful are the examples of Ramon Littell's book: > > "SAS System for Mixed Models (1996)" > > (http://ftp.sas.com/samples/A55235) > > The same data set's are kindly made available > > by Douglas Bates in the library(SASmixed). > > In the help file are examples of the lme statements > > equivalent to the proc mixed ones. > > > > To explain the different estimates, > > Hein and Brian suppose to check whether both > > analyses with SAS and R uses ML estimates > > or REML estimates. However, this was not the problem, > > the default in proc mixed and lme is already REML. > > Douglas advise me to use his option: > > options( contrasts = c(unordered = "contr.SAS", > > ordered = contr.poly")) > > However, I already used this option, > > because I copied the code from the SASmixed help file. > > Peter gave me the first hint > > and this solves the problem: > > To change the model formula in lme, > > from: strength ~ Program * Time > > to: strength ~ factor(Program) * factor(Time) > > Now the option statement grasp! > > For people like me who try to get familiar > > with the specification of random effects > > would it helpful if the help file of SASmixed > > would be updated or the variables time and program > > would be already introduced as factors > > in the Weights data set. > > > > Thank you all for the useful advises, > > > > Dominik > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-. > -.-.- > > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > > Send "info", "help", or "[un]subscribe" > > (in the "body", not the subject !) To: > r-help-request at stat.math.ethz.ch > > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._. > _._ > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.- > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", > "help", or "[un]subscribe" > (in the "body", not the subject !) To: > r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I forgot, glm is of course part of the base package. You need not to load MASS, simply try: ?glm Dominik> -----Original Message----- > From: Feng Zhang [mailto:f0z6305 at labs.tamu.edu] > Sent: mercredi, 9. octobre 2002 22:26 > To: Grathwohl,Dominik,LAUSANNE,NRC/NT; r-help at stat.math.ethz.ch > Subject: Re: [R] Summary: proc mixed vs. lme > > > Sorry to bother you. > I want to know if there are some Logistical Regression > functions in R? > > Thanks. > > > > ----- Original Message ----- > From: "Grathwohl,Dominik,LAUSANNE,NRC/NT" > <dominik.grathwohl at rdls.nestle.com> > To: <r-help at stat.math.ethz.ch> > Sent: Wednesday, October 09, 2002 1:19 PM > Subject: [R] Summary: proc mixed vs. lme > > > > Summary: proc mixed vs. lme > > > > The objective of this summary is to help people > > to get more familiar with the specification of > > random effects with proc mixed or lme. > > Very useful are the examples of Ramon Littell's book: > > "SAS System for Mixed Models (1996)" > > (http://ftp.sas.com/samples/A55235) > > The same data set's are kindly made available > > by Douglas Bates in the library(SASmixed). > > In the help file are examples of the lme statements > > equivalent to the proc mixed ones. > > > > To explain the different estimates, > > Hein and Brian suppose to check whether both > > analyses with SAS and R uses ML estimates > > or REML estimates. However, this was not the problem, > > the default in proc mixed and lme is already REML. > > Douglas advise me to use his option: > > options( contrasts = c(unordered = "contr.SAS", > > ordered = contr.poly")) > > However, I already used this option, > > because I copied the code from the SASmixed help file. > > Peter gave me the first hint > > and this solves the problem: > > To change the model formula in lme, > > from: strength ~ Program * Time > > to: strength ~ factor(Program) * factor(Time) > > Now the option statement grasp! > > For people like me who try to get familiar > > with the specification of random effects > > would it helpful if the help file of SASmixed > > would be updated or the variables time and program > > would be already introduced as factors > > in the Weights data set. > > > > Thank you all for the useful advises, > > > > Dominik > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-. > -.-.- > > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > > Send "info", "help", or "[un]subscribe" > > (in the "body", not the subject !) To: > r-help-request at stat.math.ethz.ch > > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._. > _._ > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.- > r-help mailing list -- Readhttp://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._