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
Create a new data series based on an existing one!
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Posts: 6
- Joined: Sat Nov 28, 2009 7:23 pm
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Create a new data series based on an existing one!
Don't understand the question. Perhaps you could provide an example of a manually created variable?
Follow us on Twitter @IHSEViews
-
- Posts: 6
- Joined: Sat Nov 28, 2009 7:23 pm
Re: Create a new data series based on an existing one!
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.
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.
-
- 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!
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
-
- Posts: 6
- Joined: Sat Nov 28, 2009 7:23 pm
Re: Create a new data series based on an existing one!
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
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
-
- 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!
The two series would be independent of one another.
-
- Posts: 6
- Joined: Sat Nov 28, 2009 7:23 pm
Re: Create a new data series based on an existing one!
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
Great stuff. Thanks for your help! I will find out if it works for me tonight and let you know!
Best regards
Deepak
Who is online
Users browsing this forum: No registered users and 30 guests