Search found 16 matches
- Fri Dec 16, 2016 3:08 pm
- Forum: Programming
- Topic: Index problem in while loop
- Replies: 3
- Views: 4467
Re: Index problem in while loop
Ah, I see. Just checked the numbers and you are right. Many thanks, Matt, Gareth.
- Fri Dec 16, 2016 2:17 pm
- Forum: Programming
- Topic: Index problem in while loop
- Replies: 3
- Views: 4467
Index problem in while loop
Hi, I have a vector j1 = [1 2 3, ..., 17] and a set of series labelled w_0, w_5, w_10, ..., w_80, and want to create a new series jp1 = w_0*j1(1) + w_5*j1(2) + ... + w_80*j1(17) The code below however, generates jp1 starting from !m=12 (!n=55), instead of !m=1. What am I doing wrong here? Thanks. sc...
- Tue Feb 03, 2015 7:45 am
- Forum: Estimation
- Topic: Creating Dummy Variable in Panel
- Replies: 2
- Views: 3390
Re: Creating Dummy Variable in Panel
Many thanks, Gareth!
- Mon Feb 02, 2015 4:53 pm
- Forum: Estimation
- Topic: Creating Dummy Variable in Panel
- Replies: 2
- Views: 3390
Creating Dummy Variable in Panel
Hi there, I have a panel dataset with two cross-section identifiers (country, industry) and would like to create a dummy variable for country-year pairs (e.g. USA-1990 = 1, FRA-2000 = 1, etc ...). Could you please suggest a way to create this variable (e.g. using @expand or @recode)? I have 20 count...
- Tue Dec 30, 2014 9:15 am
- Forum: Data Manipulation
- Topic: How to a new panel data series
- Replies: 3
- Views: 3905
Re: How to a new panel data series
I see. Still good to know. Thanks, Gareth!
- Tue Dec 30, 2014 7:50 am
- Forum: Data Manipulation
- Topic: How to a new panel data series
- Replies: 3
- Views: 3905
How to a new panel data series
Hi, there. I have a panel data workfile with countries as cross-section identifiers and years over 1980-2010. What I'm trying to do is to create a new series in which all time series values of cross-sections are divided by the respective values of a specific cross-section id (e.g. USA) over the same...
- Thu Oct 23, 2014 3:21 pm
- Forum: Data Manipulation
- Topic: Copying data from one dated panel to another
- Replies: 3
- Views: 5981
Re: Copying data from one dated panel to another
It works perfectly! Many thanks, Chris.
- Thu Oct 23, 2014 2:43 pm
- Forum: Data Manipulation
- Topic: Copying data from one dated panel to another
- Replies: 3
- Views: 5981
Copying data from one dated panel to another
Hi, I have one dataset saved in a dated panel with cross-section id structured as "XXX_YYY" (XXX-country code, YYY-industry code) over 1970-2010, and another dataset in a dated panel over 1960-2010 with cross-id "XXX". What I'm trying to do is copying the data in the second panel...
- Mon Oct 20, 2014 1:21 pm
- Forum: Programming
- Topic: Import string lists from excel
- Replies: 2
- Views: 4146
Re: Import string lists from excel
I see. Many thanks, Gareth.
- Mon Oct 20, 2014 12:58 pm
- Forum: Programming
- Topic: Import string lists from excel
- Replies: 2
- Views: 4146
Import string lists from excel
Hi, I'm trying to create some string lists using lists of variables stored in an excel file. For example in the attached excel file, I have a list of country names in the "Country" worksheet and sector names in the "Sector" sheet and I would like to create %country and %sector st...
- Thu Feb 27, 2014 5:12 pm
- Forum: Data Manipulation
- Topic: How to extend a data series using growth rates from another
- Replies: 10
- Views: 9179
Re: How to extend a data series using growth rates from anot
Aha! I see. Many thanks, Gareth.
As for the loop, I'm thinking about using the while loop with the number of NAs in x2_ext as the control. In other words, run while # of NAs in X2_ext > 1. Is there a command for counting the # of NAs in this case?
As for the loop, I'm thinking about using the while loop with the number of NAs in x2_ext as the control. In other words, run while # of NAs in X2_ext > 1. Is there a command for counting the # of NAs in this case?
- Thu Feb 27, 2014 4:18 pm
- Forum: Data Manipulation
- Topic: How to extend a data series using growth rates from another
- Replies: 10
- Views: 9179
Re: How to extend a data series using growth rates from anot
Mine is Version 7.2
- Thu Feb 27, 2014 4:02 pm
- Forum: Data Manipulation
- Topic: How to extend a data series using growth rates from another
- Replies: 10
- Views: 9179
Re: How to extend a data series using growth rates from anot
Yes, Gareth. But your code also extends x2 only back to 1979, not all way to 1970.
- Thu Feb 27, 2014 3:21 pm
- Forum: Data Manipulation
- Topic: How to extend a data series using growth rates from another
- Replies: 10
- Views: 9179
Re: How to extend a data series using growth rates from anot
Hi Gareth, Many thanks for the suggestion. Unfortunately, it didn't do the trick. I'm attaching a sample workfile as an example. It contains two similar but slightly US GDP series over the period of 1970 to 2011 (x1 and x2). X1 has values ranging from 1970 to 2011, while X2 from 1980 to 2011. What I...
- Thu Feb 27, 2014 2:26 pm
- Forum: Data Manipulation
- Topic: How to extend a data series using growth rates from another
- Replies: 10
- Views: 9179
Re: How to extend a data series using growth rates from anot
Sorry, I meant 6. That is, 6*(90/95) = 5.7, where 6 is the date T3 value of X2.
