Hi everyone!
I'm just starting to learn Stata and I have a problem with an activity, I have a database of some imports of white meat and there is a variable called ORIGIN that contains the kind of meat (chicken, pig, turkey), and then there is another variable called PRODUCT, where we can find the products obtained from the kind of meat (leg 1/4, ribs, chicken wings, etc). Also, there are another variables like CIF, TOTALIMPORT and FOBUNIT, but the one I need for the exercise is the ORIGIN var.
What I have to do is create new databases, one for each kind of white meat, using the foreach loop (more like separate the database into three), and the name of each dta has to be the kind of white meat.
I've been trying for hours but I'm out of ideas, so I think I need some help.
Thanks!
PS: Sorry if my english isn't good, I'm also learning haha.
I'm just starting to learn Stata and I have a problem with an activity, I have a database of some imports of white meat and there is a variable called ORIGIN that contains the kind of meat (chicken, pig, turkey), and then there is another variable called PRODUCT, where we can find the products obtained from the kind of meat (leg 1/4, ribs, chicken wings, etc). Also, there are another variables like CIF, TOTALIMPORT and FOBUNIT, but the one I need for the exercise is the ORIGIN var.
What I have to do is create new databases, one for each kind of white meat, using the foreach loop (more like separate the database into three), and the name of each dta has to be the kind of white meat.
I've been trying for hours but I'm out of ideas, so I think I need some help.
Thanks!
PS: Sorry if my english isn't good, I'm also learning haha.

Comment