Thanks to everyone who has offered help. For the archives, and if anyone's
curious, it appears that working with quoted expressions leads to
reasonable behavior, up to a point. The following seems to work:
loglik_1 : 'log(1/sqrt(2 * %pi) * 1 / sigma * exp(-1/(2*sigma^2) * (x[i] -
mu)^2));
loglik : 'sum(loglik_1, i, 1, n);
I continue to have problems solving for zeroes of the derivatives,
apparently because the summation is not being broken up into multiple
summations. For instance,
assume(n > 0);
assume(sigma > 0);
solve(diff(loglik, mu) = 0, mu);
yields
n
====
\
(D20) [ > (x - MU) = 0]
/ i
====
i = 1
which is true and easy to solve by hand, but it would be nice to take that
last couple of steps.... I'll continue to work on this using the
suggestions some of you have offered, to see if they help.
Furthermore, if I try to solve mu and sigma simultaneously (in terms of n
and x[i]) I find no unique solution because I have more unknowns than
equations:
(C22) solve([diff(loglik, mu) = 0, diff(loglik, sigma)] = 0, [mu, sigma]);
(D22) []
Thanks for your help, and I'll keep plugging away.
-Jim
**********************************************************************
This message is intended only for the designated recipient(s). It may
contain confidential or proprietary information and may be subject to
the attorney-client privilege or other confidentiality protections.
If you are not a designated recipient, you may not review, use, copy
or distribute this message. If you receive this in error, please
notify the sender by reply e-mail and delete this message. Thank you.
***********************************************************************