Page 1 of 1

@mid

Posted: Tue Jul 15, 2014 3:51 am
by Lol38
Hello,

I'm trying to use this combination of commands:

smpl if @mid(@str(ocup), 3, 1) = "2"

but the programme doesn't read it, what am i doing wrong?

The sample is something like this and i want to extract the third number which can be 0, 1 or 3:
10313
10313
99997
20311
80311
20312
30314
5002
40312
82314
34323

I am creating a dummy so that a can generate a series with the diffrents third numbers in this sample.

Re: @mid

Posted: Tue Jul 15, 2014 8:21 am
by EViews Gareth
Why do you have an ="2"?

Re: @mid

Posted: Tue Jul 15, 2014 7:14 pm
by Lol38
Because i want to sort the series taking into account the third number but this number must be "2", i mean, all the groups of numbers in the serie that have the third number as a "2".

Then, i need the same condition but with the third number ="3" and another group with the third number in the serie ="1".

Re: @mid

Posted: Tue Jul 15, 2014 8:11 pm
by EViews Gareth
I am completely lost. The sample statement works, selecting only observations for which the third number is equal to two. Why is it not working for you?

Re: @mid

Posted: Wed Jul 16, 2014 3:01 am
by Lol38
I don't know. I thought the command "@mid" was wrong but then you tell me that it is ok. =(

I don't know what to do.

Re: @mid

Posted: Wed Jul 16, 2014 8:45 am
by EViews Gareth
It looks like everything is fine.