Hm, now it seems to work. Thank you!
But the same logic won't apply if I want to refer have !reg expression in the if statement?:
For example:
smpl 1 1
x5 = 3
if x!reg = 3 then
equation eq2.ls y c x!reg
endif
Is there a way to do it?
Search found 7 matches
- Fri Aug 09, 2019 8:38 am
- Forum: Programming
- Topic: Connecting if statement with a table
- Replies: 8
- Views: 5336
- Fri Aug 09, 2019 1:49 am
- Forum: Programming
- Topic: Connecting if statement with a table
- Replies: 8
- Views: 5336
Re: Connecting if statement with a table
It doesn't really work
In the example with a matrix it produces an error "x!reg is not defined in equation eq.ls y c x!reg"
In the example with a table it produces an error "x is not defined in do_eq.ls y c x 1.000000."
Any thoughts?
In the example with a matrix it produces an error "x!reg is not defined in equation eq.ls y c x!reg"
In the example with a table it produces an error "x is not defined in do_eq.ls y c x 1.000000."
Any thoughts?
- Thu Aug 08, 2019 9:57 am
- Forum: Programming
- Topic: Connecting if statement with a table
- Replies: 8
- Views: 5336
Re: Connecting if statement with a table
Thanks a lot!
- Thu Aug 08, 2019 1:24 am
- Forum: Programming
- Topic: Connecting if statement with a table
- Replies: 8
- Views: 5336
Re: Connecting if statement with a table
Gareth, sorry for making it overcomplicated. Maybe I could try with a more precise question. Is there a way to create a reference to a table or matrix withing an equation? For example: eq.ls y c " reference " by the reference , I mean a link to a cell/matrix element (i,j) which itself is a...
- Tue Aug 06, 2019 2:01 am
- Forum: Programming
- Topic: Connecting if statement with a table
- Replies: 8
- Views: 5336
Connecting if statement with a table
Hey there, I am trying to describe a logical process using EViews. I would do with a bit of advice. Is it possible to do the following? I have 5 series that I use as explanatory variables for an equation: x1, x2, x3, x4, and x5. Each series is filled with natural numbers from 1 to 10. After some ana...
- Sat Aug 03, 2019 2:46 am
- Forum: Data Manipulation
- Topic: Mean of values of the series for decile of another series
- Replies: 3
- Views: 5667
Re: Mean of values of the series for decile of another series
Hi Matt, Thank you for your help! Logically it is a great solution even though I needed to use @100 * @ranks(a, “a”, ties) / @obs(a) instead of @pctiles(a) in order to get it to work for my setup. Hello, As an example, the following creates scalars mean1, mean2, ..., mean10 for the means of b matchi...
- Thu Aug 01, 2019 12:31 pm
- Forum: Data Manipulation
- Topic: Mean of values of the series for decile of another series
- Replies: 3
- Views: 5667
Mean of values of the series for decile of another series
Hi everyone, Could you please help me solve this puzzle? I have a time series A filled with observations and a series B filled with observations for the same time frame. Is there a way to find a mean of values of series B corresponding to every decile of series A? As an example, you can imagine a ti...