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
Combining two variablesHello, i'm just working on a do-file and I'm struggeling to combine to variables. The first variable…
Marginal Effects on ivprobitI'm running an ivprobit model, and I'm trying to get marginal effects out of the second stage coeffi…
Calculating BMI when ht and wt have been recorded with different unitsHello, I am trying to create a new variable for BMI and I have a dataset with continuous variable "…
IV regression with multiple interactionsHello, I hope you could help me with this. I need to estimate three separate equations with -ivreg2…
Use of bma/wals on binary dependent variableHi there...I have a binary dependent variable (use foxtlogit analysis)...I am now at a point of cons…
Subscribe to:
Post Comments (Atom)
0 Response to Dealing with missing data
Post a Comment