Hello
I need to calculate population shares (of immigrants among the total population) by region, branch, firm and region*branch in a particular year. The data i have is panel data. The ways of calculating shares i could find online did not help with this, as they resulted in the population being aggregated across time for a region instead of in a single year (i tried some the suggestions here (https://www.statalist.org/forums/for...-firm-in-stata) and here (https://www.statalist.org/forums/for...gramming-stata).
dataex example (i don't think this will be that helpful but the FAQ says to include data example, i need to limit to specific variables as there are a lot of variables and the command won't run unless i specify a limited number of variables):
I need to calculate population shares (of immigrants among the total population) by region, branch, firm and region*branch in a particular year. The data i have is panel data. The ways of calculating shares i could find online did not help with this, as they resulted in the population being aggregated across time for a region instead of in a single year (i tried some the suggestions here (https://www.statalist.org/forums/for...-firm-in-stata) and here (https://www.statalist.org/forums/for...gramming-stata).
dataex example (i don't think this will be that helpful but the FAQ says to include data example, i need to limit to specific variables as there are a lot of variables and the command won't run unless i specify a limited number of variables):
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(ielandgrp region induagg aar) 1 4 . 1980 1 4 . 1981 1 4 . 1982 1 4 . 1983 1 4 . 1984 1 4 . 1985 1 4 . 1986 1 4 . 1987 1 4 . 1988 1 3 12 1980 1 3 12 1981 1 3 12 1982 1 3 12 1983 1 3 12 1984 1 3 12 1985 1 3 12 1986 1 3 12 1987 1 3 12 1988 1 3 12 1989 1 3 12 1990 1 3 . 1991 1 3 . 1992 1 3 . 1993 1 3 . 1994 1 3 . 1995 1 3 . 1996 1 3 . 1997 1 3 . 1998 1 3 . 1999 1 3 . 2000 1 3 . 2001 2 3 11 1980 2 3 11 1981 2 3 11 1982 2 3 . 1983 2 3 . 1984 2 3 . 1985 2 3 . 1986 2 3 . 1987 2 3 . 1988 2 3 . 1989 2 3 . 1990 1 1 6 1980 1 1 6 1981 1 1 6 1982 1 1 6 1983 1 1 6 1984 1 1 6 1985 1 1 6 1986 1 1 6 1987 1 1 6 1988 1 1 6 1989 1 1 6 1990 1 1 6 1991 1 1 6 1992 1 1 6 1993 1 1 6 1994 1 1 6 1995 1 1 6 1996 1 1 6 1997 1 1 6 1998 1 1 6 1999 1 1 6 2000 1 1 6 2001 1 1 6 2002 1 1 . 2003 1 1 6 2004 1 1 . 2005 1 1 . 2006 1 1 . 2007 1 1 . 2008 1 1 . 2009 1 1 . 2010 1 1 . 1980 1 1 . 1981 1 1 . 1982 1 1 . 1983 1 1 . 1984 1 1 . 1985 1 1 . 1986 1 1 . 1987 1 1 . 1988 1 1 . 1989 1 1 . 1990 1 1 . 1991 1 1 . 1992 1 1 . 1993 1 1 . 1994 1 1 . 1995 1 1 . 1996 1 1 . 1997 1 1 . 1998 1 1 . 1999 1 1 . 2000 1 1 . 2001 1 3 11 1980 1 3 11 1981 1 3 11 1982 1 3 11 1983 1 3 11 1984 end
Comment