Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mata : Matrix Multiplication

    Hi STATA users

    Trying to evaluate an index using mata. I am unable to understand why the comfortability error is arising

    mata

    X = st_data(.,("price","weight","length"))
    a = st_matrix("L") /*Where L is 3x3 matrix obtained from a estimation command*/
    X = X:*a

    <istmt>: 3200 conformability error

  • #2
    You are asking for elementwise multiplication, which you don't want.

    Code:
    X * a
    is code for matrix multiplication.

    Comment


    • #3
      Thanks a lot, Nick. I am attempting textbook matrix multiplication.
      This way, it's working.
      But what is the difference ?

      Actually, I got it!!!

      Thanks a lot Nick
      Last edited by Jay Dev; 30 Jul 2022, 05:30.

      Comment

      Working...
      X