Search found 384 matches

by EViews Matt
Tue Oct 08, 2019 4:16 pm
Forum: Models
Topic: problem with scenario
Replies: 3
Views: 284

Re: problem with scenario

Hello, I just wanted to let you know that we're investigating this issue. I can confirm that there is some unexpected behavior in the case of a stochastic solve where a series has been both excluded and overridden. You mentioned that you had an earlier model that behaved as expected, would you be ab...
by EViews Matt
Fri Oct 04, 2019 12:00 pm
Forum: General Information and Tips and Tricks
Topic: extract a portion of a string
Replies: 2
Views: 161

Re: extract a portion of a string

Hello, As a starting point, here's an example of creating new alpha series (left and right) by splitting an existing alpha series (orig) on a specific character ("["). alpha left = @left(orig, @instr(orig, "[") - 1) alpha right = @mid(orig, @instr(orig, "["))
by EViews Matt
Wed Sep 11, 2019 2:02 pm
Forum: Data Manipulation
Topic: select contiguous sample with no NA
Replies: 4
Views: 296

Re: select contiguous sample with no NA

Ah, you must have more NAs after the sample. This alternative should account for the current sample:

Code: Select all

%tmp = @pagesmpl
series tmp = @recode(@cumbnas(x, %tmp) > 0, na, 1)
by EViews Matt
Wed Sep 11, 2019 9:23 am
Forum: Data Manipulation
Topic: select contiguous sample with no NA
Replies: 4
Views: 296

Re: select contiguous sample with no NA

Hello,

You can create a temporary series whose @first data member will hold the date/observation you want.

Code: Select all

series tmp = @recode(@cumbnas(x) > 0, na, 1)
by EViews Matt
Tue Sep 10, 2019 1:30 pm
Forum: Data Manipulation
Topic: Overlapping points
Replies: 1
Views: 138

Re: Overlapping points

Hello,

You can create a dummy series that records at which observations the two series cross, which you may then use to extract dates. For example, for two series "x" and "y":

Code: Select all

series crossed = x = y or (x(-1) - y(-1)) * (x - y) < 0
by EViews Matt
Thu Aug 29, 2019 1:42 pm
Forum: Programming
Topic: @strdate for current sample
Replies: 2
Views: 132

Re: @strdate for current sample

Hello, @strdate creates an alpha series rather than a lone string. If you want a single string containing all the sample's dates, you can use @strdate to create date strings for all observations, then use stom() to extract only the date strings for the current sample into an svector, and finally use...
by EViews Matt
Mon Aug 26, 2019 12:09 pm
Forum: Estimation
Topic: SVAR with scenarios
Replies: 4
Views: 235

Re: SVAR with scenarios

As a mathematical model, an SVAR is equivalent to its underlying (reduced-form) VAR. Consequently, there is no need to distinguish between the two for standard forecasting purposes. Once you've estimated a VAR in EViews you have all you need to produce a forecast, a further structural factorization ...
by EViews Matt
Sat Aug 24, 2019 6:42 am
Forum: Estimation
Topic: SVAR with scenarios
Replies: 4
Views: 235

Re: SVAR with scenarios

Hello,

That should be possible with little difficulty. While EViews' VAR object doesn't have an internal concept of scenarios as the MODEL object does, you can certainly reestimate and/or create multiple objects to explore however many possibilities you wish.
by EViews Matt
Thu Aug 22, 2019 2:26 pm
Forum: Data Manipulation
Topic: Cumulative Series of MC Simulations
Replies: 4
Views: 227

Re: Cumulative Series of MC Simulations

To begin, you can create a series that holds the cumulative growth for all years ("x" is your growth series): series cum_growth = @recode(@mod(@obsid, 5) = 1, x, 100 * ((1 + cum_growth(-1) / 100) * (1 + x / 100) - 1)) Since you're only interested in the cumulative growth in the last year (...
by EViews Matt
Thu Aug 22, 2019 9:21 am
Forum: Data Manipulation
Topic: Cumulative Series of MC Simulations
Replies: 4
Views: 227

Re: Cumulative Series of MC Simulations

Hello,

Could you elaborate on how your data is currently organized?
by EViews Matt
Tue Aug 20, 2019 9:36 am
Forum: Data Manipulation
Topic: Changing single data point in time series
Replies: 2
Views: 177

Re: Changing single data point in time series

Which I believe you can rewrite as a one-liner:

Code: Select all

N025VRM2.fill(o=2003q1) 1, 1
by EViews Matt
Fri Aug 16, 2019 9:22 am
Forum: Programming
Topic: setting solution sample for a model
Replies: 2
Views: 162

Re: setting solution sample for a model

Hello,

No, I'm afraid not.
by EViews Matt
Mon Aug 12, 2019 1:28 pm
Forum: Data Manipulation
Topic: Smpl of most recent consecutive positive values
Replies: 2
Views: 266

Re: Smpl of most recent consecutive positive values

Hello, How about this, where "x" is the series of interest: genr(r) tmp = @nan(tmp(1) + ((x(1) > 0) <> (x > 0)), x > 0) series tmp2 = @recode(tmp = 1, 1, na) string first = tmp2.@first string last = tmp2.@last smpl {first} {last} The temporary auxiliary series "tmp" creates a num...
by EViews Matt
Sat Aug 03, 2019 6:30 am
Forum: Data Manipulation
Topic: Mean of values of the series for decile of another series
Replies: 3
Views: 300

Re: Mean of values of the series for decile of another series

Ah, you're using EViews 10 or earlier. No problem.
by EViews Matt
Thu Aug 01, 2019 1:57 pm
Forum: Data Manipulation
Topic: Mean of values of the series for decile of another series
Replies: 3
Views: 300

Re: Mean of values of the series for decile of another series

Hello,

As an example, the following creates scalars mean1, mean2, ..., mean10 for the means of b matching the observations spanning the deciles of a.

Code: Select all

for !i = 1 to 10
   smpl if @ceil(@pctiles(a) / 10) = !i
   scalar mean!i = @mean(b)
next

Go to advanced search