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.
Related Posts with Error Code (199)
Comparing multiple proportions in StataComparing multiple proportions in Stata; What is the command to compare >3 proportions in Stata?…
Pr-testHello I hope you can help me with something to my bachelor thesis. I want to make a pr test to compa…
Inference based on Influence function or delta methodArray Hello, every one. i am working on replicates Peters and Taylor(2017), JFE My questions are: w…
IV with dummy variableDear all, I am trying to run this model: Array Where i is individual i, in strata s, and time t. …
Collinearity in DID modelDear friends, I met the collinearity problem in DID model. I selected the sample who did not enter …
Subscribe to:
Post Comments (Atom)
0 Response to Error Code (199)
Post a Comment