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
Calcule Overlap between two variablesI need to calculate the overlap of two variables (time series). I saw that in R, the command is "cal…
Matching datesHi all, I need the iv_spread value of option expiration date (exdate) closest (during or after) to …
Sample size for cox proportional hazards model with multiple covariatesThis is my first time using power cox, and I would like confirmation of my code. HTML Code: power…
Comparing mixlogit results across equationsDear statalist users, I run two separate mixlogit (Arne Hole commend) models and I want to compare c…
Identifying matched observations in a large databaseDear all, This is relevant to the question I asked some days ago and can be found here: I have enc…
Subscribe to:
Post Comments (Atom)
0 Response to Create a new variable with If -statements
Post a Comment