From Andre@G||||bert @end|ng |rom chu-rouen@|r  Mon Apr 13 12:05:48 2020
From: Andre@G||||bert @end|ng |rom chu-rouen@|r (GILLIBERT, Andre)
Date: Mon, 13 Apr 2020 10:05:48 +0000
Subject: [Rd] Poor family objects error messages
Message-ID: <359817369D2F154783F7B0CA6C8DA62F0F2A5D@bi3.adm.chu-rouen.lan>

Hello,

The following code:

> binomial(identity)

Generates an error message:
Error in binomial(identity) :
  link "identity" not available for binomial family; available links are ?logit?, ?probit?, ?cloglog?, ?cauchit?, ?log?

While :
> binomial("identity")
Yields an identity-binomial object that works as expected with stats::glm

The error in the first example mislead me during years. I thought identity-binomial models were unsupported by R.
The documentation is correct but misleading too.

> The gaussian family accepts the links (as names) identity, log and inverse; the binomial family the
> links logit, probit, cauchit, (corresponding to logistic, normal and Cauchy CDFs respectively) log and
> cloglog (complementary log-log);

Without changing the language, this could be fixed by changing the error messages to something more suggestive.

Suggestion:
Error in binomial(identity) :
  name identity not available for binomial family; please use a character string such as binomial("identity")

The documentation could be updated to insist on that.

The gaussian family accepts the links (as names) identity, log and inverse; the binomial family the
links logit, probit, cauchit, (corresponding to logistic, normal and Cauchy CDFs respectively) log and
cloglog (complementary log-log); [...] If the link function is given as a character string, all families accept all link functions.

What do you think of that ?

--
Sincerely
Andr? GILLIBERT

	[[alternative HTML version deleted]]



[Rd] Poor family objects error messages
GILLIBERT, Andre