{"id":69,"date":"2023-07-22T09:18:55","date_gmt":"2023-07-22T09:18:55","guid":{"rendered":"https:\/\/ungdung.hotronghiencuu.com\/open\/?p=69"},"modified":"2023-07-22T16:18:55","modified_gmt":"2023-07-22T09:18:55","slug":"cac-lenh-trong-stata","status":"publish","type":"post","link":"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata","title":{"rendered":"C\u00e1c l\u1ec7nh trong Stata- Ch\u1ec9 vi\u1ec7c copy-paste x\u00e0i th\u00f4i"},"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-6b1390dac5d14\" 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-6b1390dac5d14\"><\/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-trong-stata\/#Stata_la_mot_phan_mem_phan_tich_du_lieu_va_thong_ke_pho_bien_trong_nghien_cuu_xa_hoi_co_the_dung_ca_lenh_va_giao_dien_do_hoa\" title=\"Stata l\u00e0 m\u1ed9t ph\u1ea7n m\u1ec1m ph\u00e2n t\u00edch d\u1eef li\u1ec7u v\u00e0 th\u1ed1ng k\u00ea ph\u1ed5 bi\u1ebfn trong nghi\u00ean c\u1ee9u x\u00e3 h\u1ed9i c\u00f3 th\u1ec3 d\u00f9ng c\u1ea3 l\u1ec7nh v\u00e0 giao di\u1ec7n \u0111\u1ed3 h\u1ecda\">Stata l\u00e0 m\u1ed9t ph\u1ea7n m\u1ec1m ph\u00e2n t\u00edch d\u1eef li\u1ec7u v\u00e0 th\u1ed1ng k\u00ea ph\u1ed5 bi\u1ebfn trong nghi\u00ean c\u1ee9u x\u00e3 h\u1ed9i c\u00f3 th\u1ec3 d\u00f9ng c\u1ea3 l\u1ec7nh v\u00e0 giao di\u1ec7n \u0111\u1ed3 h\u1ecda<\/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-trong-stata\/#Tao_bien_moichu_y_rang_trong_1_bo_so_lieubien_moi_chi_tao_duoc_tu_so_lieu_da_co\" title=\"T\u1ea1o bi\u1ebfn m\u1edbi(ch\u00fa \u00fd r\u1eb1ng trong 1 b\u1ed9 s\u1ed1 li\u1ec7u,bi\u1ebfn m\u1edbi ch\u1ec9 t\u1ea1o \u0111\u01b0\u1ee3c t\u1eeb s\u1ed1 li\u1ec7u \u0111\u00e3 c\u00f3)\">T\u1ea1o bi\u1ebfn m\u1edbi(ch\u00fa \u00fd r\u1eb1ng trong 1 b\u1ed9 s\u1ed1 li\u1ec7u,bi\u1ebfn m\u1edbi ch\u1ec9 t\u1ea1o \u0111\u01b0\u1ee3c t\u1eeb s\u1ed1 li\u1ec7u \u0111\u00e3 c\u00f3)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata\/#Mo_ta_so_lieu_bang_bang_trong_stata\" title=\"M\u00f4 t\u1ea3 s\u1ed1 li\u1ec7u b\u1eb1ng b\u1ea3ng trong stata\">M\u00f4 t\u1ea3 s\u1ed1 li\u1ec7u b\u1eb1ng b\u1ea3ng trong stata<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata\/#mo_ta_so_lieu_bang_hinh_ve_do_thi_trong_stata\" title=\"m\u00f4 t\u1ea3 s\u1ed1 li\u1ec7u b\u1eb1ng h\u00ecnh (v\u1ebd \u0111\u1ed3 th\u1ecb) trong stata\">m\u00f4 t\u1ea3 s\u1ed1 li\u1ec7u b\u1eb1ng h\u00ecnh (v\u1ebd \u0111\u1ed3 th\u1ecb) trong stata<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata\/#phan_tich_bien_dinh_luong\" title=\"ph\u00e2n t\u00edch bi\u1ebfn \u0111\u1ecbnh l\u01b0\u1ee3ng\">ph\u00e2n t\u00edch bi\u1ebfn \u0111\u1ecbnh l\u01b0\u1ee3ng<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata\/#phan_tich_thuc_nghiem_lam_sang\" title=\"ph\u00e2n t\u00edch th\u1ef1c nghi\u1ec7m l\u00e2m s\u00e0ng\">ph\u00e2n t\u00edch th\u1ef1c nghi\u1ec7m l\u00e2m s\u00e0ng<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata\/#phan_tich_nghien_cuu_benh_chung\" title=\"ph\u00e2n t\u00edch nghi\u00ean c\u1ee9u b\u1ec7nh ch\u1ee9ng\">ph\u00e2n t\u00edch nghi\u00ean c\u1ee9u b\u1ec7nh ch\u1ee9ng<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ungdung.hotronghiencuu.com\/open\/cac-lenh-trong-stata\/#hoi_qui_logistic\" title=\"h\u1ed3i qui logistic\">h\u1ed3i qui logistic<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Stata_la_mot_phan_mem_phan_tich_du_lieu_va_thong_ke_pho_bien_trong_nghien_cuu_xa_hoi_co_the_dung_ca_lenh_va_giao_dien_do_hoa\"><\/span>Stata l\u00e0 m\u1ed9t ph\u1ea7n m\u1ec1m ph\u00e2n t\u00edch d\u1eef li\u1ec7u v\u00e0 th\u1ed1ng k\u00ea ph\u1ed5 bi\u1ebfn trong nghi\u00ean c\u1ee9u x\u00e3 h\u1ed9i c\u00f3 th\u1ec3 d\u00f9ng c\u1ea3 l\u1ec7nh v\u00e0 giao di\u1ec7n \u0111\u1ed3 h\u1ecda<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>D\u01b0\u1edbi \u0111\u00e2y l\u00e0 m\u1ed9t s\u1ed1 l\u1ec7nh c\u01a1 b\u1ea3n trong Stata:<\/p>\n<ol>\n<li>\u0110\u1ecdc d\u1eef li\u1ec7u:\n<ul>\n<li><code>use filename<\/code>: \u0110\u1ecdc d\u1eef li\u1ec7u t\u1eeb t\u1eadp tin c\u00f3 t\u00ean &#8220;filename.dta&#8221;.<\/li>\n<li><code>import excel filename.xlsx, firstrow<\/code>: \u0110\u1ecdc d\u1eef li\u1ec7u t\u1eeb file Excel &#8220;filename.xlsx&#8221; v\u1edbi d\u00f2ng \u0111\u1ea7u ti\u00ean l\u00e0 d\u00f2ng ti\u00eau \u0111\u1ec1.<\/li>\n<\/ul>\n<\/li>\n<li>Hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u:\n<ul>\n<li><code>browse<\/code>: Xem d\u1eef li\u1ec7u trong m\u1ed9t c\u1eeda s\u1ed5 duy\u1ec7t.<\/li>\n<li><code>list<\/code>: Hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u trong c\u1eeda s\u1ed5 d\u00f2ng l\u1ec7nh.<\/li>\n<\/ul>\n<\/li>\n<li>Th\u1ed1ng k\u00ea m\u00f4 t\u1ea3:\n<ul>\n<li><code>summarize varname<\/code>: T\u00ednh c\u00e1c th\u1ed1ng k\u00ea m\u00f4 t\u1ea3 cho bi\u1ebfn &#8220;varname&#8221;.<\/li>\n<li><code>tabulate varname<\/code>: T\u1ea1o b\u1ea3ng t\u1ea7n s\u1ed1 cho bi\u1ebfn &#8220;varname&#8221;.<\/li>\n<\/ul>\n<\/li>\n<li>Ph\u00e2n t\u00edch h\u1ed3i quy:\n<ul>\n<li><code>regress dependent_var independent_vars<\/code>: Th\u1ef1c hi\u1ec7n m\u00f4 h\u00ecnh h\u1ed3i quy \u0111\u01a1n gi\u1ea3n.<\/li>\n<li><code>logit dependent_var independent_vars<\/code>: Th\u1ef1c hi\u1ec7n m\u00f4 h\u00ecnh h\u1ed3i quy logistic.<\/li>\n<\/ul>\n<\/li>\n<li>Ph\u00e2n t\u00edch bi\u1ebfn ph\u1ee5 thu\u1ed9c:\n<ul>\n<li><code>ttest varname<\/code>: Th\u1ef1c hi\u1ec7n ki\u1ec3m \u0111\u1ecbnh t-test cho bi\u1ebfn &#8220;varname&#8221;.<\/li>\n<li><code>anova varname1 varname2<\/code>: Th\u1ef1c hi\u1ec7n ph\u00e2n t\u00edch ph\u01b0\u01a1ng sai (ANOVA) cho hai bi\u1ebfn &#8220;varname1&#8221; v\u00e0 &#8220;varname2&#8221;.<\/li>\n<\/ul>\n<\/li>\n<li>T\u1ea1o v\u00e0 bi\u1ebfn \u0111\u1ed5i bi\u1ebfn:\n<ul>\n<li><code>generate newvar = expression<\/code>: T\u1ea1o bi\u1ebfn m\u1edbi &#8220;newvar&#8221; d\u1ef1a tr\u00ean bi\u1ec3u th\u1ee9c &#8220;expression&#8221;.<\/li>\n<li><code>replace varname = value if condition<\/code>: Thay \u0111\u1ed5i gi\u00e1 tr\u1ecb c\u1ee7a bi\u1ebfn &#8220;varname&#8221; theo \u0111i\u1ec1u ki\u1ec7n &#8220;condition&#8221;.<\/li>\n<\/ul>\n<\/li>\n<li>L\u01b0u v\u00e0 xu\u1ea5t d\u1eef li\u1ec7u:\n<ul>\n<li><code>save filename, replace<\/code>: L\u01b0u d\u1eef li\u1ec7u hi\u1ec7n t\u1ea1i v\u00e0o t\u1eadp tin c\u00f3 t\u00ean &#8220;filename.dta&#8221; (ghi \u0111\u00e8 t\u1eadp tin \u0111\u00e3 c\u00f3 n\u1ebfu c\u00f3).<\/li>\n<li><code>export excel filename.xlsx, sheet(name)<\/code>: Xu\u1ea5t d\u1eef li\u1ec7u hi\u1ec7n t\u1ea1i v\u00e0o file Excel &#8220;filename.xlsx&#8221; tr\u00ean sheet c\u00f3 t\u00ean &#8220;name&#8221;.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u0110\u00e2y ch\u1ec9 l\u00e0 m\u1ed9t s\u1ed1 l\u1ec7nh c\u01a1 b\u1ea3n trong Stata. Stata cung c\u1ea5p nhi\u1ec1u l\u1ec7nh kh\u00e1c cho c\u00e1c ph\u00e2n t\u00edch v\u00e0 th\u1ed1ng k\u00ea ph\u1ee9c t\u1ea1p h\u01a1n. B\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o t\u00e0i li\u1ec7u h\u01b0\u1edbng d\u1eabn Stata ho\u1eb7c tra c\u1ee9u tr\u1ef1c tuy\u1ebfn \u0111\u1ec3 t\u00ecm hi\u1ec3u th\u00eam v\u1ec1 c\u00e1c l\u1ec7nh v\u00e0 c\u00fa ph\u00e1p chi ti\u1ebft.<\/p>\n<p>M\u1ed8T S\u1ed0 L\u1ec6NH TRONG STATA (S\u01b0u t\u1ea7m)<\/p>\n<p>BS CKII NGUY\u1ec4N V \u0102N L\u01a0<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>\n<h2><span class=\"ez-toc-section\" id=\"Tao_bien_moichu_y_rang_trong_1_bo_so_lieubien_moi_chi_tao_duoc_tu_so_lieu_da_co\"><\/span>T\u1ea1o bi\u1ebfn m\u1edbi(ch\u00fa \u00fd r\u1eb1ng trong 1 b\u1ed9 s\u1ed1 li\u1ec7u,bi\u1ebfn m\u1edbi ch\u1ec9 t\u1ea1o \u0111\u01b0\u1ee3c t\u1eeb s\u1ed1 li\u1ec7u \u0111\u00e3 c\u00f3)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u1ea1o bi\u1ebfn m\u1edbi<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>:gen tenbien = gi\u00e1 tr\u1ecb c\u1ee7a bi\u1ebfn<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>: gen tenbienmoi = irecode(bienlientuc, \u0111i\u1ec3mchiakh\u1ecfang,.,.,) [ v\u00ed d\u1ee5 :gen nhomtuoi= irecode(tuoime,29,34,39) ]<\/li>\n<\/ol>\n<ul>\n<li>Recode \u201cbi\u1ebfn c\u0169\u201d(lu\u1eadt \u0111\u1ecbnh l\u1ea1i gi\u00e1 tr\u1ecb c\u1ee7a bi\u1ebfn m\u1edbi),gen (bi\u1ebfn m\u1edbi)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u1ea1o nh\u00e3n :label define tenbien tennhan<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>d\u00e1n nh\u00e3n cho bi\u1ebfn: label value tenbien tennhan<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>d\u00e1n nh\u00e3n v\u00e0o h\u1ed9p bi\u1ebfn s\u1ed1 tr\u00ean giao di\u1ec7n m\u00e0n h\u00ecnh stata: label var tenbien tennhan<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol start=\"2\">\n<li>\n<h2><span class=\"ez-toc-section\" id=\"Mo_ta_so_lieu_bang_bang_trong_stata\"><\/span>M\u00f4 t\u1ea3 s\u1ed1 li\u1ec7u b\u1eb1ng b\u1ea3ng trong stata<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>bi\u1ebfn \u0111\u1ecbnh t\u00ednh :tab1 <em>bi\u1ebfn\u0111\u1ecbnht\u00ednh<\/em><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>bi\u1ebfn \u0111\u1ecbnh l\u01b0\u1ee3ng: sum <em>bi\u1ebfn\u0111\u1ecbnhl\u01b0\u1ee3ng<\/em><\/li>\n<\/ol>\n<p><strong>ch\u00fa \u00fd r\u1eb1ng<\/strong> l\u1ec7nh sum <em>kh\u00f4ng c\u00f3 ch\u1ec9 \u0111\u1ecbnh g\u00ec ph\u00eda sau s\u1ebd m\u00f4 t\u1ea3 to\u00e0n b\u1ed9 b\u1ed9 s\u1ed1 li\u1ec7u gi\u00fap ki\u1ec3m tra t\u00ednh h\u1ee3p l\u00fd c\u1ee7a b\u1ed9 s\u1ed1 li\u1ec7u<\/em><\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>ph\u00e2n t\u1ea7ng theo nh\u00f3m :<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ul>\n<li>bysort <em>bi\u1ebfn\u0111\u1ecbnht\u00ednh<\/em>: sum <em>bi\u1ebfn\u0111\u1ecbnhl\u01b0\u1ee3ng<\/em><\/li>\n<li>bysort <em>bi\u1ebfn\u0111\u1ecbnht\u00ednh<\/em>: tab1 <em>bi\u1ebfn\u0111\u1ecbnht\u00ednh<\/em><\/li>\n<\/ul>\n<ol start=\"3\">\n<li>\n<h2><span class=\"ez-toc-section\" id=\"mo_ta_so_lieu_bang_hinh_ve_do_thi_trong_stata\"><\/span>m\u00f4 t\u1ea3 s\u1ed1 li\u1ec7u b\u1eb1ng h\u00ecnh (v\u1ebd \u0111\u1ed3 th\u1ecb) trong stata<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>ph\u00e2n t\u00e1n \u0111\u1ed3:<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>ng\u1eafn g\u1ecdn<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>twoway(scatter bienphuthuoc biendoclap) lfit (bienphuthuoc biendoclap)<\/p>\n<ol>\n<li>\u0111\u1ea7y \u0111\u1ee7<\/li>\n<\/ol>\n<p>twoway (scatter bienphuthuoc biendoclap) lfit (bienphuthuoc biendoclap), ytitle(tentructung<\/p>\n<p>(donvidoluong)) ylabel(gitrinhonhat(khoangcach)giatrilonnhat, angle(horizontal))<\/p>\n<p>xtitle(tentruchoanh (donvi)) xlabel(giatrinhonhat(khoangcach)giatrilonnhat, angle(vertical))<\/p>\n<p>title(t\u00ean c\u1ee7a ph\u00e2n t\u00e1n \u0111\u1ed3)<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>th\u00ed d\u1ee5<\/strong> v\u1ebd ph\u00e2n t\u00e1n \u0111\u1ed3 gi\u1eefa bi\u1ebfn tlsosinh v\u00e0 tuoithai trong t\u1eadp tin ivf_2.dta:<\/li>\n<\/ul>\n<p>twoway (scatter tlsosinh tuoithai) lfit (tlsosinh tuoithai), ytitle(trong luong so sinh (gram))<\/p>\n<p>ylabel(0(500)5000, angle(horizontal)) xtitle(tuoi thai (tuan)) xlabel(24(6)42, angle(vertical))<\/p>\n<p>&nbsp;<\/p>\n<p>title(moi tuong quan trong luong so sinh v\u00e0 tuoi thai)<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>th\u1ecb su\u1ea5t \u0111\u1ed3 : qnorm bi\u1ebfn\u0111\u1ecbnhl\u01b0\u1ee3ng<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u1ed5 ch\u1ee9c \u0111\u1ed3 : histogram bi\u1ebfn\u0111\u1ecbnhl\u01b0\u1ee3ng, normal<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>bi\u1ec3u \u0111\u1ed3 h\u00ecnh h\u1ed9p 2 nh\u00f3m: graph box bi\u1ebfn\u0111\u1ecbnhl\u01b0\u1ee3ng, over (bi\u1ebfn\u0111\u1ecbnht\u00ednh)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>bi\u1ec3u \u0111\u1ed3 h\u00ecnh thanh : graph bar (mean) bi\u1ebfn\u0111\u1ecbnhl\u01b0\u1ee3ng, over (bi\u1ebfn\u0111\u1ecbnht\u00ednh)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>bi\u1ec3u \u0111\u1ed3 h\u00ecnh b\u00e1nh: Graph pie, over (bi\u1ebfn\u0111\u1ecbnht\u00ednh)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol start=\"4\">\n<li>\n<h2><span class=\"ez-toc-section\" id=\"phan_tich_bien_dinh_luong\"><\/span>ph\u00e2n t\u00edch bi\u1ebfn \u0111\u1ecbnh l\u01b0\u1ee3ng<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>so s\u00e1nh ph\u01b0\u01a1ng sai : sdtest biensodinhluong ,by (biensodinhtinh)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>so s\u00e1nh trung b\u00ecnh c\u00f9ng ph\u01b0\u01a1ng sai : ttest biensodinhluong, by(biensodinhtinh)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>so s\u00e1nh trung b\u00ecnh kh\u00f4ng c\u00f9ng ph\u01b0\u01a1ng sai:<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ul>\n<li>ttest biensodinhluong, by(biensodinhtinh) unequal<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>ranksum biensodinhluong, by(biensodinhtinh)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol>\n<li>so s\u00e1nh trung b\u00ecnh c\u1ee7a bi\u1ebfn ph\u1ee5 thu\u1ed9c gi\u1eefa c\u00e1c nh\u00f3m trong bi\u1ebfn danh \u0111\u1ecbnh(=ki\u1ec3m \u0111\u1ecbnh anova m\u1ed9t chi\u1ec1u) : oneway bienphutthuoc biendanhdinh, scheffe tab [th\u00ed d\u1ee5 so s\u00e1nh trong l\u01b0\u1ee3ng s\u01a1 sinh v\u1edbi c\u00e1c nh\u00f3m trong bi\u1ebfn ngh\u1ec1 nghi\u1ec7p : oneway tlsosinh nghenghiep, scheffe tab]<\/li>\n<li>t\u00ednh h\u1ec7 s\u1ed1 t\u01b0\u01a1ng quan R : pwcorr bienphuthuoc biendoclap1 biendoclap2\u2026, sig<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>ph\u01b0\u01a1ng tr\u00ecnh h\u1ed3i qui \u0111\u01a1n bi\u1ebfn: regress bienphuhuoc biendoclap<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>ph\u01b0\u01a1ng tr\u00ecnh h\u1ed3i qui nhi\u1ec1u bi\u1ebfn: regress bienphuthuoc biendoclap1 biendoclap2 biendoclap3\u2026<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>ki\u1ec3m \u0111\u1ecbnh anova hai chi\u1ec1u<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>b\u1ea3ng th\u1ed1ng k\u00ea 2 chi\u1ec1u theo bi\u1ebfn \u0111\u1ed9c l\u1eadp:<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>table biendoclap1 biendoclap2, contents( mean error sd error ) row col<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>b\u1ea3ng ph\u00e2n t\u00edch anova:<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>anova biensophuthuoc biendoclap1 biendoclap2 biendoclap1*biendoclap2, partial<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"5\">\n<li>\n<h2><span class=\"ez-toc-section\" id=\"phan_tich_thuc_nghiem_lam_sang\"><\/span>ph\u00e2n t\u00edch th\u1ef1c nghi\u1ec7m l\u00e2m s\u00e0ng<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>(t\u1eadp tin banghuyetss miso.dta . bienphannhom=can thi\u1ec7p v\u00e0 kh\u00f4ng can thi\u00eap= nhanhct; biensoketcuoc=h\u1eadu qu\u1ea3= maumat,bhss,bhssnang. )<\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li>m\u00f4 t\u1ea3 bi\u1ebfn s\u1ed1 ph\u00e2n nh\u00f3m v\u00e0 bi\u1ebfn s\u1ed1 k\u1ebft cu\u1ed9c tab1 biensophannhom biensoketcuoc<\/li>\n<li>so s\u00e1nh t\u1ec9 l\u1ec7 k\u1ebft cu\u1ed9c \u1edf 2 nh\u00f3m<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>tab biensoketcuoc biensophannhom, chi col<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u00ednh nguy c\u01a1 t\u01b0\u01a1ng \u0111\u1ed1i (RR)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>cs biensoketcuoc biensophannhom<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u00ednh nguy c\u01a1 t\u01b0\u01a1ng \u0111\u1ed1i(RR) c\u00f3 hi\u1ec7u ch\u1ec9nh (khi c\u00f3 \u00f4 c\u00f3 t\u1ea7n su\u1ea5t th\u1ea5p &lt;10,ho\u1eb7c v\u1ecdng tr\u1ecb &lt;5) cs biensoketcuoc biensophannhom, exact<\/li>\n<li>so s\u00e1nh bi\u1ebfn \u0111\u1ecbnh l\u01b0\u1ee3ng(k\u1ebft cu\u1ed9c) gi\u1eefa 2 nh\u00f3m (can thi\u1ec7p v\u00e0 kh\u00f4ng can thi\u1ec7p)b\u1eb1ng bi\u1ec3u \u0111\u1ed3 graph box biensoketcuoc, over(biensophannhom)<\/li>\n<li>so s\u00e1nh bi\u1ebfn \u0111\u1ecbnh l\u01b0\u1ee3ng (bi\u1ebfn k\u1ebft cu\u1ed9c) gi\u1eefa 2 nh\u00f3m (can thi\u1ec7p v\u00e0 kh\u00f4ng can thi\u1ec7p)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u1ea1o bi\u1ebfn s\u1ed1 m\u1edbi<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>gen lnbiensoketcuoc= ln (biensoketcuoc)<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>so s\u00e1nh 2 ph\u01b0\u01a1ng sai<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>sdtest lnbiensoketcuoc, by (biensophannhom)<\/p>\n<p>&nbsp;<\/p>\n<p>iii.\u00a0 so s\u00e1nh 2 trung b\u00ecnh<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>ph\u01b0\u01a1ng sai \u0111\u1ed3ng nh\u1ea5t : ttest lnbiensoketcuoc, by (biensophannhom)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>ph\u01b0\u01a1ng sai kh\u00f4ng \u0111\u1ed3ng nh\u1ea5t: ttest lnbiensoketcuoc, by (biensophannhom) unequal<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol start=\"6\">\n<li>\n<h2><span class=\"ez-toc-section\" id=\"phan_tich_nghien_cuu_benh_chung\"><\/span>ph\u00e2n t\u00edch nghi\u00ean c\u1ee9u b\u1ec7nh ch\u1ee9ng<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>bi\u1ebfn s\u1ed1 ph\u1ee5 thu\u1ed9c trong nghi\u00ean c\u1ee9u b\u1ec7nh-ch\u1ee9ng \u0111\u01b0\u1ee3c \u0111\u1eb7t t\u00ean l\u00e0 caco,y\u1ebfu t\u1ed1 nghi ng\u1edd g\u1ecdi l\u00e0 bi\u1ebfn s\u1ed1 \u0111\u1ed9c l\u1eadp,c\u00e1c y\u1ebfu \u1ea3nh h\u01b0\u1edfng kh\u00e1c g\u1ecdi l\u00e0 y\u1ebfu t\u1ed1 t\u01b0\u01a1ng t\u00e1c ho\u1eb7c g\u00e2y nhi\u1ec5u<\/li>\n<li>b\u1ea3ng m\u00f4 t\u1ea3 t\u1ec9 l\u1ec7 ph\u00e2n ph\u1ed1i c\u1ee7a y\u1ebfu t\u1ed1 nghi ng\u1edd theo nh\u00f3m b\u1ec7nh v\u00e0 nh\u00f3m ch\u1ee9ng: tab caco biendoclap, row chi<\/li>\n<li>tinh OR th\u00f4 (ch\u01b0a kh\u1eed nhi\u1ec5u)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ul>\n<li>caco biendoclap<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u00ednh OR ph\u00e2n t\u1ea7ng<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ul>\n<li>caco biendoclap, by(bi\u1ebfn s\u1ed1 danh \u0111\u1ecbnh hay th\u1ee9 t\u1ef1)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol>\n<li>C\u01a1 s\u1edf xem x\u00e9t bi\u1ebfn s\u1ed1 c\u00f3 ph\u1ea3i g\u00e2y nhi\u1ec5u hay t\u01b0\u01a1ng t\u00e1c hay kh\u00f4ng cc caco biendoclap, by (bi\u1ebfn s\u1ed1 c\u1ea7n xem x\u00e9t)<\/li>\n<li>kh\u1eed nhi\u1ec5u<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>c \u00f3 2 bi\u1ebfn g\u00e2y nhi\u1ec5u a v\u00e0 b mhodds caco biendoclap a b<\/li>\n<li>c \u00f3 2 bi\u1ebfn g\u00e2y nhi\u1ec5u a v\u00e0 b,chia theo t\u1ea7ng mhodds caco biendoclap, by(a b)<\/li>\n<\/ol>\n<ol start=\"7\">\n<li>\n<h2><span class=\"ez-toc-section\" id=\"hoi_qui_logistic\"><\/span>h\u1ed3i qui logistic<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u00ednh OR th\u00f4 (ch\u01b0a kh\u1eed nhi\u1ec5u)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>logistic caco biendoclap<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>x\u00e1c \u0111\u1ecbnh ph\u01b0\u01a1ng tr\u00ecnh h\u1ed3i qui gi\u1eefa bi\u1ebfn s\u1ed1 ph\u1ee5 thu\u1ed9c v\u00e0 bi\u1ebfn \u0111\u1ed9c l\u1eadp (t\u00ednh h\u1ec7 s\u1ed1 v\u00e0 h\u1eb1ng s\u1ed1 c\u1ee7a ph\u01b0\u01a1ng tr\u00ecnh h\u1ed3i qui)<\/li>\n<\/ol>\n<p>logit caco biensodoclap<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>m\u00f4 h\u00ecnh khuynh h\u01b0\u1edbng<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>logistic caco \u201cbi\u1ebfn s\u1ed1 khuynh h\u01b0\u1edbng\u201d<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>m\u00f4 h\u00ecnh ph\u00e2n lo\u1ea1i<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>xi :logit caco i.\u201cbi\u1ebfn s\u1ed1 ph\u00e2n lo\u1ea1i\u201d<\/p>\n<p>&nbsp;<\/p>\n<p>logistic caco i.\u201cbi\u1ebfn ph\u00e2n lo\u1ea1i\u201d (l\u1ec7nh n\u00e0y d\u00f9ng \u1edf stata12,stata10 kh\u00f4ng d\u00f9ng \u0111\u01b0\u1ee3c)<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>so s\u00e1nh 2 m\u00f4 h\u00ecnh<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>lrtest \u201cbi\u1ebfn s\u1ed1 khuynh h\u01b0\u1edbng\u201d \u201cbi\u1ebfn s\u1ed1 ph\u00e2n lo\u1ea1i\u201d<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>t\u00ednh OR c\u00f3 kh\u1eed y\u1ebfu t\u1ed1 g\u00e2y nhi\u1ec5u logistic caco biendoclap biensogaynhieu<\/li>\n<li>t\u00ednh OR c\u00f3 hi\u1ec7u ch\u1ec9nh t\u1ea5t c\u1ea3 c\u00e1c bi\u1ebfn<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>logistic caco biendoclap (vi\u1ebft t\u1ea5t c\u1ea3 c\u00e1c bi\u1ebfn tr\u00ean d\u00f2ng l\u1ec7nh,m\u1ed7i bi\u1ebfn c\u00e1ch nhau m\u1ed9t d\u1ea5u c\u00e1ch)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stata l\u00e0 m\u1ed9t ph\u1ea7n m\u1ec1m ph\u00e2n t\u00edch d\u1eef li\u1ec7u v\u00e0 th\u1ed1ng k\u00ea ph\u1ed5 bi\u1ebfn trong nghi\u00ean c\u1ee9u x\u00e3 h\u1ed9i c\u00f3 th\u1ec3 d\u00f9ng c\u1ea3 l\u1ec7nh v\u00e0 giao di\u1ec7n&#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,4],"tags":[8],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-phan-mem","category-kham-pha","tag-stata"],"_links":{"self":[{"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts\/69","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=69"}],"version-history":[{"count":4,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":25477,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/posts\/69\/revisions\/25477"}],"wp:attachment":[{"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ungdung.hotronghiencuu.com\/open\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}