Hello, an idea to save (in a table or matrix) the coefficients resulting from regressions performed in a loop as below. Attention, the number of coefficients may vary because of the seqall method applied to a trend.
for %k …
equation {%k}_lt.breakls(method=seqall) log({%k}) @trend c @nv log(r) log(p_{%k})
next
Thank you for any help ;)
how to save coefficients in a table or matrix
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13401
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to save coefficients in a table or matrix
Something like:
Code: Select all
!t = @obsrange
!k = numberofvariables
matrix(!t,!k) res
res=na
!maxcoefs = 1
!i=1
for %k...
equation {%k}_lt.breakls(method=seqall) log({%k}) @trend c @nv log(r) log(p_{%k})
if {%k}_lt.@ncoefs > !maxcoefs then
!maxcoefs = {%k}_lt.@ncoefs
endif
matplace(res, {%k}_lt.@coefs, 1, !i)
!i=!i+1
next
matrix(!maxcoefs, !k) res
Follow us on Twitter @IHSEViews
Re: how to save coefficients in a table or matrix
Thank you very much, amazing, you are really a star!
Who is online
Users browsing this forum: Google [Bot] and 2 guests