[Limdep Nlogit List] Help with basic matrix command

Tauchmann, Harald Harald.Tauchmann at rwi-essen.de
Fri Feb 27 16:54:42 EST 2009


Dear Steven,

CALC ; newe= xbar(3)
     ; newe= newe^2/10  $

MATRIX ; xbar(4,*)= newe $


should work.

Best Regards,
Harald
_____________________________________

Dr. Harald Tauchmann
Phone.: +49 (0)201/8149-259
Fax: +49 (0)201/8149-200

-----Ursprüngliche Nachricht-----
Von: limdep-bounces at limdep.itls.usyd.edu.au [mailto:limdep-bounces at limdep.itls.usyd.edu.au] Im Auftrag von Yen, Steven T
Gesendet: Freitag, 27. Februar 2009 06:42
An: limdep at limdep.itls.usyd.edu.au
Betreff: [Limdep Nlogit List] Help with basic matrix command

Can somebody help me change an element of a vector? In the following, vector xbar is 4 x 1.
How can I replace the last (4th) element with "the square of the 3rd element divided by 10". Thank you!

sample ;1-30 $

create ;x1=rnp(1.2)+1 ;x2=rnp(2.1)+1 ;x3=rnp(3)+1 ;x4=x3^2/10 $

name ;x=x1,x2,x3,x4 $

matrix ;list ;xbar=mean(x) $

---
Steven T. Yen
http://web.utk.edu/~syen/
<http://web.utk.edu/~syen/> Check out our postdoc opening at:
http://web.utk.edu/~syen/postdoc.html
<http://web.utk.edu/~syen/postdoc.html>
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au

Rheinisch-Westfälisches Institut für Wirtschaftsforschung e.V. (RWI Essen)
Hohenzollernstr. 1-3
D-45128 Essen

Phone: +49-201-8149-0
Fax: +49-201-8149-200
Web: www.rwi-essen.de

Executive Board/Vorstand: Prof. Dr. Christoph M. Schmidt, Ph.D. (Präsident), Prof. Dr. Thomas K. Bauer, Prof. Dr. Wim Kösters
Registration-No./VR 1784 beim Amtsgericht Essen



More information about the Limdep mailing list