Most notably, you may combine several conditions with "and" or "or". If clauses can be more complicated than that. ![]() Regress income education if household=1, betaĪs you can see, the if clause is placed at the end of the command, before the option(s). Let's assume that single mothers are coded as "1" in variable "household". For instance, you might wish to do regress income on education for single mothers only. With Stata, you may also do statistical analyses IF certain conditions are given. Perhaps you will find some examples at a later stage in the "data transformation" section. A household will belong to the category of "unmarried heterosexual, without children" IF there are two adults of different sex (who should have declared each other as partners, because otherwise they might just share a flat for the fun of it) and there are no children. So, a household will belong to the category of "single mothers" IF one single female parent and one or more children are present. For instance, you may wish to create types of household. In most other statistical software I know (admittedly, this is not much more than a handful), if clauses are important for creating or changing data.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |