Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: frequency distribution for only the family unit
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: frequency distribution for only the family unit
Date
Wed, 26 Feb 2014 00:10:48 +0000
To tag just one member of each family
egen tag = tag(family_id)
... if tag
Nick
[email protected]
On 25 February 2014 23:23, Patrick Abi Nader <[email protected]> wrote:
> I am using Stata 12 and my data is in wide format. I have 233
> observation (rows) for 233 children. Some of these children are
> siblings. I have variables that are for the family unit (i.e. both
> children in the same family have the same score) for example how many
> adults are in your family? or What is the race of the parent? I cannot
> count this information twice.
> When I am doing frequency distributions I want to count children from
> the same family as one unit instead of twice or 3 or 4 times. the user
> written command "fre" doesn't accept "if" or "in", and even if it was
> allowable I cannot conceive how to do this.
> I have a family_id (which uniquely identifies 175 families example of
> family id "001FCR") as a variable and I have a separate variable
> children_id.
>
> Do you folks have any suggestions?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/