https://iserredex.essex.ac.uk/support/https://iserredex.essex.ac.uk/support/support/favicon.ico?15995719382021-01-20T20:10:57ZUnderstanding Society User SupportUnderstanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56662021-01-20T20:10:57ZGundi Kniesgknies@essex.ac.uk
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>Hi Leilah,<br />to generate the mean in a group you do not need to use the svy suite of commands.<br />Simply generate a new variable that contains the possible combinations of gor_dv sex hiqual_dv using commands like egen group(), and then summarize the values by this new variable applying the weights:</p>
<p>gen x_refgr=.<br />forvalues v=1(1)N {<br />sum x [aw=weight] if refgroup==`N'<br />gen x_refgr=r(mean) if refgroup==`N'<br />}</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56672021-01-20T20:17:43ZLeilah Plant-Tchenguiz
<ul></ul><p>Great, thank you for your help!</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56682021-01-20T20:21:07ZGundi Kniesgknies@essex.ac.uk
<ul><li><strong>Assignee</strong> set to <i>Leilah Plant-Tchenguiz</i></li></ul><p>Hi Leilah,<br />to generate the mean in a group you do not need to use the svy suite of commands.<br />Simply generate a new variable that contains the possible combinations of gor_dv sex hiqual_dv using commands like egen group(), and then summarize the values by this new variable applying the weights:</p>
<p>gen x_refgr=.<br />lab var x_refgr "Mean value for reference group" <br />forvalues v=1(1)N {<br />sum x [aw=weight] if refgroup==`v'<br />replace x_refgr=`r(mean)' if refgroup==`v'<br />}</p>
<p>Each person in refgroup v (with values 1 through N) should then have the mean of their refgroup assigned to them in variable x_refgr.<br />Hope this helps,</p>
<p>Gundi</p>
<p>PS. Please ignore my previous reply. hit the wrong key and is was posted prematurely.</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56692021-01-20T20:23:29ZLeilah Plant-Tchenguiz
<ul></ul><p>Thanks</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56722021-01-21T10:09:28ZAlita Nandi
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>There are multiple methods. For example, you can also use collapse:</p>
<p>Open your data<br />save temp, replace // collapse changes the dataset, so you will have to save the existing data first<br />use temp, clear<br />collapse fimngrs_dv [pweight=g_indscus_lw] if fimngrs_tc==0, by(gor_dv sex hiqual_dv)<br />merge 1:m gor_dv sex hiqual_dv using temp</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56732021-01-21T10:09:38ZAlita Nandi
<ul><li><strong>Private</strong> changed from <i>Yes</i> to <i>No</i></li></ul> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=56762021-01-21T10:40:41ZAlita Nandi
<ul><li><strong>Assignee</strong> deleted (<del><i>Leilah Plant-Tchenguiz</i></del>)</li></ul> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=57292021-01-30T17:08:17ZLeilah Plant-Tchenguiz
<ul></ul><p>Hi Gundi, why do you use an aweight? I am trying to construct the mean income of a reference group weighted by population.</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=57302021-01-30T17:41:02ZLeilah Plant-Tchenguiz
<ul></ul><p>In addition, how would I know which population weight to choose for the mean income calculation? When calculating mean income for each reference group, I would like reference groups to consist of people of the same sex and age in the same region and year. The dataset I am using to calculate this consists of only waves 1-7. Can I use a cross-sectional weight for a pooled sample from waves 1-7, or is this not valid because I am splitting the data by year?</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=57332021-02-01T10:37:13ZGundi Kniesgknies@essex.ac.uk
<ul><li><strong>Category</strong> set to <i>Data analysis</i></li><li><strong>Assignee</strong> set to <i>Leilah Plant-Tchenguiz</i></li></ul><p>Hi Leilah,<br />as you are looking for the population mean, you can use summarize which allows aweight, but not pweight. Alternatively, use mean with pweight. The Stata user fora have quite a few queries and responses on this.</p>
<p>Regarding the reference income and which weights to use, most applications I have seen have used present (i.e., current year or quarter) or past (i.e., typically, last year or quarter) income as reference income. Assuming that you'd be looking to follow in the footsteps of that type of work, to predict incomes in a particular calendar year using Understanding Society, you'd be pooling data from two consecutive waves (e.g., W1Y2 and W2Y1 to get estimates for 2010). You'd use re-scaled cross-sectional weights for this. Please see <a class="external" href="https://iserredex.essex.ac.uk/support/issues/494">https://iserredex.essex.ac.uk/support/issues/494</a> for further guidance on pooled cross-sectional analyses.</p>
<p>Best wishes,<br />Understanding Society User Support</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=57392021-02-01T20:39:15ZLeilah Plant-Tchenguiz
<ul></ul><p>Thank you.</p> Understanding Society User Support - Support #1486: Constructing a reference group using weightshttps://iserredex.essex.ac.uk/support/issues/1486?journal_id=61942021-08-06T10:20:48ZUnderstanding Society User Support Teamusersupport@understandingsociety.ac.uk
<ul><li><strong>Category</strong> set to <i>Weights</i></li></ul>