Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nearest Neighbours method for categorical variables in multiple imputation

    I looked through the methods for mi but couldn't find any options for using a nearest-neighbours method (eg., knn) for categorical variables. The commonly used method uses pmm, but it applies to only continuous attributes. Is there any SSC package (or any manual but computationally efficient way) to use nearest neighbours. I am using MICE to impute multiple variables.

  • #2
    pmm can be used for categorical variables; here is an example sent to me by tech support when I inquired a while ago:
    Code:
    sysuse auto, clear
    mi set flong
    mi register imputed rep78 mi impute pmm rep78 = mpg trunk head,  knn(4) add(5)  
    forvalues i = 1(1)5{    
       tabulate  rep78 if _mi_m == `i'
    }
    if this simple example does not help, please provide more information

    Comment

    Working...
    X