Re: [R] binomial(link="inverse")
On Wed, 10 Sep 2008, Thomas Lumley wrote: On Wed, 10 Sep 2008, Prof Brian Ripley wrote: As to why the list of links known by name is as it is, that seems history. in part the White Book history of S. I've always thought it an error that 'log' was a standard link for binomial, as the range does not match the specification of probabilities (and S did not do so, MASS Table 7.1 ). I think I added binomial("log"): log-binomial regression is quite popular and useful in epidemiology (where effect sizes are small enough that keeping away from the boundary may be less of a problem than people's inability to understand odds ratios). Yes. My comment was about being "standard" and so easy to use unthinkingly. Where a Poisson approximation to the binomial would be good, a log link is also going to be appropriate. Had we then the infrastructure in place we have now, I would have been suggesting (like identity) that it be available via an (easy) user extension. -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ 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.
Re: [R] binomial(link="inverse")
Isn't the binomial-log used to obtain risk ratios from the coefficients rather than odds-ratios? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Lumley Sent: Wednesday, September 10, 2008 4:36 PM To: Prof Brian Ripley Cc: r-help@r-project.org; Ben Bolker Subject: Re: [R] binomial(link="inverse") On Wed, 10 Sep 2008, Prof Brian Ripley wrote: > > As to why the list of links known by name is as it is, that seems > history. in part the White Book history of S. I've always thought it an error that 'log' > was a standard link for binomial, as the range does not match the > specification of probabilities (and S did not do so, MASS Table 7.1 ). I think I added binomial("log"): log-binomial regression is quite popular and useful in epidemiology (where effect sizes are small enough that keeping away from the boundary may be less of a problem than people's inability to understand odds ratios). As a side note, in (some versions of) S, due to partial matching, binomial("log") is valid -- it just does logistic regression. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ 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. __ 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.
Re: [R] binomial(link="inverse")
Thomas Lumley wrote: > As a side note, in (some versions of) S, due to partial matching, > binomial("log") is valid -- it just does logistic regression. > ouch! signature.asc Description: OpenPGP digital signature __ 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.
Re: [R] binomial(link="inverse")
On Wed, 10 Sep 2008, Prof Brian Ripley wrote: As to why the list of links known by name is as it is, that seems history. in part the White Book history of S. I've always thought it an error that 'log' was a standard link for binomial, as the range does not match the specification of probabilities (and S did not do so, MASS Table 7.1 ). I think I added binomial("log"): log-binomial regression is quite popular and useful in epidemiology (where effect sizes are small enough that keeping away from the boundary may be less of a problem than people's inability to understand odds ratios). As a side note, in (some versions of) S, due to partial matching, binomial("log") is valid -- it just does logistic regression. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ 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.
Re: [R] binomial(link="inverse")
Prof Brian Ripley wrote: > This isn't accurate. You are talking about link functions *known by name*. > > link: a specification for the model link function. This can be a > name/expression, a literal character string, a length-one > character vector or an object of class '"link-glm"' (provided > it is not specified via one of the standard names given > next). > > Nothing is stopping you giving the link as an object, and there is an > example on the help page. We made this easily user-extensible quite a > while back. Thanks, I had overlooked this. So the short answer to my question is really glm(...,family=binomial(link=make.link("inverse")) > As to why the list of links known by name is as it is, that seems > history. in part the White Book history of S. I've always thought it an > error that 'log' was a standard link for binomial, as the range does not > match the specification of probabilities (and S did not do so, MASS > Table 7.1 ). For each of log and inverse you have a valid model only for > some values of the data, and can easily ask for predictions that give an > out-of-range error. True, but there are some ecological examples where log(mu)=a+b*x or 1/mu=a+b*x are very natural models for the data: e.g. Strong, D. R., A. V. Whipple, A. L. Child, and B. Dennis. 1999. Model selection for a subterranean trophic cascade: root-feeding caterpillars and entomopathogenic nematodes. Ecology 80: 2750-2761. Tiwari, Manjula, Karen A Bjorndal, Alan B Bolten, and Benjamin M Bolker. 2006. Evaluation of density-dependent processes and green turtle \em Chelonia mydas production at Tortuguero, Costa Rica. Marine Ecological Progress Series 326: 283-293. Berwin Turlach also pointed out off-list that binomial GLMs with identity links often have convergence and other fitting problems -- presumably this applies to inverse links as well. Ben Bolker signature.asc Description: OpenPGP digital signature __ 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.
Re: [R] binomial(link="inverse")
This isn't accurate. You are talking about link functions *known by name*. link: a specification for the model link function. This can be a name/expression, a literal character string, a length-one character vector or an object of class '"link-glm"' (provided it is not specified via one of the standard names given next). Nothing is stopping you giving the link as an object, and there is an example on the help page. We made this easily user-extensible quite a while back. As to why the list of links known by name is as it is, that seems history. in part the White Book history of S. I've always thought it an error that 'log' was a standard link for binomial, as the range does not match the specification of probabilities (and S did not do so, MASS Table 7.1 ). For each of log and inverse you have a valid model only for some values of the data, and can easily ask for predictions that give an out-of-range error. On Tue, 9 Sep 2008, Ben Bolker wrote: this may be a better question for r-devel, but ... Is there a particular reason (and if so, what is it) that the inverse link is not in the list of allowable link functions for the binomial family? I initially thought this might have something to do with the properties of canonical vs non-canonical link functions, but since other link functions (probit, cloglog, cauchit, log) are allowed, I can't think of any good reason. In fact, it's sort of a mystery to me why the sets of link functions for each family are restricted. Is this from painful experience that some link functions just don't work well? I can go ahead and hack my own version that allows inverse link, but it would be nice to know if I'm doing something dumb. (The reason I want to do this is that the inverse link linearizes the Michaelis-Menten function, y = a*x/(b+x) ...) cheers Ben Bolker -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ 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.
[R] binomial(link="inverse")
this may be a better question for r-devel, but ... Is there a particular reason (and if so, what is it) that the inverse link is not in the list of allowable link functions for the binomial family? I initially thought this might have something to do with the properties of canonical vs non-canonical link functions, but since other link functions (probit, cloglog, cauchit, log) are allowed, I can't think of any good reason. In fact, it's sort of a mystery to me why the sets of link functions for each family are restricted. Is this from painful experience that some link functions just don't work well? I can go ahead and hack my own version that allows inverse link, but it would be nice to know if I'm doing something dumb. (The reason I want to do this is that the inverse link linearizes the Michaelis-Menten function, y = a*x/(b+x) ...) cheers Ben Bolker signature.asc Description: OpenPGP digital signature __ 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.