Hello all,
I am new here to the Statalist forum so apologies if I have violated convention for discussing issues. I am utilising panel data of years 1970-2005 across several countries.
I have very limited data for a particular variable (adjusted_overvaluation_index) but wish to extend it to other years. For this variable, I only have its value for 2005. Given I am using panel data all other years for each country are denoted as missing. I intend to make an index variable utilising this variable. 2005 will be set as the base year. To extend it to other years I wish to make it vary according to percentage changes in another variable I have constructed.
I have constructed another variable that has percentage changes, and wish to make this the amount that the index varies by. However, given the missing values I cannot do this as it simply results in a missing value.
Below is the code I have used thus far, along with some text from a piece of economic literature which I am following in my attempted construction of this variable. I have also attached a photo of my 'browse' along with some lables to help illustrate my question.

Many thanks
-Will
I am new here to the Statalist forum so apologies if I have violated convention for discussing issues. I am utilising panel data of years 1970-2005 across several countries.
I have very limited data for a particular variable (adjusted_overvaluation_index) but wish to extend it to other years. For this variable, I only have its value for 2005. Given I am using panel data all other years for each country are denoted as missing. I intend to make an index variable utilising this variable. 2005 will be set as the base year. To extend it to other years I wish to make it vary according to percentage changes in another variable I have constructed.
I have constructed another variable that has percentage changes, and wish to make this the amount that the index varies by. However, given the missing values I cannot do this as it simply results in a missing value.
Below is the code I have used thus far, along with some text from a piece of economic literature which I am following in my attempted construction of this variable. I have also attached a photo of my 'browse' along with some lables to help illustrate my question.
Code:
//"The adjusted overvaluation index for 2005 will be the raw index divided by the predicted index. The index is then 100 in 2005 when there is no adjusted overvaluation, while an index of 150 would suggest 50 percent adjusted overvaluation." (Easterly, 2019, pp.42) generate adjusted_realovervaluation = (raw_realovervaluation / realovervaluation_predicted) label variable adjusted_realovervaluation "=(raw_realovervaluation / realovervaluation_predicted)" browse generate adjusted_index = adjusted_realovervaluation*100 //"The benchmark overvaluation index is extended to other years using the percent changes in the real exchange rate index, whcih is defined as (Nominal offical exchange rate)*(US CPI index)/(Domestic CPI index)." (Easterly, 2019, pp.43) browse generate extension_realoverval = ((officalexchange_rate)*(US_CPI_thatyear)/(CPIdata)) xtset countrynum year generate pcchange = 100*D.extension_realoverval / L.extension_realoverval browse countrycode countryname year CPIdata US_CPI_thatyear countrynum adjusted_realovervaluation adjusted_index extension_realoverval pcchange //I am now unsure of how to extend this to other years given that I have many missing values for adjusted_index as I have only 2005.
Many thanks
-Will
Comment