I would like to do a logistic multiple regression on a binary variate, with what Genstat calls an offset, ie a regression variable with the coefficient constrained=1. I'm far from home and have Splus but not R here, but any information from either source would be very welcome. I'd hate to have to go back to using Genstat . . . Thanks, Ted. --------------- Dr E.A. (Ted) Catchpole School of Maths & Stats University College, UNSW Institute of Maths & Stats Australian Defence Force Academy University of Kent at Canterbury e-catchpole at adfa.edu.au Canterbury, CT2 7NF, England http://www.ma.adfa.edu.au/~eac E.A.Catchpole at ukc.ac.uk -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 29 Nov 2000, E.A.Catchpole wrote:> I would like to do a logistic multiple regression on a binary variate, > with what Genstat calls an offset, ie a regression variable with the > coefficient constrained=1. I'm far from home and have Splus but not R > here, but any information from either source would be very welcome. I'd > hate to have to go back to using Genstat . . .Use offset() in the formula to glm. In R only, you can also specify offset as a parameter to glm: there are examples on ?glm in R (I know, I added them).> > Thanks, > Ted. > --------------- > Dr E.A. (Ted) Catchpole > School of Maths & Stats > University College, UNSW Institute of Maths & Stats > Australian Defence Force Academy University of Kent at Canterbury > e-catchpole at adfa.edu.au Canterbury, CT2 7NF, England > http://www.ma.adfa.edu.au/~eac E.A.Catchpole at ukc.ac.uk > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jim, Aha! offset(off) works. "offset=off" doesn't, as far as I can see. But yes, I'll do my best to get R installed here before I leave. That's terrific. Many thanks. Ted. --------------- Dr E.A. (Ted) Catchpole School of Maths & Stats Honorary Senior Research Fellow University College, UNSW Institute of Maths & Stats Australian Defence Force Academy University of Kent at Canterbury e-catchpole at adfa.edu.au Canterbury, CT2 7NF, England http://www.ma.adfa.edu.au/~eac E.A.Catchpole at ukc.ac.uk On Wed, 29 Nov 2000, Jim Lindsey wrote:> > > > Jim, > > > > Thanks for the instant reply. Which dpcs? I've got the Splus ver5 manual > > "Guide to Statistics" on my desk, and there's no mention of "offset" in > > glm. Nor in the online > > help, as far as I can see. And I looked thorough CRAN last night and > > couldn't find a glm . . . Sorry to be dense . . > > Sorry. I didn't have my machine running when I first answered. > > I checked. In R, the help is clear when I type ?offset. Just add > offset(off) to your linear model where off is the offset vector. The > second possibility, as I mentioned, is to use the offset option in the > glm function: glm(...,family=binomial,offset=off). > > You right about S-Plus2000. My son looked and cannot find > offset. ?offset says it is internal, used by formula, but how???? > Apparently, the first method above does work. > > Your best bet is to download and install R, 15 minutes work on most > machines. > Good luck. Jim > > > > > Ted. > > --------------- > > Dr E.A. (Ted) Catchpole > > School of Maths & Stats Honorary Senior Research Fellow > > University College, UNSW Institute of Maths & Stats > > Australian Defence Force Academy University of Kent at Canterbury > > e-catchpole at adfa.edu.au Canterbury, CT2 7NF, England > > http://www.ma.adfa.edu.au/~eac E.A.Catchpole at ukc.ac.uk > > > > On Wed, 29 Nov 2000, Jim Lindsey wrote: > > > > > > > > > > I would like to do a logistic multiple regression on a binary variate, > > > > with what Genstat calls an offset, ie a regression variable with the > > > > coefficient constrained=1. I'm far from home and have Splus but not R > > > > here, but any information from either source would be very welcome. I'd > > > > hate to have to go back to using Genstat . . . > > > > > > offset can be used (in two different, but equivalen ways) in glm in R > > > or S-Plus. See the docs. Jim > > > > > > > > > > > Thanks, > > > > Ted. > > > > --------------- > > > > Dr E.A. (Ted) Catchpole > > > > School of Maths & Stats > > > > University College, UNSW Institute of Maths & Stats > > > > Australian Defence Force Academy University of Kent at Canterbury > > > > e-catchpole at adfa.edu.au Canterbury, CT2 7NF, England > > > > http://www.ma.adfa.edu.au/~eac E.A.Catchpole at ukc.ac.uk > > > > > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > > > > 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"E.A.Catchpole" wrote:> > I would like to do a logistic multiple regression on a binary variate, > with what Genstat calls an offset, ie a regression variable with the > coefficient constrained=1. I'm far from home and have Splus but not R > here, but any information from either source would be very welcome. I'd > hate to have to go back to using Genstat . . .Offsets can be given in the same way in R, ie: use glm with binomial family and logit link; do not include your constrained variable into the formula but use it as the optional offset parameter. Alternatively (and I suppose, that is the way you have to go in Splus), you can use offset() in the formula for glm. Hope that helps, Marlene -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"E.A.Catchpole" <E.A.Catchpole at ukc.ac.uk> writes:> Jim, > > Aha! offset(off) works. "offset=off" doesn't, as far as I can see.*cough* If that is true, I think we want to see an example, so that we can fix it for the next release... (I'm pretty sure I tried both versions of offsetting quite recently) -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._