Hello. This seems like it would be straightforward but as an advanced beginner I am having a hard time figuring this one out. I am trying to generate new variables that will be used as my pweight. These will be the inverse of the sum of the number of females age 10-14 and males age 10-14 in each school out of the total population surveyed. I I have 3 variables of interest: SchoolName, Age, Sex. SchoolName has 30 different school names, Age is a continuous variable and Sex is male or female. Any insight how to do this would be greatly appreciated.
Thanks,
Adam
Related Posts with Generating a new variable that is the sum of each value of a different variable
Replication code for power analysisHello everyone I need to conduct power analysis for an RCT for a bunch of outcome variables from th…
Reshape matched case control data from wide to long formatHello, I have a case control study with 59 cases matched 1:3 with controls on birth year. The match…
Plot only one baselevel using coefplot for multiple equationsI would like to plot only one baselevel using coefplot for two equations. The code I am using is coe…
How to save s.e. after reghdfe commandHi everybody! I have a lingitudinal dataset (individuals x years, individuals live in different are…
nbvar downloadHello, I have Stata11 and I'm trying to run the nbvargr command. I have been able to download this s…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a new variable that is the sum of each value of a different variable
Post a Comment