Dear Statalist,
I’m using a dataset consisting of 5 variables - a household identifier, an identifier of the person within a household, a variable that shows if the person is a child or an adult, a variable that displays the ethnic group of the person and a variable that shows total income of that person. At first, i created a new variable displaying the total income of a household, divided by the number of people in that household. Since there are many children included in the set, I would like to ‘weigh’ these observations. Specifically, I would like to create a new variable that displays the income of a household divided by the number of people; but when dividing, I want the adults to be taken in account at a value of 1 and the children at a value of 0.5.
Could someone tell me how this can be done in Stata (V16.1)?
Thanks in advance!
Related Posts with Give weights to observations
Creating square root scale of the household incomeHello, can anyone help me? I Need to create a square root scale of the household income (income/squa…
diagnostic tests after 3slsDear statalist, I have the cross-sectional data. I did 3sls because of I have endogeneity problem be…
How to combine two variables into one based on two criteriaHi I am a beginner in Stata. I have one panel dataset, and I want to do the following: To look up …
data transformationAs i am not a statistician i have a naive question. i have 50 dependent variables that i want to reg…
How to create a new variable that contains the total frequencies of only specific values of another variable?Hello community, I'm trying to create a new variable "ER" (employment rate) from another variable L…
Subscribe to:
Post Comments (Atom)
0 Response to Give weights to observations
Post a Comment