Page 1 of 1

How fill a series with a specific range of numbers

Posted: Tue Jun 09, 2015 1:13 am
by hirastikanah
Hello
How can I fill a series without typing every single number?
For example :
I have a blank Series named a.
I can use the code a.fill 10,11,12,13,14,15
Is it possible to fill it somehow from 10 to 15 without typing the numbers one by one?

Thanks in advance

Re: How fill a series with a specific range of numbers

Posted: Tue Jun 09, 2015 11:27 am
by EViews Glenn
There are a variety of ways to do this depending on the exact values that you wish to use. The best method depends on the context. You'll have to provide exact details on your workfile structure, and the values you wish to use in initializing the series.

Re: How fill a series with a specific range of numbers

Posted: Tue Jun 09, 2015 2:19 pm
by EViews Gareth
Look up series.adjust in the object reference.

Re: How fill a series with a specific range of numbers

Posted: Wed Jun 10, 2015 10:37 am
by hirastikanah
Hello again
Looking up for series.adjust didn't help.

I would like to fill a series with integer numbers start from 10 for instant to 15... Without typing them one by one 10,11,12,13,14,15

Re: How fill a series with a specific range of numbers

Posted: Wed Jun 10, 2015 1:13 pm
by EViews Glenn

Code: Select all

series y = @trend+10
and if there are only 6 observations in the workfile

Code: Select all

series y y.adjust = 10 .. 15 ^
The latter linear interpolates between the first observation and the last in the current sample using the endpoint values.

Re: How fill a series with a specific range of numbers

Posted: Thu Jun 11, 2015 5:08 am
by hirastikanah

Code: Select all

series y = @trend+10
and if there are only 6 observations in the workfile

Code: Select all

series y y.adjust = 10 .. 15 ^
The latter linear interpolates between the first observation and the last in the current sample using the endpoint values.
THANK YOU SO MUCH

one more question:
the workfile has 20 observations
to fill from the first one to the 6th one with numbers 10,11,12,13,14,15
series y=@trend+10 is great here but how can i stop it on sixth observation?

thanks again

Re: How fill a series with a specific range of numbers

Posted: Thu Jun 11, 2015 10:58 am
by EViews Glenn
Set a restricted sample

Code: Select all

smpl @first @first+5 series y = @trend+10 smpl @all

Re: How fill a series with a specific range of numbers

Posted: Thu Jun 11, 2015 11:59 pm
by hirastikanah
Set a restricted sample

Code: Select all

smpl @first @first+5 series y = @trend+10 smpl @all
thaaaaaaaaaaaaaaaanks :D