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
fmlogit aweights not workingCan anyone help with why fmlogit does not accept aweights? I am running a very basic regression on …
Use proportions for randomtag instead of countHi all, do anybody have a clue if there have been an update on "randomtag" to use proportions?. It w…
Merging many string variables into oneHi, I'm using Stata for my short paper. I'm working on a merged long dataset with 656 observations. …
Append all dta-files from a folderHi there, is there an easy and flexible solution to append all .dta files from a given folder? e.g. …
Merging variable labels with label valuesHi, I was wondering if there is a way to merge the variable names (labels) in the first column with …
Subscribe to:
Post Comments (Atom)
0 Response to Give weights to observations
Post a Comment