MathGroup Archive 2004

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

Search the Archive

Re: please solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52942] Re: please solve
  • From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
  • Date: Fri, 17 Dec 2004 05:19:25 -0500 (EST)
  • References: <cprk0m$r87$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Your matrix x'x is singular because x is rank 1 (all rows the same) so it 
can't be uniquely inverted. You could try replacing it by x'x + eps I where 
eps is a small positive number and I is the identity matrix. This has the 
effect of regularising the inverse matrix.


x = Table[t^i, {j, 3}, {i, 0, 2}]

gives

{{1, t, t^2}, {1, t, t^2}, {1, t, t^2}}

and

Simplify[Inverse[x.Transpose[x]+\[Epsilon] IdentityMatrix[3]]]

gives

{{(2 + 2*t^2 + 2*t^4 + \[Epsilon])/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + 
\[Epsilon])),
   -((1 + t^2 + t^4)/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + \[Epsilon]))),
   -((1 + t^2 + t^4)/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + \[Epsilon])))},
  {-((1 + t^2 + t^4)/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + \[Epsilon]))),
   (2 + 2*t^2 + 2*t^4 + \[Epsilon])/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + 
\[Epsilon])),
   -((1 + t^2 + t^4)/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + \[Epsilon])))},
  {-((1 + t^2 + t^4)/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + \[Epsilon]))),
   -((1 + t^2 + t^4)/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + \[Epsilon]))),
   (2 + 2*t^2 + 2*t^4 + \[Epsilon])/(\[Epsilon]*(3 + 3*t^2 + 3*t^4 + 
\[Epsilon]))}}

and

Simplify[Inverse[x.Transpose[x]+\[Epsilon] IdentityMatrix[3]].x]

gives

{{1/(3 + 3*t^2 + 3*t^4 + \[Epsilon]), t/(3 + 3*t^2 + 3*t^4 + \[Epsilon]),
   t^2/(3 + 3*t^2 + 3*t^4 + \[Epsilon])}, {1/(3 + 3*t^2 + 3*t^4 + 
\[Epsilon]),
   t/(3 + 3*t^2 + 3*t^4 + \[Epsilon]), t^2/(3 + 3*t^2 + 3*t^4 + 
\[Epsilon])},
  {1/(3 + 3*t^2 + 3*t^4 + \[Epsilon]), t/(3 + 3*t^2 + 3*t^4 + \[Epsilon]),
   t^2/(3 + 3*t^2 + 3*t^4 + \[Epsilon])}}

Steve Luttrell

<rcmcll at yahoo.com> wrote in message news:cprk0m$r87$1 at smc.vnet.net...
> Greetings:
>
> Could someone please solve this symbolically?
> This is just the ols formula for beta-hat but I need a symbolic
> solution for this special case.
>
> b = inv(x'x)x'y
>
> where
>
> x =  1  t  t^2
> 1  t  t^2
> 1  t  t^2
>
>
> and simplify simplify simplify!!
>
> Thanks,
>
> Bob
> 



  • Prev by Date: Re: Help on a recursive function
  • Next by Date: Bug in 5.1 FE?
  • Previous by thread: Re: please solve
  • Next by thread: Re: please solve