Search found 457 matches

by EViews Matt
Thu Nov 19, 2020 10:56 am
Forum: Data Manipulation
Topic: HELP! Calculate Monthly Simple Return
Replies: 1
Views: 113

Re: HELP! Calculate Monthly Simple Return

Hello,

I'd hope your instructor would direct you to resources for getting started with EViews. I suggest you review the EViews Fundamentals section of the EViews documentation, in particular the Working with Data subsection. You might also want to explore the EViews Illustrated primer.
by EViews Matt
Wed Nov 18, 2020 5:55 pm
Forum: Estimation
Topic: SYSTEM - @subst
Replies: 5
Views: 302

Re: SYSTEM - @subst

The next patch will change System::@subst and Logl::@subst to use the estimated coefficients as intended.
by EViews Matt
Tue Nov 17, 2020 5:45 pm
Forum: Add-in Writing area
Topic: Conditional inclusion of subroutine
Replies: 2
Views: 211

Re: Conditional inclusion of subroutine

Hello, The include command is unlike other commands in that all includes are processed when a program is loaded, before the program actually begins executing. Consequently, includes cannot benefit from conditional statements or program variables. You can work around this limitation by splitting the ...
by EViews Matt
Tue Nov 17, 2020 2:07 pm
Forum: Estimation
Topic: SYSTEM - @subst
Replies: 5
Views: 302

Re: SYSTEM - @subst

Hello,

I'm not sure if System::@subst's behavior is more a bug or a feature, but you can use System::updatecoefs followed by System::@subst to achieve the specification you want, at least until I correct @subst's behavior.
by EViews Matt
Mon Nov 16, 2020 11:37 am
Forum: Programming
Topic: Program lagged variables from a table
Replies: 1
Views: 142

Re: Program lagged variables from a table

Hello, You'll need to explicitly search through the table to find the row that matches your name of interest, e.g., for !i = 1 to tab_lags.@rows if tab_lags(!i, 1) = %j + "_" + %y + "_" + %x + "1" then exitloop endif next %l1 = tab_lags(!i, 2) And FYI, your for loops wi...
by EViews Matt
Wed Nov 11, 2020 11:49 am
Forum: Bug Reports
Topic: @optiter - illegal name or reserved name
Replies: 2
Views: 124

Re: @optiter - illegal name or reserved name

Hello, It turns out the correct function name is @optiters, plural, rather than the @optiter. We'll need to update the documentation. Regarding the status codes, here's a list of the code values, their meaning, and the associated message as returned by @optmessage: ⋅ 0 - The optimization t...
by EViews Matt
Mon Nov 09, 2020 11:00 am
Forum: General Information and Tips and Tricks
Topic: renaming series ... adding an increasing suffix
Replies: 1
Views: 325

Re: renaming series ... adding an increasing suffix

Hello, Unfortunately, the rename command does not accept functional transforms, only patterns. However, you can easily achieve your goals with a loop. %series = @wlookup("yr*", "series") for %s {%series} %new_name = "yr" + @str(@val(@mid(%s, 3)) + 1975) rename {%s} {%ne...
by EViews Matt
Fri Oct 23, 2020 9:08 am
Forum: Models
Topic: Continuing a program if solve fails to converge
Replies: 3
Views: 1046

Re: Continuing a program if solve fails to converge

Yes, that's right.
by EViews Matt
Thu Oct 22, 2020 4:59 pm
Forum: Models
Topic: Continuing a program if solve fails to converge
Replies: 3
Views: 1046

Re: Continuing a program if solve fails to converge

Hello, Yes, you can use EViews' general setmaxerrs facility to suppress an error generated during a model solve. Let me begin with a basic code outline: [loop] ... setmaxerrs 2 [solve model] !no_error = @errorcount = 0 clearerrs setmaxerrs 1 if !no_error then [all code contingent on a successful sol...
by EViews Matt
Tue Oct 20, 2020 7:12 am
Forum: Programming
Topic: Replace does not work as expected on strings
Replies: 2
Views: 620

Re: Replace does not work as expected on strings

Hello,

The series name returned by _bar.@seriesname(1) is in uppercase, i.e., "BAR_1", and @replace uses case-sensitive matching. Either change the case of %sn_bar or of the target string "bar" and the code will work as intended.
by EViews Matt
Wed Oct 14, 2020 1:15 pm
Forum: Programming
Topic: estimating y and x pairs
Replies: 3
Views: 721

Re: estimating y and x pairs

Hello, You could loop over the common suffix of the x? and y? series, e.g. for %s a b c d e equation eq_y{%s}_x{%s}.ls y{%s} c x{%s} next Similarly named objects let you write terse loops, but can always explicitly list all the names and loop over groups of those elements, e.g. for %y %x ya xa yb xb...
by EViews Matt
Wed Sep 23, 2020 1:18 pm
Forum: Programming
Topic: Creating a valuemap from labels and numeric codes defined by an alpha and a series in another page
Replies: 6
Views: 1283

Re: Creating a valuemap from labels and numeric codes defined by an alpha and a series in another page

In which case, you can exploit an undocumented feature of the valuemap object's append procedure that lets it process multiple pairs in a single statement. Updating your original example, wfcreate(page=data) a 2000 2010 3 pagestruct(none) crossid=crossid^2 pagestruct crossid @date(dateid) pagecreate...
by EViews Matt
Tue Sep 22, 2020 9:54 am
Forum: Programming
Topic: Count the number of NAs on a series period
Replies: 4
Views: 1092

Re: Count the number of NAs on a series period

Hello,

Code: Select all

genr(r) tmp = @recode(@isna({%ser}), @nan(tmp(1)+1, 1), 0)
tmp = @recode(tmp > 0 and tmp(-1) > 0, tmp(-1), tmp)
{%ser} = @recode(tmp > 0 and tmp < 10, {%ser}(-1), {%ser})
delete tmp
by EViews Matt
Tue Sep 22, 2020 9:19 am
Forum: Programming
Topic: Creating a valuemap from labels and numeric codes defined by an alpha and a series in another page
Replies: 6
Views: 1283

Re: Creating a valuemap from labels and numeric codes defined by an alpha and a series in another page

Hello, While you do need a loop to build the valuemap programmatically, you can simplify much of the intermediate work. You can even leave the crossids unmodified, as shown below. wfcreate(page=data) a 2000 2010 3 vector tmp = @uniquevals(crossid) valmap vmap for !i = 1 to tmp.@rows !value = tmp(!i)...
by EViews Matt
Fri Sep 11, 2020 2:26 pm
Forum: Models
Topic: Adding model residuals and averages to a new series
Replies: 1
Views: 957

Re: Adding model residuals and averages to a new series

Hello, While you can include the expression for the mean directly in your model specification, I haven't thought of a way around explicitly creating the equation residuals. Perhaps more expressive series naming would improve transparency satisfactorily. For example, {%eqName}.makeresids {%eqName}_re...

Go to advanced search