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
Create Distribution of P-values Across RegressionsI am regressing 100 repetitions with my randomly assigned treatment variable x1 as my variable of in…
Mean using "if" with string variablesA colleague used the exact code below to run a meta-analysis with the if statement being string vari…
User-written KHB command: How do I Interpret Indirect Effects and Determine Significance?Hello everyone, I'm using the user-written KHB command in Stata to conduct mediation analyses using…
help with making automated tables in stataI am working on a project running regression models for 10 dependent variables and I need to do subg…
help interpreting of model with change score as dependent variable - treatment effectHello, I'm working on a study where the goal is to determine the effect of a treatment. Everyone rec…
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