math functions for coef

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

math functions for coef

Postby maxchen » Tue Dec 02, 2008 4:03 am

It seems that math functions do NOT support coefficient vector. For example

Code: Select all

wfcreate u 4
coef(3) c1 = 1
coef(3) c2 = 2
c2 = exp(c1) 'error

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11406
Joined: Tue Sep 16, 2008 5:38 pm

Re: math functions for coef

Postby EViews Gareth » Tue Dec 02, 2008 8:25 am

coefficient vectors aren't really intended to be used for calculations etc..., so yes, math functions will not work upon them.
Follow us on Twitter @IHSEViews

EViews Glenn
EViews Developer
Posts: 2555
Joined: Wed Oct 15, 2008 9:17 am

Re: math functions for coef

Postby EViews Glenn » Tue Dec 02, 2008 1:27 pm

But it's easy enough to get your coef into a vector object with which you can use functions:

Code: Select all

coef(2) c1
c1.fill 1, 2
vector c2 = c1
vector c3 = exp(c2)

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: math functions for coef

Postby maxchen » Tue Dec 02, 2008 4:10 pm

thanks
yeah, by coef -> vector ->coef, for I use coef in LogL. Once the estimation of Logl is succeeded, I use another Logl where the parameter transformation inside Logl is remove, and I transform the result as the starting value to estimate the new Logl.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 9 guests