Bernardo Powaga
2012-Mar-01 05:52 UTC
[R] User defined link function with extra parameters
Hello R users, I would like to fit a generalized linear model for the binomial family with some non standard link functions. For instance, this is the Aranda-Ordaz link: ? = ln( ( (1 - ?)^-? - 1 )/?) I know how to define a new link function to use with glm(), but I my problem is that I have an extra parameter to estimate and I have no clue how to incorporate that. Is there any way to tell glm() to add this parameter in the estimation or do I have to write my own estimator with optim()? Thanks, BP
Bernardo Powaga <bspowaga <at> gmail.com> writes:> I would like to fit a generalized linear model for the binomial family > with some non standard link functions. For instance, this is the > Aranda-Ordaz link: > > ? = ln( ( (1 - ?)^-? - 1 )/?) > >>> snip <<<< > Is there any way to tell glm() to add this > parameter in the estimation or do I have to write my own estimator with > optim()?If the parameter cannot be made into a coefficient of the linear predictor, then I'm afraid that you will have to roll your own.> Thanks, > > BP-- Ken Knoblauch Inserm U846 Stem-cell and Brain Research Institute Department of Integrative Neurosciences 18 avenue du Doyen L?pine 69500 Bron France tel: +33 (0)4 72 91 34 77 fax: +33 (0)4 72 91 34 61 portable: +33 (0)6 84 10 64 10 http://www.sbri.fr/members/kenneth-knoblauch.html
David Winsemius
2012-Mar-01 13:03 UTC
[R] User defined link function with extra parameters
On Mar 1, 2012, at 12:52 AM, Bernardo Powaga wrote:> Hello R users, > > I would like to fit a generalized linear model for the binomial > family with some non standard link functions. For instance, this is > the Aranda-Ordaz link: > > ? = ln( ( (1 - ?)^-? - 1 )/?) > > I know how to define a new link function to use with glm(), but I my > problem is that I have an extra parameter to estimate and I have no > clue how to incorporate that. Is there any way to tell glm() to add > this parameter in the estimation or do I have to write my own > estimator with optim()?Bernardo; Let me introduce you to a new friend. You very own link to a search engine to r-help. That way you won't need to repeat questions that have been asked answered and even incorported into announced packages: http://www.googlesyndicatedsearch.com/u/newcastlemaths?q=Aranda-Ordaz+link&sa=Google+Search The Newcastle site is just one of several that you could have used. MarkMail is another popular one and the venerable Baron maintained finzi site to which RSiteSearch has in the past directed you to. It, however, no longer is being maintained for rhelp or rdevel searches. Enjoy the company of your new friends. -- David Winsemius, MD West Hartford, CT