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
Replace values in each rowHi, In the following dataset: Code: * Example generated by -dataex-. To install: ssc install data…
Stata 17 ptrendsHi, I'm a student working on a diff in diff using Stata 17's new didregress. I used the postestimati…
replicating an instrumented model in eregress and ivreg2 (or ivregress)Hi Stata people, I would like to replicate a model I am using in eregress (Stata 15 and up) and ivr…
Mean-adjusted change research designDear all, For my Master Thesis I am examining the change in institutional holdings after receiving …
replicating an instrumented model in eregress and ivreg2 (or ivregress)Hi Stata people, I would like to replicate a model I am using in eregress (Stata 15 and up) with iv…
Subscribe to:
Post Comments (Atom)
0 Response to Create a new variable with If -statements
Post a Comment