{"id":89,"date":"2023-07-22T10:18:30","date_gmt":"2023-07-22T10:18:30","guid":{"rendered":"https:\/\/ungdung.hotronghiencuu.com\/open\/?p=89"},"modified":"2023-07-22T17:18:30","modified_gmt":"2023-07-22T10:18:30","slug":"cac-lenh-tren-stata-phan-3","status":"publish","type":"post","link":"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-tren-stata-phan-3","title":{"rendered":"C\u00e1c l\u1ec7nh tr\u00ean Stata- Ph\u1ea7n 3: Th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 v\u00e0 v\u1ebd \u0111\u1ed3 th\u1ecb"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_40 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" area-label=\"ez-toc-toggle-icon-1\"><label for=\"item-6acf65cc35cfd\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;direction:ltr;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><input  type=\"checkbox\" id=\"item-6acf65cc35cfd\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-tren-stata-phan-3\/#Lenh_thong_ke_mo_ta_trong_Stata\" title=\"L\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 trong Stata\">L\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 trong Stata<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-tren-stata-phan-3\/#Lenh_ve_do_thi_trong_Stata\" title=\"L\u1ec7nh v\u1ebd \u0111\u1ed3 th\u1ecb trong Stata\">L\u1ec7nh v\u1ebd \u0111\u1ed3 th\u1ecb trong Stata<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Lenh_thong_ke_mo_ta_trong_Stata\"><\/span>L\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 trong Stata<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"flex flex-grow flex-col gap-3\">\n<div class=\"min-h-[20px] flex flex-col items-start gap-4 whitespace-pre-wrap break-words\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>Trong Stata, c\u00f3 m\u1ed9t s\u1ed1 l\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 ph\u1ed5 bi\u1ebfn \u0111\u1ec3 t\u1ed5ng h\u1ee3p v\u00e0 m\u00f4 t\u1ea3 d\u1eef li\u1ec7u. D\u01b0\u1edbi \u0111\u00e2y l\u00e0 m\u1ed9t s\u1ed1 l\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 trong Stata:<\/p>\n<ol>\n<li>L\u1ec7nh &#8220;summarize&#8221;: L\u1ec7nh n\u00e0y t\u00ednh c\u00e1c th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 c\u01a1 b\u1ea3n nh\u01b0 s\u1ed1 quan s\u00e1t, trung b\u00ecnh, \u0111\u1ed9 l\u1ec7ch chu\u1ea9n, gi\u00e1 tr\u1ecb nh\u1ecf nh\u1ea5t, gi\u00e1 tr\u1ecb l\u1edbn nh\u1ea5t v\u00e0 c\u00e1c ph\u1ea7n v\u1ecb (percentiles).V\u00ed d\u1ee5: <code>summarize varname<\/code><\/li>\n<li>L\u1ec7nh &#8220;tabulate&#8221;: L\u1ec7nh n\u00e0y t\u00ednh to\u00e1n b\u1ea3ng t\u1ea7n s\u1ed1 (frequency table) cho bi\u1ebfn \u0111\u1ecbnh t\u00ednh v\u00e0 t\u00ednh to\u00e1n b\u1ea3ng ch\u00e9o (cross-tabulation) cho hai bi\u1ebfn \u0111\u1ecbnh t\u00ednh.V\u00ed d\u1ee5: <code>tabulate varname<\/code><\/li>\n<li>L\u1ec7nh &#8220;tabulate&#8221; v\u1edbi t\u00f9y ch\u1ecdn &#8220;summary&#8221;: L\u1ec7nh n\u00e0y t\u00ednh to\u00e1n c\u00e1c th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 c\u01a1 b\u1ea3n cho bi\u1ebfn \u0111\u1ecbnh t\u00ednh.V\u00ed d\u1ee5: <code>tabulate varname, summary<\/code><\/li>\n<li>L\u1ec7nh &#8220;codebook&#8221;: L\u1ec7nh n\u00e0y cung c\u1ea5p th\u00f4ng tin v\u1ec1 bi\u1ebfn, bao g\u1ed3m t\u00ean bi\u1ebfn, lo\u1ea1i bi\u1ebfn, nh\u00e3n bi\u1ebfn v\u00e0 c\u00e1c gi\u00e1 tr\u1ecb c\u00f3 th\u1ec3 c\u1ee7a bi\u1ebfn.V\u00ed d\u1ee5: <code>codebook varname<\/code><\/li>\n<li>L\u1ec7nh &#8220;histogram&#8221;: L\u1ec7nh n\u00e0y t\u1ea1o bi\u1ec3u \u0111\u1ed3 histogram cho bi\u1ebfn li\u00ean t\u1ee5c, hi\u1ec3n th\u1ecb ph\u00e2n ph\u1ed1i t\u1ea7n su\u1ea5t c\u1ee7a d\u1eef li\u1ec7u.V\u00ed d\u1ee5: <code>histogram varname<\/code><\/li>\n<li>L\u1ec7nh &#8220;graph summarize&#8221;: L\u1ec7nh n\u00e0y t\u1ea1o bi\u1ec3u \u0111\u1ed3 d\u1ea1ng c\u00e2y (stem-and-leaf plot) cho bi\u1ebfn li\u00ean t\u1ee5c, hi\u1ec3n th\u1ecb ph\u00e2n ph\u1ed1i c\u1ee7a d\u1eef li\u1ec7u v\u00e0 c\u00e1c gi\u00e1 tr\u1ecb c\u1ee7a bi\u1ebfn.V\u00ed d\u1ee5: <code>graph summarize varname<\/code><\/li>\n<li>L\u1ec7nh &#8220;tabstat&#8221;: L\u1ec7nh n\u00e0y t\u00ednh to\u00e1n c\u00e1c th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 cho bi\u1ebfn, bao g\u1ed3m trung b\u00ecnh, \u0111\u1ed9 l\u1ec7ch chu\u1ea9n, gi\u00e1 tr\u1ecb nh\u1ecf nh\u1ea5t, gi\u00e1 tr\u1ecb l\u1edbn nh\u1ea5t v\u00e0 c\u00e1c ph\u1ea7n v\u1ecb (percentiles).V\u00ed d\u1ee5: <code>tabstat varname<\/code><\/li>\n<\/ol>\n<p>L\u01b0u \u00fd r\u1eb1ng \u0111\u1ed1i v\u1edbi m\u1ed7i l\u1ec7nh, b\u1ea1n c\u1ea7n thay th\u1ebf &#8220;varname&#8221; b\u1eb1ng t\u00ean bi\u1ebfn th\u1ef1c t\u1ebf trong d\u1eef li\u1ec7u c\u1ee7a b\u1ea1n. Ngo\u00e0i ra, Stata cung c\u1ea5p nhi\u1ec1u l\u1ec7nh kh\u00e1c \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 v\u00e0 kh\u00e1m ph\u00e1 d\u1eef li\u1ec7u. B\u1ea1n c\u00f3 th\u1ec3 t\u00ecm hi\u1ec3u th\u00eam v\u1ec1 c\u00e1c l\u1ec7nh n\u00e0y trong t\u00e0i li\u1ec7u h\u01b0\u1edbng d\u1eabn c\u1ee7a Stata ho\u1eb7c s\u1eed d\u1ee5ng c\u00e2u l\u1ec7nh <code>help<\/code> k\u00e8m theo t\u00ean l\u1ec7nh \u0111\u1ec3 xem th\u00f4ng tin chi ti\u1ebft v\u1ec1 c\u00fa ph\u00e1p v\u00e0 t\u00f9y ch\u1ecdn c\u1ee7a t\u1eebng l\u1ec7nh.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>Xem th\u00eam: <a href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-tren-stata-phan-2\" rel=\"bookmark\">C\u00e1c l\u1ec7nh tr\u00ean Stata- Ph\u1ea7n 2: H\u1ed3i quy d\u1eef li\u1ec7u b\u1ea3ng<\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Lenh_ve_do_thi_trong_Stata\"><\/span>L\u1ec7nh v\u1ebd \u0111\u1ed3 th\u1ecb trong Stata<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"flex flex-grow flex-col gap-3\">\n<div class=\"min-h-[20px] flex flex-col items-start gap-4 whitespace-pre-wrap break-words\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>Trong Stata, c\u00f3 nhi\u1ec1u l\u1ec7nh \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb v\u00e0 tr\u1ef1c quan h\u00f3a d\u1eef li\u1ec7u. D\u01b0\u1edbi \u0111\u00e2y l\u00e0 m\u1ed9t s\u1ed1 l\u1ec7nh ph\u1ed5 bi\u1ebfn \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb trong Stata:<\/p>\n<ol>\n<li>L\u1ec7nh &#8220;graph twoway&#8221;: L\u1ec7nh n\u00e0y cho ph\u00e9p v\u1ebd \u0111\u1ed3 th\u1ecb hai chi\u1ec1u v\u1edbi nhi\u1ec1u lo\u1ea1i \u0111\u1ed3 th\u1ecb nh\u01b0 \u0111\u01b0\u1eddng cong, c\u1ed9t, \u0111i\u1ec3m, v.v. B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u00e1c t\u00f9y ch\u1ecdn \u0111\u1ec3 t\u00f9y ch\u1ec9nh \u0111\u1ed3 th\u1ecb theo \u00fd mu\u1ed1n.V\u00ed d\u1ee5: <code>graph twoway scatter yvar xvar<\/code> (v\u1ebd \u0111\u1ed3 th\u1ecb scatter plot)<\/li>\n<li>L\u1ec7nh &#8220;histogram&#8221;: L\u1ec7nh n\u00e0y \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb histogram, hi\u1ec3n th\u1ecb ph\u00e2n ph\u1ed1i t\u1ea7n su\u1ea5t c\u1ee7a d\u1eef li\u1ec7u li\u00ean t\u1ee5c.V\u00ed d\u1ee5: <code>histogram varname<\/code> (v\u1ebd histogram cho bi\u1ebfn)<\/li>\n<li>L\u1ec7nh &#8220;bar&#8221;: L\u1ec7nh n\u00e0y \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb bar chart, hi\u1ec3n th\u1ecb t\u1ea7n su\u1ea5t ho\u1eb7c gi\u00e1 tr\u1ecb trung b\u00ecnh c\u1ee7a bi\u1ebfn \u0111\u1ecbnh t\u00ednh.V\u00ed d\u1ee5: <code>bar varname<\/code> (v\u1ebd bar chart cho bi\u1ebfn)<\/li>\n<li>L\u1ec7nh &#8220;line&#8221;: L\u1ec7nh n\u00e0y \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb line chart, hi\u1ec3n th\u1ecb xu h\u01b0\u1edbng ho\u1eb7c bi\u1ec3u \u0111\u1ed3 \u0111\u01b0\u1eddng cong.V\u00ed d\u1ee5: <code>line yvar xvar<\/code> (v\u1ebd line chart)<\/li>\n<li>L\u1ec7nh &#8220;scatter&#8221;: L\u1ec7nh n\u00e0y \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb scatter plot, hi\u1ec3n th\u1ecb m\u1ed1i quan h\u1ec7 gi\u1eefa hai bi\u1ebfn li\u00ean t\u1ee5c.V\u00ed d\u1ee5: <code>scatter yvar xvar<\/code> (v\u1ebd scatter plot)<\/li>\n<li>L\u1ec7nh &#8220;boxplot&#8221;: L\u1ec7nh n\u00e0y \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 v\u1ebd \u0111\u1ed3 th\u1ecb box plot, hi\u1ec3n th\u1ecb ph\u00e2n ph\u1ed1i v\u00e0 gi\u00e1 tr\u1ecb ngo\u1ea1i l\u1ec7 c\u1ee7a bi\u1ebfn.V\u00ed d\u1ee5: <code>boxplot varname<\/code> (v\u1ebd box plot cho bi\u1ebfn)<\/li>\n<li>L\u1ec7nh &#8220;graph matrix&#8221;: L\u1ec7nh n\u00e0y cho ph\u00e9p v\u1ebd nhi\u1ec1u \u0111\u1ed3 th\u1ecb trong m\u1ed9t ma tr\u1eadn, r\u1ea5t h\u1eefu \u00edch khi so s\u00e1nh v\u00e0 ki\u1ec3m tra nhi\u1ec1u bi\u1ebfn c\u00f9ng m\u1ed9t l\u00fac.V\u00ed d\u1ee5: <code>graph matrix varlist<\/code> (v\u1ebd ma tr\u1eadn \u0111\u1ed3 th\u1ecb)<\/li>\n<\/ol>\n<p>L\u01b0u \u00fd r\u1eb1ng \u0111\u1ed1i v\u1edbi m\u1ed7i l\u1ec7nh, b\u1ea1n c\u1ea7n thay th\u1ebf &#8220;varname&#8221; b\u1eb1ng t\u00ean bi\u1ebfn th\u1ef1c t\u1ebf trong d\u1eef li\u1ec7u c\u1ee7a b\u1ea1n. B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 t\u00f9y ch\u1ec9nh c\u00e1c l\u1ec7nh n\u00e0y b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng t\u00f9y ch\u1ecdn v\u00e0 \u0111\u1eb7t gi\u00e1 tr\u1ecb th\u00edch h\u1ee3p cho t\u1eebng l\u1ec7nh.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>L\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 trong Stata Trong Stata, c\u00f3 m\u1ed9t s\u1ed1 l\u1ec7nh th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 ph\u1ed5 bi\u1ebfn \u0111\u1ec3 t\u1ed5ng h\u1ee3p v\u00e0 m\u00f4 t\u1ea3 d\u1eef li\u1ec7u&#8230;. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[8],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-phan-mem","category-su-dung-phan-mem","tag-stata"],"_links":{"self":[{"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":3,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts\/89\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}