MathGroup Archive 2007

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

Search the Archive

Re: Wald test on mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82548] Re: Wald test on mathematica
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Wed, 24 Oct 2007 04:29:52 -0400 (EDT)
  • References: <ffhr2h$4pb$1@smc.vnet.net>

On Oct 22, 2:38 am, "Mauricio Esteban Cuak" <cuak2... at gmail.com>
wrote:
> [...]
>  The thing that bothers me is (and it's the same with ols) that I can't use
> this same function if x is a vector instead of a matrix or if r is a vector,
> because mathematica will not allow me to transpose a one-dimensional list.
> What should I do? Should I make a "If, then" thingy or is there some simpler
> way I'm not aware of for dealing with this kind of situatitions?
>
> Thanks!

To convert a vector to a matrix, wrap it in { },
transposing as necessary:

In[1]:= x = {1,2,3}
        Dimensions@{x}
        Dimensions@Transpose@{x}

Out[1]= {1,2,3}
Out[2]= {1,3}
Out[3]= {3,1}



  • Prev by Date: Problem with Differential Eq
  • Next by Date: Re: What am I doing wrong with this code?
  • Previous by thread: Re: Wald test on mathematica
  • Next by thread: Re: DSolving(?) for a given tangent