On Wed, 29 Feb 2012, Lee Adkins wrote:
This might be more of a user question than development, but ....
When I use a list in the mle function I'm getting an error. Here is the
setup:
[...]
mle loglik = -n/2 * ln(pi) - (.5)*zg - (.5)*(e^2/exp(zg))
series zg = lincomb(z, gam)
series e = y - lincomb(x, beta)
Here's the culprit: lincomb produces a series (which you can optionally
cast to a matrix if you need to), while y was defined as a list. You can't
subtract a series from a list, unless what you really mean is
list Y = listX - seriesZ
that is, form a list by deleting seriesZ from listX. In other words, the
"-" operator doesn't perform algebraic subtraction in this context, but
rather the set operation of expunging something from a set.
The fact that your list contains, in this particular case, only one series
is immaterial from a strictly syntactic point of view.
Hope this is clear :)
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti