[6285] in s-news-athena

home help back first fref pref prev next nref lref last post

Re: standard errors from ms() function

daemon@ATHENA.MIT.EDU (Bill Venables)
Fri Jan 27 13:27:02 1995

To: s-news@utstat.toronto.edu
From: wvenable@attunga.stats.adelaide.edu.au (Bill Venables)
Date: 27 Jan 1995 02:37:42 GMT

>>>>> "Max" == Max Moritz <maxm@merlot.geog.ucsb.edu> writes:

Max> I am curious if anyone out there using ms() to do non-linear
Max> fits knows how to find out standard errors for the estimated
Max> parameters.  The nls() function gives them as output, but I
Max> can't find anything in the manuals about calculating these
Max> for ms().

This question come up from time to time.

Calculating standard errors relies on the function you are
minimising having some assumed statistical interpretation.  In
the case of nls() the sum of squares is assumed to be
proportional to the negative of the log-likelihood function; in
turn this implies that the observations are normally distributed
with equal variance.  If this assumption is not satisfied even
the standard errors you get with nls() are not really justified.

ms() is a much more general minimising facility.  It might be
used with a large variety of functions, and even for entirely non
statistical purposes, in which case standard errors are a
nonsense anyway.  This is why the manuals are silent on the
matter: the question can have no completely general answer.

Even if you can assume that the function you are handing to ms()
to minimise is the negative of a log-likelihood function (up to
an additive constant) then calculating the usual standard errors
of parameter estimates is not at all straightforward, but you can
get good alternative estimates (some would say even better
estimates from a statistical point of view) by treating the
inverse of the hessian matrix as the estimated variance matrix.

There is a detailed discussion with a worked example in Venables
& Ripley p. 244-5.

Max> Also, does anyone have an example of specifying the
Max> analytical forms of the first and second derivatives of the
Max> formula used in ms(), specifically ones that require
Max> multiple partial derivatives, so I can hack from there?
Max> Thanks for any help.

Again, this is discussed in detail in Venables & Ripley, p. 241
et seq.  The short answer is to use David Smith's function
deriv3() available on statlib to generate the minimising function
and see how it specifies the gradient and hessian information.

Bill
--
_________________________________________________________________
Bill Venables, Department of Statistics,     Tel.: +61 8 303 3026
The University of Adelaide,                  Fax.: +61 8 232 5670
South AUSTRALIA.     5005.  Email: venables@stats.adelaide.edu.au

home help back first fref pref prev next nref lref last post