Search found 563 matches

by EViews Matt
Mon Nov 26, 2018 10:40 am
Forum: Programming
Topic: Speeding up simulations
Replies: 5
Views: 6344

Re: Speeding up simulations

Hello, In addition to startz's recommendations, you can also perform a simple experiment to determine whether running simulations in parallel would provide any performance benefit. Run one of the simulations and observe the CPU usage. If the usage is 50%-100%, then EViews is already using multiple c...
by EViews Matt
Tue Nov 20, 2018 3:57 pm
Forum: Programming
Topic: Merging coefficient in series (Updated) - Not correct mean
Replies: 13
Views: 7915

Re: Merging coefficient in series (Updated) - Not correct mean

Of course, we've lost two degrees of freedom, that's the correction! Adjusting the original author's variance calculation now produces the expected result,

Code: Select all

sevec(!i) =  @sumsq(resid - @mean(resid)) / (@obsrange - 2)
by EViews Matt
Tue Nov 20, 2018 3:14 pm
Forum: Programming
Topic: Merging coefficient in series (Updated) - Not correct mean
Replies: 13
Views: 7915

Re: Merging coefficient in series (Updated) - Not correct mean

No, the series are very short (following the OP's example), only of length n . The 10,000 is the number of iterations for building the expectation (i.e. Monte Carlo runs). So, for example, drawing 3 Y's from N(0, 4), regressing, and calculating the variance of the residuals 10,000 times results in a...
by EViews Matt
Tue Nov 20, 2018 2:30 pm
Forum: Programming
Topic: Merging coefficient in series (Updated) - Not correct mean
Replies: 13
Views: 7915

Re: Merging coefficient in series (Updated) - Not correct mean

Created a small EViews program (further below) to explore the expected residual variance for different sample sizes. I believe this shows the same numerical phenomenon that underlays the original poster's question. ExpVar.png The generating program: create u 19 !iterations = 10000 series n = @trend ...
by EViews Matt
Tue Nov 20, 2018 9:49 am
Forum: Programming
Topic: Merging coefficient in series (Updated) - Not correct mean
Replies: 13
Views: 7915

Re: Merging coefficient in series (Updated) - Not correct mean

Something about this is bothering me. Shouldn't the expected variance of the residuals asymptotically approach (from below) the true variance of the generating process (as written in the original author's script) as the sample size increases? The extreme boundary example is n = 2, where the residual...
by EViews Matt
Mon Nov 19, 2018 2:16 pm
Forum: Programming
Topic: Merging coefficient in series (Updated) - Not correct mean
Replies: 13
Views: 7915

Re: Merging coefficient in series (Updated) - Not correct mean

Hello,

I believe you're just observing the consequences of a small sample size. Try increasing the number of points from 10 to, say, 100.
by EViews Matt
Thu Nov 15, 2018 10:08 am
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

You can test your code by manually determining which lags should be selected (at least for part of your dataset) and comparing that expectation to the results of your program. That said, just looking at your code I notice that you may not have considered what to do if there isn't a "best" ...
by EViews Matt
Tue Nov 13, 2018 10:50 am
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

Moving where you initialize !aic to just inside the !i loop should be sufficient.
by EViews Matt
Tue Nov 13, 2018 10:15 am
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

The issue is actually occurring earlier in your program, eq4 doesn't have the best lag chosen correctly either. The reason is hinted at in the second bullet point of my previous post. More specifically, what will your program do if the best AIC for an equation is worse (larger) then the best AIC for...
by EViews Matt
Thu Nov 08, 2018 10:26 am
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

Your code is getting closer to what you want. Here are two more tips: ⋅  When you rerun the estimation with the best lags (as part of the show command), make sure you use the correct estimation specification. ⋅  It appears that you want to determine the best set of lags for each ...
by EViews Matt
Wed Nov 07, 2018 4:30 pm
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

Your lag specification is no longer just a single number (!j), but rather a set of numbers (!lag_a, !lag_b, etc.), so there are parts of your program you need to redesign. ⋅  You'll have to update how you record the best combination of lags, setting !bestlag = !i isn't going to work. &sdot...
by EViews Matt
Tue Nov 06, 2018 10:34 am
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

Rather than use a single loop to set the lag for all independent variables, you can use multiple loops, one per independent variable, to iterate through every possible permutation of lags. For example, the top of the loop structure could be, for !lag_a = 1 to !maxlags for !lag_b = 1 to !maxlags for ...
by EViews Matt
Mon Nov 05, 2018 12:18 pm
Forum: Programming
Topic: Storing @quantile in a series
Replies: 4
Views: 5020

Re: Storing @quantile in a series

Hello,

In a series-generating expression, @quantile cannot operate on a vector. You can easily work around this by invoking @quantile in a non-series-generating expression, e.g.,

Code: Select all

!tmp = @quantile(v{%zzname}!i, !z11+0.05)
{%zzname}_5d = !tmp
by EViews Matt
Tue Oct 30, 2018 9:46 am
Forum: Programming
Topic: ERRORHELP
Replies: 46
Views: 41226

Re: ERRORHELP

Hello,

Your program doesn't create any numbered equations objects, e.g., eq1, eq2, eq3, etc. The only equation object you create and use is named "eq".
by EViews Matt
Mon Oct 29, 2018 10:07 am
Forum: Programming
Topic: choosing variable randomly via a table vs group
Replies: 2
Views: 3604

Re: choosing variable randomly via a table vs group

Hello, I confess that I don't see how your program could be simplified by using a table to store series names instead of using a group. If there was going to be a table containing the series names anyway (third for loop?), perhaps holding results, then the group would be redundant. Otherwise, if thi...

Go to advanced search