Re: R-beta: SEs for one-param MLE in R?

Jim Lindsey (jlindsey@luc.ac.be)
Tue, 21 Apr 1998 09:59:54 +0200 (MET DST)


From: Jim Lindsey <jlindsey@luc.ac.be>
Message-Id: <9804210759.AA11933@alpha.luc.ac.be>
Subject: Re: R-beta: SEs for one-param MLE in R?
To: maechler@stat.math.ethz.ch
Date: Tue, 21 Apr 1998 09:59:54 +0200 (MET DST)
In-Reply-To: <199804141622.SAA01845@sophie.ethz.ch> from "Martin Maechler" at Apr 14, 98 06:22:12 pm


> 
Just back from a week camping in the snow in the English Lakes, and
trying to catch up...
> 
> Well,
>  .Internal(nlm(..)) should be fixed to always return a matrix in  $ hessian.
> 
> However, your problem is solved easily by always using
> 
> 	p <- length(estimate)
> 	SE <- sqrt(if(p==1) 1/out$hessian else diag(solve(out$hessian)))
> 
> BTW: I am (we are) interested in the functions that you are writing for nlm(.)
>      It certainly is worthwhile to have nlm(.) return a class "nlm" result
>      and provide  print.nlm(.) and summary.nlm(.) functions
>      {{ Jim Lindsey already posted something like this, unfortunately using
> 	"nls" which we don't want as long as it is not very close to S'
> 	nls(.) function
>      }}
I am afraid that I don't understand the logic of this requirement of
closeness to R for such functions. nlm() itself is not close and even
hist() has never been very similar. On the other hand, remember that
the nls() I sent was a very cut-down version of one in one of my
libraries. It had the above solution for the inversion with one
dimensional parameters. By the way, the original Fortran for nlm that
I ported to R printed out a warning that the algorithm is very
inefficient for one-dimensional problems.
  With respect to Bill's negative binomial that started another
discussion, one of the functions in my nonlinear regression library
does negative binomial nonlinear regression for both the mean and the
dispersion parameters, along with twenty odd other distributions. I
used it for beta-binomial regression in my paper with Pat Altham in
the latest Applied Statistics. (Also another similar function for a
finite mixture with these distributions, for example for negative
binomial with inflated zeroes.) In my repeated measures library, there
is a similar function for regressions with the same collection of
distributions, but having a random intercept. Once R stabilizes...
  Jim
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._