Extract interval value
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Extract interval value
Hi, I would like to know in writing a programming, how can I extract the value from a given interval. Let's say, from my one-way tabulation of my series of data, interval values are provided in the table, e.g. [-3.2, -3.1). I want to know how can I extract the lower bound value from the interval. As it doesn't consider as a 'value' so in my programming code, =@val(a,b), does not work as it return me the value as 'NA'.
Re: Extract interval value
I assume you have already saved the output as a table (see freeze command for details if you did not). Suppose the name of the table is mytab and the interval of interest is stored in the 5th row of the 4th column. The following code should do the trick:
Code: Select all
scalar lbound = @val(@mid(mytab(5,4),2,@instr(mytab(5,4),",")-2))Re: Extract interval value
Yes, I get the lower bound value from the interval already. Thank you.
By the way, may I know if I want to extract upper bound value what should I change from the code?
By the way, may I know if I want to extract upper bound value what should I change from the code?
Re: Extract interval value
Code: Select all
scalar ubound = @val(@mid(mytab(5,4),@instr(mytab(5,4),",")+1,@instr(mytab(5,4),")")-@instr(mytab(5,4),",")-1))Re: Extract interval value
Ok noted. Thank you very much.
Who is online
Users browsing this forum: No registered users and 2 guests
