tag:thongke.info.vn,2008:VIE-Portal-Press:753A5563BAC34F57B1A0D24C04F7A9A9Biến về ngày tháng và thời gian (Stata) :: Thống kêThống kêVIE Portal ATOM Engine2023-12-20T14:58:30Ztag:thongke.info.vn,2008:VIE-Portal-Press:609F0E9CBBDB49988B45A367BBEED8EAPhương pháp xử lý biến ngày tháng và tính toán thời gian trong Stata2012-07-05T16:16:36Z2012-06-28T16:42:07ZThống kê<span style="font-size: 12pt; background-color: white; font-family: Cambria, serif; line-height: 18px; ">Trong các nghiên cứu về tình trạng dinh dưỡng của trẻ em <5 tuổi. Chúng ta thường cần tính toán độ tuổi của trẻ theo ngày hoặc tháng để đánh giá được tình trạng dinh dưỡng một cách chính xác hơn. Có nhiều cách để ta có thể tính tuổi theo ngày, tháng, năm. Các cú pháp ta có thể sử dụng như sau:</span><div><b style="background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; "><br></span></b></div><div><b style="background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; ">Ví du:</span></b><i style="background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; "> Tính tuổi con thứ nhất của người được phỏng vấn.</span></i></div><div><b style="text-indent: 0in; background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; "><br></span></b></div><div><b style="text-indent: 0in; background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; ">a.<span style="font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; "> </span></span></b><b style="text-indent: 0in; background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; ">Tính tuổi (theo ngày)</span></b></div><div><b style="background-color: white; "><u><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; "><br></span></u></b></div><div><b style="background-color: white; "><u><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; ">Dofile:</span></u></b></div><div><i style="background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; "><br></span></i></div><div><i style="background-color: white; "><span style="font-size: 12pt; line-height: 18px; font-family: Cambria, serif; "><span class="Apple-tab-span" style="white-space: pre; "> </span>gen [tuổi_ngày]=[ngày hiện tại]-[ngày sinh]</span></i></div>