MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Findminimum too slow for iterative reweighted least squares

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123624] Re: Findminimum too slow for iterative reweighted least squares
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Tue, 13 Dec 2011 05:43:12 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jbspn1$3rf$1@smc.vnet.net>

On Dec 9, 2:59 am, Alberto Maydeu-Olivares <amay... at gmail.com> wrote:
> [...]
> model = {l1^2 + ps, l2*l1, l2^2 + ps, l3*l2, l3*l1, l3^2 + ps};
> theta = {l1, l2, l3, ps};
> j = Outer[D, model, theta];
> data = {2., .42, 3., .56, .48, 1.};
> startval = Transpose[{theta, {.5, .5, .5, .5}}];
> e = data - model;
> mat = {{2 (l1^2 + ps)^2, 2 l1 l2 (l1^2 + ps), 2 l1^2 l2^2,
>   2 l2 l3 (l1^2 + ps), 2 l1 l2^2 l3,
>   2 l2^2 l3^2}, {2 l1 l2 (l1^2 + ps),
>   ps (l2^2 + ps) + l1^2 (2 l2^2 + ps), 2 l1 l2 (l2^2 + ps),
>   l1 l3 (l1^2 + l2^2 + ps), l2 l3 (l1^2 + l2^2 + ps),
>   2 l1 l2 l3^2}, {2 l1^2 l2^2, 2 l1 l2 (l2^2 + ps), 2 (l2^2 + ps)^2,
>    2 l1^2 l2 l3, 2 l1 l3 (l2^2 + ps),
>   2 l1^2 l3^2}, {2 l2 l3 (l1^2 + ps), l1 l3 (l1^2 + l2^2 + ps),
>   2 l1^2 l2 l3, l2^2 l3^2 + (l1^2 + ps) (l3^2 + ps),
>   l1 l2 (2 l3^2 + ps), 2 l2 l3 (l3^2 + ps)}, {2 l1 l2^2 l3,
>   l2 l3 (l1^2 + l2^2 + ps), 2 l1 l3 (l2^2 + ps),
>   l1 l2 (2 l3^2 + ps), l1^2 l3^2 + (l2^2 + ps) (l3^2 + ps),
>   2 l1 l3 (l3^2 + ps)}, {2 l2^2 l3^2, 2 l1 l2 l3^2, 2 l1^2 l3^2,
>   2 l2 l3 (l3^2 + ps), 2 l1 l3 (l3^2 + ps), 2 (l3^2 + ps)^2}};
> [...]

Interesting model. Is the order ... l3*l2, l3*l1 ... intentional, or
were the two inadvertently reversed? And are the corresponding data
values (.56, .48) in the right order? In any case, 'mat' seems to be
the correct normal-theory covariance matrix for the model as given.



  • Prev by Date: Re: Terminate NDSolve by a condition
  • Next by Date: Re: While Loop
  • Previous by thread: Re: Findminimum too slow for iterative reweighted least squares
  • Next by thread: Dynamics activity "drainage"