[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Averages for missing values
At 03:45 PM 9/8/2005, TinnaLaufey Asgeirsdottir wrote:
Adding to your list of suggestions: try the -impute- command, e.g.
Before I give myself carpal tunnel syndrome I might ask:
Is there a command to replace missing values with averages?
What I am currently doing is:
replace varnameAVE=[here I use the mouse to copy from the results
window to the command window] if varnameAVE==.
gen one = 1
impute varname one, gen(varnameAVE)
For other variations (e.g. subgroup means) see p. 10 and later of
Let me add that this may be showing you how to do evil, however; most
of these sorts of methods are now frowned upon. See Paul Allison's
Sage book entitled "Missing Data". You may wish to check out Patrick
Royston's -ice- package, which is also discussed in Stata Journal, V.
5 # 2, pp. 188-201.
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
* For searches and help try: