Hello Everyone,
I'm Kousay, and I'm conducting research on the impact of the pandemic on the firm financial performance. To represent the firm's total financial performance, I have chosen several variables. Still, as I am unable to add them, I need to generate a new variable called "score" in Stata using the following commands. However, when I run the last command, I encounter an error code (198). I have already checked all the variables and ensured there are no missing values and verified the spelling, but I still can't locate this new variable score. I hope to receive some help as this is the dependent variable for my regression.
following are the command Im using
// Define weights for each variable
local weights "0.2 0.3 0.2 0.2 0.1"
// Define variables to include in the analysis
local variables "ROA ROE EPS earnings_growth revenue_growth"
// Generate a new variable as the weighted sum of the selected variables
egen score = rowtotal ROA ROE EPS earnings_growth revenue_growth /wordcount ROA ROE EPS earnings_growth revenue_growth/ 5 * 0.2 0.3 0.1 0.2 0.2
this last step to generate the new variable score, I get this error r(198)
If anyone has any suggestions on what might be causing this error or any tips on how to fix it, please let me know. I would greatly appreciate any help you can offer!
Thank you in advance.
0 Response to Error Code (199)
Post a Comment