Create a new data series based on an existing one!

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

agarwaldvk
Posts: 6
Joined: Sat Nov 28, 2009 7:23 pm

Create a new data series based on an existing one!

Postby agarwaldvk » Wed Nov 22, 2017 3:07 pm

Hi


I have a working with the data set comprising of 4 variables viz Date (Daily), usageValues, Temperature and WeekDayFlag(0 Or 1 valued).

The date period is from 1st of January 2016 through to 7th of November 2017.

I want to create 2 new data series, one for usage (say usage_new) and one for temperature (say temp_new) from the original series with the following conditions for both of them :-

1. WeekDayFlag = 1 and
2. ((Date Between 1st of April 2016 and 30th of September 2016) Or (Between 1st of April 2017 and 30th of September 2017))

Is there a way to do this?

Also, if there is, once created then are these independent of the original ones, that is, if I were to subsequently create another 2 series (as above but for a different set of conditions for WeekDayFlag and Dates), would the previously created series get affected by these new series?


Best regards

Deepak

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Create a new data series based on an existing one!

Postby EViews Gareth » Wed Nov 22, 2017 3:11 pm

Don't understand the question. Perhaps you could provide an example of a manually created variable?
Follow us on Twitter @IHSEViews

agarwaldvk
Posts: 6
Joined: Sat Nov 28, 2009 7:23 pm

Re: Create a new data series based on an existing one!

Postby agarwaldvk » Wed Nov 22, 2017 3:25 pm

Hi

The data set is like so :-
Date, Usage, AvgTemp, HolidayFlag
01/01/2016, 12560, 34.5,1
02/01/2016, 11598, 33,1
03/01/2016, 12248, 32,0
...
...
07/11/2017, 13256, 23.5,0

Importing this data as a structured data set resulted in 3 variables viz Usage, AvgTemp, HolidayFlag with a certain number of records.

I want to create a new series for Usage say Usage_New which essentially is a subset of the original data series and contains the relevant records meeting the condition that :-
1. HoldiayFlag = 0 And
2. Dates fall within the range of ((1st Apr 2016 And 30th Sep 2016) Or (1st Apr 2017 And 30th Sep 2017))

Hopefully that should make it clearer.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Create a new data series based on an existing one!

Postby startz » Wed Nov 22, 2017 4:40 pm

something like

Code: Select all

series usage_new
smpl 4/1/2016 9/30/2016 4/1/2017 9/30/2017 if weekdayflag=1
usage_new = usage

agarwaldvk
Posts: 6
Joined: Sat Nov 28, 2009 7:23 pm

Re: Create a new data series based on an existing one!

Postby agarwaldvk » Wed Nov 22, 2017 5:04 pm

Hi startz


Thanks for your response. I will try that tonight!

Having said that, after creating the series "Usage_New" as per your advice, if I were to subsequently generate another series say Usage_New_1 for a different period range and a different weekdayflag value, would that, in any way impact the previously generated series or would these 2 series remain total independent of each other?


Best regards


Deepak

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Create a new data series based on an existing one!

Postby startz » Wed Nov 22, 2017 5:23 pm

The two series would be independent of one another.

agarwaldvk
Posts: 6
Joined: Sat Nov 28, 2009 7:23 pm

Re: Create a new data series based on an existing one!

Postby agarwaldvk » Wed Nov 22, 2017 5:31 pm

Hi startz


Great stuff. Thanks for your help! I will find out if it works for me tonight and let you know!


Best regards


Deepak


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 12 guests