[Rd] Poor family objects error messages

GILLIBERT, Andre Andre@G||||bert @end|ng |rom chu-rouen@|r
Mon Apr 13 12:05:48 CEST 2020


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]]



More information about the R-devel mailing list