Hey there,
Iam still newish to Stata and want to code it like other languages. So my todays project:
Is it possible to condition the execution of a codeline on an if clause?
Context: I am working with Data of an research institute which allows to publish Data only if there are more than 20 observations in one object.
What I want to do:
“If Observations > 20
Execute code
Else skip to next line”
What I do otherwise: search for all outputs for all Codelines with less than 20 observations. (not preferred 😊 )
Best regards
Clemens Schiewek
Related Posts with Conditional execution of a code line on if clause
Changing Label Code in LabelHey everyone, I have received a data set where the sender incorrectly assigned the wrong codes for …
Create a rate variable for population as a whole with sample weightsDear Stata users, I am new to stata and am working on a dataset with 20 mio. people for two years w…
Mixed frequency in panal data Hello sir, in my panel data dependent variable is monthly excess return but independent variables …
Adding suffix or prefix to each element of a global varlistHello, I have a core set of variables and for each of them I generated several secondary variables.…
Help via mergeI have 2 datasets: HEIGHT AGE SCORE x z x y HEIGHT AGE Controls x z x x y x Ho…
Subscribe to:
Post Comments (Atom)
0 Response to Conditional execution of a code line on if clause
Post a Comment