Hi Nick Cox
I want to add and multiply certain variables in stata in a new variable VaR. My expression is:
gen VaR=constant_term+ (coeff_L_Tbills* L_Tbills)+ (coeff_L_Inf* L_Inf)
Now the issue is that, for some rows where when L_Inf is missing or 0, the whole outcome VaR of the equation becomes zero. which shouldn't be otherwise if calculated manually.
How can I amend the above code, to get the correct equation.
Best Regards
Related Posts with working out expressions(sum and multiply) in stata with some missing observations
Diff-in-diff - Collinearity in dummy identifying individual i variableHi! I'm testing a diff-in-diff model and the dummy variable identifying individual i was ommitted of…
Dummy Variable Financial Expert with Panel DataHi Guys, I'm currently writing my thesis about the influence of the tenure of outside directors on …
Identifying a change in employer in panel dataHello everybody. I want to track when a group of individuals changes from one employer to another d…
How to properly note down my regression?Hello all, I'm finishing up my bachelor's thesis but I'm running into one last issue. I do not unde…
Creating Dummy Variable each company-year with multiple observationsHi Guys, I'm currently writing my thesis about the influence of the tenure of outside directors on …
Subscribe to:
Post Comments (Atom)
0 Response to working out expressions(sum and multiply) in stata with some missing observations
Post a Comment