[R] error using user-defined link function with mixed models (LMER)

Ken Knoblauch knoblauch at lyon.inserm.fr
Sun Feb 11 17:27:42 CET 2007


Well, you can just check directly,

?family,

but it doesn't look like it.  It looks to me (and I am admittedly no
expert) as
if make.link is only returning the standard glm links. In ?make.link, it
says,

link	 character or numeric; one of "logit", "probit", "cloglog",
"identity", "log", "sqrt", "1/mu^2", "inverse", or (deprecated) a
non-negative number, say lambda resulting in power link mu ^ lambda. Also
(deprecated) a string like "power(0.5)" to indicate a call to power.

 But the example
from ?family, is a user-specified link of class "link-glm" that in the
example
is given directly to binomial().

For my own work, I have written two links for the binomial family, in this
manner
(i.e., thanks to this extension of R from the developers) for dealing with
cases when the response probability is expected to have a lower asymptote
other than 0 (for example, if an observer is making a decision among 4
choices).
It seems to work and I didn't have to use make.link or re-define the family.

I was motivated to try this from this thread:

https://www.stat.math.ethz.ch/pipermail/r-help/2006-December/122353.html

ken




Douglas Bates a écrit :
> Was make.link() used in the example code?
>
> On 2/11/07, Ken Knoblauch <knoblauch at lyon.inserm.fr> wrote:
>>
>> Isn't it the case, that since R 2.40 that all one ought to need do is
>> define one's own link and pass it to the family, rather re-defining the
>> whole
>> family?
>>
>> CHANGES IN R VERSION 2.4.0
>>
>> ...
>>
>>  o      make.link() now returns an object of class "link-glm".
>>         The GLM families accept an object of this class for their
>>         'link' argument, which allows user-specified link functions.
>>         Also, quasi() allows user-specified variance functions.
>>
>> I thought that was the point of the example on the family help page.
>>
>> ken
>>
>>
>> Douglas Bates a écrit :
>> Look at the 'link' component of the two lists.  In the binomial family
>> object the link component is a character vector of link 1.  In your
>> logexposure family object it is a list of length 5.
>>
>> On 2/10/07, Jessi Brown <jessilbrown at gmail.com> wrote:
>> > Ok, I've tried checking out the structure of the binomial and
>> > logexposure families, the big difference  appears to be the valideta
>> > parameter (it's "NULL" in the logexposure family).
>> >
>> --
>> Ken Knoblauch
>> Inserm U846
>> Institut Cellule Souche et Cerveau
>> Département Neurosciences Intégratives
>> 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.lyon.inserm.fr/371/
>>
>>
>


-- 
Ken Knoblauch
Inserm U846
Institut Cellule Souche et Cerveau
Département Neurosciences Intégratives
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.lyon.inserm.fr/371/



More information about the R-help mailing list