Hello Statalists,
I ’am quite a beginner in Stata and statistics in general. I have a large data sample of 11,285,261 observations and 176 variables. The data sample contains Swedish companies from 1998-2017. My intention with the data is to create a variable to see if the company need to perform a statutory audit. But it’s quite complicated from my understanding.
So what i need to tell Stata is:
1) If rr01_ntoms (sales) is greater than or equal to 3,000,000
2) If br09_tillgsu (assets) or br17_eksksu (debt) is greater than or equal to 1,500,000
3) If bslov_antanst (employees) is greater than or equal to 3
And if two of the three statements listed above is fulfilled the variable need to take on the value of 1, and if one or zero of the statements are fulfilled the variable need to take the value of 0
Any and all help will be greatly appreciated.
Also apologies for any grammatical errors since english is my second language.
Please let me know if this is misplaced or inappropriate for this forum.
Related Posts with Create a new variable with If -statements
Overlapping-rolling windowDear Statalisters, I am running into an issue with rolling windows and I need your kind help with t…
Cross-lagged panel models with binary and continuous outcome variables: gsem or sem (?) + other questionsGreetings, I'm running Stata 15.1 on OSX and working with yearly panel data. My hypothesis predicts…
What does 1.009e-12 mean?What does 1.009e-12 mean? Can you show it in a decimal expression? How to transfer it to decimal ex…
Concatenating multiple variables into one variableDear Statalist, I am struggling with the "egen - concat" command to join the list of 4 variables in…
Adding new lines in a given data setFor some reasons, I need to add a new line above a given data set to show the summations of variable…
Subscribe to:
Post Comments (Atom)
0 Response to Create a new variable with If -statements
Post a Comment