Search found 382 matches

by EViews Matt
Wed Sep 11, 2019 2:02 pm
Forum: Data Manipulation
Topic: select contiguous sample with no NA
Replies: 3
Views: 153

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: 3
Views: 153

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: 84

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: 89

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: 187

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: 187

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: 183

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: 183

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: 134

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: 124

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: 233

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: 263

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: 263

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
by EViews Matt
Tue Jul 09, 2019 12:34 pm
Forum: Estimation
Topic: Structural Shock Identification in VARs
Replies: 3
Views: 227

Re: Structural Shock Identification in VARs

Correct. Although, you could remove the A0 line since it is not used in calculating the short-run shocks. Edit: Actually, now that I look at it again, there are calculations that cancel out. Discarding the unnecessary pieces, the short-run equivalent for that entire block of code might be just: sym ...
by EViews Matt
Tue Jul 09, 2019 11:00 am
Forum: Estimation
Topic: Structural Shock Identification in VARs
Replies: 3
Views: 227

Re: Structural Shock Identification in VARs

Hello,

I believe that code is calculating the long-run shocks. To generate short-run shocks, in the last line replace "A0" with "A1", effectively ignoring the A0 calculation.

Go to advanced search