Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65570

Replacing missing values of a variable by using just replaced values

$
0
0
Hi,

I have two variables X and Y. I am interested in replacing missing values of the a variable “Y” by Y[_n] + X[_n+1], but I want the values to be added in Y continuously, by taking the newly created Y[_n] and adding it to the already existing X[_n+1].

"QUARTER" "X" "Y"
"2015Q4" .08754930391409184 5.935085
"2016Q1" .026804317129169822 5.899983
"2016Q2" -.05597368145682734 5.845508
"2016Q3" .002790145426860041 5.851024
"" .08094351681909219 5.936776
"" .024367596525833684 .
"" -.04949894430911973 .
"" .004990793451185652 .
"" .0747851379885606 .
"" .022320822804478287 .
"" -.04361859211543885 .


Kindly advise.

Many thanks.

Sam

Viewing all articles
Browse latest Browse all 65570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>