Search found 353 matches

by EViews Matt
Tue Apr 23, 2019 11:27 am
Forum: Data Manipulation
Topic: SQL code in separate file when reading data from an ODBC source?
Replies: 7
Views: 191

Re: SQL code in separate file when reading data from an ODBC source?

Hello, As you've discovered, @wread has both some buggy behavior and some features that are not documented. The good news is that in an upcoming patch to both EViews 10 and 11 we'll add the ability to read an external file into a string in a "raw" mode with no processing. That will preserv...
by EViews Matt
Wed Apr 10, 2019 3:55 pm
Forum: Programming
Topic: @datediff between quarter end
Replies: 2
Views: 48

Re: @datediff between quarter end

Hello,

Both of those expressions evaluate to 1 for me. Is your copy of EViews 9.5 up to date? Nov 1, 2018 is the most recent patch.
by EViews Matt
Thu Apr 04, 2019 3:31 pm
Forum: Data Manipulation
Topic: Count and %change of observations between resets
Replies: 1
Views: 80

Re: Count and %change of observations between resets

Let "x" be the numerical series and "flag" be the 0/1 series, how about this: series obs = @recode(flag(-2) = na, @obsid - 1, @recode(flag(-1) <> flag(-2), 1, obs(-1) + 1)) series pc = 100 * (x - x(-obs)) / x(-obs) smpl if flag <> flag(-1) I'm assuming a full-sample evaluation. T...
by EViews Matt
Mon Mar 25, 2019 10:39 am
Forum: Programming
Topic: Week number code
Replies: 9
Views: 263

Re: Week number code

How about this: series weekid = @ceiling(@datepart(@date, "ddd") / 7) series oneyearlag = -@ceiling(@datepart(@dateadd(@date, -weekid, "w"), "ddd") / 7) series twoyearlag = oneyearlag + oneyearlag(oneyearlag) series threeyearlag = twoyearlag + oneyearlag(twoyearlag) ser...
by EViews Matt
Fri Mar 22, 2019 3:09 pm
Forum: Programming
Topic: Week number code
Replies: 9
Views: 263

Re: Week number code

Hello, Since you have weekly data (dated I assume), for practical purpose is not the simple definition that week 1 is the first observation of the year, week 2 is the second observation of the year, etc., sufficient? This definition matches how EViews displays the date for each week by default (the ...
by EViews Matt
Tue Mar 19, 2019 9:22 am
Forum: Programming
Topic: name series with for cycle
Replies: 2
Views: 114

Re: name series with for cycle

Hello, The "{%last}+!i" expression works as part of a smpl statement, but not as a general expression elsewhere in an EViews program. You'll need to use the date manipulation functions to create the string you want. For example, %tmp = @datestr(@dateadd(@dateval(%last), !i, "MM")...
by EViews Matt
Sun Mar 17, 2019 11:09 am
Forum: Data Manipulation
Topic: @strdate
Replies: 4
Views: 156

Re: @strdate

Hello,

Curious, I don't experience a problem with @strdate on a weekly or monthly workfile. Does the following produce the same issue?

Code: Select all

alpha date = @datestr(@date, "DD.MM.YYYY")
by EViews Matt
Sun Mar 17, 2019 11:03 am
Forum: Data Manipulation
Topic: String dates: the last day of x-quarters ahead
Replies: 2
Views: 89

Re: String dates: the last day of x-quarters ahead

Hello,

I believe that would be: @datestr(@dateceil(@dateadd(@date, x, "Q"), "Q"))
by EViews Matt
Thu Mar 07, 2019 2:35 pm
Forum: Programming
Topic: sample using first and last of a series
Replies: 13
Views: 303

Re: sample using first and last of a series

Hello,

Is the name of your series "variable" or "variablex"? That (unhelpful) error message can appear if you use a non-existent series name.
by EViews Matt
Wed Mar 06, 2019 11:03 am
Forum: Data Manipulation
Topic: three-dimensional panel data
Replies: 20
Views: 5195

Re: three-dimensional panel data

Hmm, it appears not.
by EViews Matt
Tue Mar 05, 2019 12:03 pm
Forum: Data Manipulation
Topic: three-dimensional panel data
Replies: 20
Views: 5195

Re: three-dimensional panel data

I still suspect that the core issue is the quantity of time/memory needed to explicitly process/store the dummy variables. While including such dummy variables is conceptually equivalent to a fixed effects model, efficiently estimating fixed effects involves selective demeaning of the data rather th...
by EViews Matt
Mon Mar 04, 2019 11:52 am
Forum: Programming
Topic: Montecarlo sim for acquiring collection of objects
Replies: 1
Views: 101

Re: Montecarlo sim for acquiring collection of objects

Hello, EViews' @uniquevals function returns a vector containing only the unique values in a series (or vector, or matrix). The length of that vector, retrievable via the @rows function, would match the number of successes for your purposes. You can therefore create your vector of random values and i...
by EViews Matt
Thu Feb 28, 2019 11:18 am
Forum: Data Manipulation
Topic: three-dimensional panel data
Replies: 20
Views: 5195

Re: three-dimensional panel data

Hello,

I assume you're running the 64-bit version of EViews. When you try to create the large group of dummies, does EViews utilize all the available memory on your system (a simple check of Windows Task Manager should be sufficient)?
by EViews Matt
Tue Feb 26, 2019 10:28 am
Forum: Estimation
Topic: Dummy variables for each holiday day?
Replies: 2
Views: 151

Re: Dummy variables for each holiday day?

Hello, I can recommend some commands for creating the dummies. For the annual holidays, series holiday1 = @holiday("jan1") > 0 For the one-time holidays, series holiday2 = @event("2016mar25") > 0 For the annual holidays with a gap, series holiday3 = @holiday("oct5") and...
by EViews Matt
Tue Feb 26, 2019 10:05 am
Forum: Data Manipulation
Topic: Drop week days?
Replies: 2
Views: 90

Re: Drop week days?

Hello,

Depending on what you're ultimately doing with your data, you could alternatively adjust the sample to exclude Saturdays and Sundays. For example,

Code: Select all

smpl if @weekday < 6

Go to advanced search