[Rd] Namespace/method oddity

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Tue Feb 12 19:07:09 CET 2008


I stumbled on the following:

> library(stats4)
> example(mle)
> confint.default(fit2)
Error in UseMethod("vcov") : no applicable method for "vcov"
In addition: Warning message:
In object$coefficients :
  $ operator not defined for this S4 class, returning NULL
> vcov(fit2)
             lymax      lxhalf
lymax   0.02857612 -0.04870231
lxhalf -0.04870231  0.11457338
> coef(fit2)
   lymax   lxhalf
3.218870 1.117006


And confint.default does indeed use the generic extractors vcov() and
coef().
Q: is this to be expected? and why? (I kind of suspect that this has in
fact been discussed at some point and that I just wasn't paying
attention...)

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-devel mailing list