Hi,
I use the following equation for calculating return for a portfolio of stocks.
gen MOMf3_p1= ( for4r1 [_n-4] + for3r1 [_n-3] + for2r1 [_n-2])/3
for4r1 to for2r1 are returns
_n denotes time
the issue is if one of the returns above go missing the answer I get is a "."
I understand I cannot use egen function to resolve this.
Is there a way?
Thank you.
Sampath
Related Posts with Dealing with missing data
Latent transition analysis in StataHello scholars, I have seen that the question "Can Stata do latent transition analysis?" was asked …
cumulative sum that restarts at 0, if observe "0" in the original column.Hi, I have a simple question. I would like to have a cumulate sum that restarts if observing 0 in th…
teffects - predict pscore, psI estimated the following model before estimating. I need to check the predicted propensity score mo…
elasticity- price, income etc. do i use a log-log model or employ mfx-eyex?Hi, I am very new to Stata so I apologise for the amateur-ness of my question. How do I calculate pr…
GEE and Fixed Effects TobitHello everyone, I have been doing extensive reading for some time to decide upon some appropriate …
Subscribe to:
Post Comments (Atom)
0 Response to Dealing with missing data
Post a Comment