January 26

Stata: 如何計算不重複值的筆數

0  comments

Stata 有很多強大的功能,不過卻沒有一個比較簡單的指令可以直接計算不重複值的方法。

不過在這個網站,指出了三種計算不重複筆數的方法,非常強大!

參考資源:http://statadaily.wordpress.com/2010/10/01/ways-to-count-the-number-of-unique-values-in-a-variable/

方法一

tab varname, nofreq
display r(r)

方法二

inspect varlist
display r(N_unique)

方法三

codebook varlist

這三種方法都非常簡單易用,提供給大家作參考!


Tags


You may also like

21本與高教課程研究的相關期刊

Grammarly 支援Mac Word!

Leave a Reply

Your email address will not be published. Required fields are marked

This site uses Akismet to reduce spam. Learn how your comment data is processed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get in touch

Name*
Email*
Message
0 of 350