[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Averages for missing values
At 21:45 08/09/2005, Tina wrote:
You should use either the r() results (see -whelp return-) or -egen- (see
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==.
The first way is like:
replace varnameAVE=r(mean) if missing(varnameAVE)
The second way is like:
replace varnameAVE=AVE if missing(varnameAVE)
Both the returned r() results and -egen- are very useful in many more ways
than this, and it is a good idea to find out more about them.
I hope ths helps.
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.
* For searches and help try: