title: How do I generate weight variable in STATA
body: <p>I am working on a question that asks me to solve for the weighted average of my dependent variable (hourly wage) by using the weight of my independent variable (which is a discrete variable that has 16 categories and more than 300,000 observations). as you can see below.
  <a href="https://i.stack.imgur.com/NBGLx.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>how am I suppose to generate the weighted variable for a variable that has so many observations? </p>