UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Testing use of "hotdeck"

* this tests the use of "hotdeck" available from
* The Stata Technical Bulletin, (STB-54: sg116.1)
* input a data file with missing data
clear
input x y z
1 10 100
2 20 200
3 30 300
3  . 301
3  .   .
end

sort x
save tempdata, replace

* hotdeck missing for y.
hotdeck y , by(x) store
use imp1
list

* hotdeck missing for y and z
* note that valid value of "301" is replaced with "300"
* because y is "."
* This might not be expected, to replace valid data.
use tempdata
hotdeck y z, by(x) store
use imp1
list


How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California