Hi all! Apologies for the possibly beginner question, I've been searching this forum all afternoon and have not been able to figure out how to do this.
I'm currently working with a survey dataset with two waves (wave 1 and wave 2). Each observation is a particular individual belonging to a particular social group, in a particular state, in wave 1 or 2 of the survey. I'm looking to do two things. First, for each wave I want to find the number of individuals in state x and group i who are employed by the public sector (a binary variable in my dataset), as a percent of the total number of individuals belonging to that social group in that state. Then, I'd like to find the percent change between waves for each (state, group) pair.
So if 25% of individuals (observations) in state 1 who are part of group 3 are employed in the public sector in wave 1, and 30% of individuals in state 1 who are part of group 3 are employed in the public sector in wave 2, then I would want this variable to be equal to ((30-25)/25)*100=10%.
I would appreciate all the help I can get. Thanks so much!
Related Posts with Struggling to create a percent change variable that is organized by multiple subgroupings
by id: replace var1[1] = max(var1), error "weights not allowed"Dear community I have the following types of panel data: The actual data is huge, so ask questions t…
how many waves at least needed to run system GMMDear all, I'm estimating system gmm on a panel of 249 individuals across three waves. I wanted to l…
Convert date and time to Stata formatHi all, I would like to convert the following date and time format into Stata format, so that I can…
Replace missing values in panel dataset by the mean, by pasting up, by pasting downHello, I have the following dataset: clear input year id value 1990 1 . 1991 1 . 1992 1 4 1993 1 . …
Creating dummy variable based on percentilesHi Everyone, I have a variable G-Index with the following distribution: Governance | Index | (Gom…
Subscribe to:
Post Comments (Atom)
0 Response to Struggling to create a percent change variable that is organized by multiple subgroupings
Post a Comment