. clear
. sysuse auto,clear
(1978 Automobile Data)
. keep make price mpg rep78 foreign
. expand 2 in 1/2
(2 observations created)
. duplicates report
Duplicates in terms of all variables
--------------------------------------
copies | observations surplus
----------+---------------------------
1 | 72 0
2 | 4 2
--------------------------------------
. duplicates list
Duplicates in terms of all variables
+--------------------------------------------------------------+
| group: obs: make price mpg rep78 foreign |
|--------------------------------------------------------------|
| 1 1 AMC Concord 4,099 22 3 Domestic |
| 1 75 AMC Concord 4,099 22 3 Domestic |
| 2 2 AMC Pacer 4,749 17 3 Domestic |
| 2 76 AMC Pacer 4,749 17 3 Domestic |
+--------------------------------------------------------------+
. duplicates drop make price,force
Duplicates in terms of make price
(2 observations deleted)
. duplicates drop make price,force
Duplicates in terms of make price
(0 observations are duplicates)
. duplicates list
Duplicates in terms of all variables
(0 observations are duplicates)
命令都没有问题啊
|