Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65570

count and unique commands

$
0
0
Hello statalist users,

can anybody explain me the difference between the two commands ?
I tried both commands but the results are different

**with unique
Code:
unique  index if inrange(year,2004,2012)
Number of unique values of index is  282
Number of records is  1338
**with count
Code:
 count if inrange(year,2004,2012) & index!=index[_n+1]
  271
. count if inrange(year,2004,2012)
 1338
thank you


Viewing all articles
Browse latest Browse all 65570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>