{"id":261327,"date":"2015-07-13T19:59:02","date_gmt":"2015-07-13T15:59:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=261327"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=261327","title":{"rendered":"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043e\u043f\u0440\u043e\u0441\u043e\u0432"},"content":{"rendered":"<p>     \t\u0412 <a href=\"http:\/\/habrahabr.ru\/post\/258789\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0432\u0440\u043e\u043f\u0435\u0439\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043e\u043f\u0440\u043e\u0441\u0430. \u041d\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c? \u0418 \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b? \u041e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0432 \u044d\u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d9c\/c11\/20a\/d9cc1120a2c944fc91d582bf63259080.jpg\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0440\u0430\u0442\u043a\u043e \u043e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430 \u2014 \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u0420\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u044b, \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0433\u0435\u043d\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438 \u0431\u0435\u0437 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443. \u041f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u044e \u0434\u0435\u043b\u044f\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u0442\u044b \u0438 \u0434\u043b\u044f \u0443\u0434\u0435\u0448\u0435\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u043e\u0441\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043c\u0435\u0449\u0435\u043d\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438 (\u043f\u043e\u043b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b, &#8230;), \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u0430\u043c, \u043f\u0440\u0438\u043d\u044f\u0432\u0448\u0438\u043c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438, \u043f\u0440\u0438\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0432\u0435\u0441\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0410. \u0427\u0443\u0440\u0438\u043a\u043e\u0432\u0430 [1].<\/p>\n<p>  \u0412\u044b\u0431\u043e\u0440\u043a\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0440\u0430\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432\u0437\u0432\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0440\u0443\u0448\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b i.i.d., \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438\u0437-\u0437\u0430 \u0432\u043d\u0443\u0442\u0440\u0438\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d.<br \/>  \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043e\u0442 \u00ab\u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445\u00bb \u0444\u043e\u0440\u043c\u0443\u043b \u2014 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e. \u041f\u0443\u0441\u0442\u044c <i>x<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043b\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u0440\u043e\u0441\u0430 \u0441 \u0432\u0435\u0441\u043e\u043c <i>w<\/i>. \u0422\u043e\u0433\u0434\u0430 <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/265\/a82\/11b\/265a8211b8542bd786ad76a39bac04b6.png\" alt=\"image\"\/><\/div>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <i>u\/v<\/i> \u043b\u0438\u0430\u043d\u0435\u0440\u0438\u0437\u0443\u044e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u044f\u0434\u0430 \u0422\u0435\u0439\u043b\u043e\u0440\u0430 (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u043e \u0447\u043b\u0435\u043d\u043e\u0432 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430) \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u043b\u0435\u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u0440\u044f\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439, \u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0413\u043b\u0430\u0432\u0435 3, \u043a\u043d\u0438\u0433\u0438 [2]. <\/p>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 R \u0435\u0441\u0442\u044c <a href=\"http:\/\/cran.r-project.org\/web\/packages\/survey\/index.html\">\u043f\u0430\u043a\u0435\u0442 survey<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u043e\u0432. \u0410\u0432\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 T. Lumley \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043d\u0438\u0433\u0438 [3]. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u041f\u041e \u2014 SAS, Stata, SUDAAN, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f [4]. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, <a href=\"http:\/\/www.isr.umich.edu\/src\/smp\/asda\/\">\u043d\u0430 web \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043a\u043d\u0438\u0433\u0438 [2]<\/a>, \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u043a\u043e\u0434 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0434\u043b\u044f R. <\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u044b\u0445 ESS \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u044b \u0435\u0441\u0442\u044c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0441\u0442\u0440\u0430\u0442\u0430\u0445 (stratify), \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445 (psu \u2014 primary sample unit) \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u043e\u0432 (prob). \u0412\u0435\u0441, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a, \u0434\u043b\u044f \u0420\u043e\u0441\u0441\u0438\u0438 \u0441\u0442\u0440\u0430\u0442\u044b \u2014 \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0433\u0430, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u2014 \u0440\u044f\u0434 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0438 \u0440\u0430\u0439\u043e\u043d\u043e\u0432 \u0432 \u044d\u0442\u0438\u0445 \u043e\u043a\u0440\u0443\u0433\u0430\u0445. \u0414\u0435\u0442\u0430\u043b\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 ESS \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f <a href=\"http:\/\/www.europeansocialsurvey.org\/docs\/round6\/methods\/ESS6_sampling_guidelines.pdf\">\u0432 \u044d\u0442\u043e\u043c pdf<\/a>, \u0432\u0437\u044f\u0442\u043e\u043c \u0441 \u0441\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <b>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438.<\/b><br \/>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/f0b\/487\/66d\/f0b48766de7c43f480bd78075d002817.png\"\/><\/div>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0437\u0434\u0435\u0441\u044c Antecedent \u2014 \u043b\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <i>X -&gt; Y<\/i>, \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u044b <br \/>   \u2014 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b \u0441 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u044b \u0436\u0438\u0437\u043d\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u043b\u0443\u0447\u0448\u0435<br \/>  \u0438 <br \/>   \u2014 \u043d\u0435 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0441\u0435\u0431\u044f \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0430\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0431\u043e\u0433\u0430\u0442\u044b\u043c, \u0438\u043c\u0435\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043d\u0435\u0433 \u0438 \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438.<\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0434\u043b\u044f \u0434\u043e\u043b\u0435\u0439 <i>X<\/i> \u0432\u043e \u0432\u0441\u0435\u0445 \u0442\u0440\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0430\u0445 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <i>X<\/i> \u0432\u043e \u0424\u0440\u0430\u043d\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <i>X<\/i> \u0432 \u0414\u0430\u043d\u0438\u0438 \u0438 \u0420\u043e\u0441\u0441\u0438\u0438.<\/p>\n<p>  <b>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432 R \u0434\u0430\u043d\u043d\u044b\u0435 ESS 6 \u0432\u043e\u043b\u043d\u044b (\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f 2.1) \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u043e\u043f\u0440\u043e\u0441\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\u0414\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f, \u043d\u043e \u0434\u043b\u044f \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c <a href=\"http:\/\/www.europeansocialsurvey.org\/download.html?file=ESS6e02_1&amp;y=2012\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a> stata \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e R.  <\/p>\n<pre><code class=\"lisp\">library(foreign) # to read data library(data.table) # to manipulate data  srv.data &lt;- read.dta(&quot;ESS6e02_1.dta&quot;) srv.variables &lt;- data.table(name = names(srv.data), title = attr(srv.data, &quot;var.labels&quot;)) srv.data &lt;- data.table(srv.data) setkey(srv.data, cntry)  setkey(srv.variables, name) <\/code><\/pre>\n<p>  #<a href=\"http:\/\/www.europeansocialsurvey.org\/download.html?file=ESS6_DK_SDDF&amp;c=DK&amp;y=2012\">Danish survey design data<\/a>  <\/p>\n<pre><code class=\"lisp\">dk.dt &lt;- data.table(read.dta(&quot;ESS6_DK_SDDF.dta&quot;)) dk.dt &lt;- dk.dt[cntry!=&quot;NA&quot;,]  # sic! this base contains extra records with NA data    dk.dt[,stratify:=&quot;dk&quot;]  # dk sample is simple random sample dk.dt[,psu:=seq(3300,length.out = nrow(dk.dt))] #to avoid duplication with psu numbers of the fr data <\/code><\/pre>\n<p>  # <a href=\"http:\/\/www.europeansocialsurvey.org\/download.html?file=ESS6_FR_SDDF&amp;c=FR&amp;y=2012\">French survey design data<\/a>  <\/p>\n<pre><code class=\"lisp\">fr.dt &lt;- data.table(read.dta(&quot;ESS6_FR_SDDF.dta&quot;)) <\/code><\/pre>\n<p>  #<a href=\"http:\/\/www.europeansocialsurvey.org\/download.html?file=ESS6_RU_SDDF&amp;c=RU&amp;y=2012\">Russian survey design data<\/a>  <\/p>\n<pre><code class=\"lisp\">ru.dt &lt;- data.table(read.dta(&quot;ESS6_RU_SDDF.dta&quot;)) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f X<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lisp\">countries.set &lt;- c(&quot;FR&quot;, &quot;DK&quot;, &quot;RU&quot;) cntries.srv.data &lt;- srv.data[J(countries.set)] setkey(cntries.srv.data, cntry, idno) # idno is unique respondent's ID inside cntry cntries.dt &lt;- rbind(dk.dt, fr.dt, ru.dt) setkey(cntries.dt, cntry,idno) cntries.srv.data &lt;- cntries.srv.data[cntries.dt] # merge the databases cntries.srv.data[,weight:=dweight*pweight]  # weight is defined as design weight  adjusted on the countries population sizes  # add antecedent (denoted as lhs) statement to the cntries.srv.data lhs.rule.adding&lt;-function(lhs){   statements &lt;- unlist(strsplit(lhs, &quot; & &quot;))   statements &lt;- lapply(statements, function(l) unlist(strsplit(l,&quot;=&quot;)))   statements &lt;- lapply( statements, function(l)                      c(question.name=srv.variables[title==l[1], name], answer=l[2]) )   conditions &lt;- sapply( statements, function(l)                     paste(&quot;ifelse(is.na(&quot;, l[1], &quot;), 0, &quot;, l[1], &quot; == '&quot;, l[2], &quot;')&quot;, sep=&quot;&quot;) )   conditions &lt;- paste(conditions, collapse = &quot; & &quot;)    add.lhs.to.base &lt;- paste(&quot;cntries.srv.data[,x:=&quot;, conditions,&quot;]&quot;,sep=&quot;&quot;)   eval(parse(text=add.lhs.to.base))   cntries.srv.data[,x:=as.numeric(x)] return(T) } lhs.rule.adding(&quot;For most people in country life is getting worse=Agree strongly & Important to be rich, have money and expensive things=Not like me&quot;) cntries.srv.data[,cntry:=factor(cntry, levels = countries.set)] <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0437\u0430\u0434\u0430\u0435\u043c \u0434\u0438\u0437\u0430\u0439\u043d \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f  <\/p>\n<pre><code class=\"lisp\">library(survey) design.cntries.data &lt;- svydesign(ids = ~psu, strata = ~stratify, weights = ~weight, data = cntries.srv.data) <\/code><\/pre>\n<p>  <b>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/b><br \/>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f svymean( ) \u043f\u0430\u043a\u0435\u0442\u0430 survey \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u043e, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0438 \u0435\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0422\u043e\u0433\u0434\u0430 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0434\u043e\u043b\u0438 <i>p<\/i>, \u0440\u0430\u0432\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 <i>X<\/i> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u043a <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/648\/956\/1fa\/6489561fa738361063efa8b9a903313e.png\" alt=\"image\"\/>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 R \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lisp\">X.supp.confint &lt;- sapply(countries.set, function(country) {           design.dt&lt;-subset(design.cntries.data, cntry==country)           w.mean&lt;-svymean(~x, design.dt)           c(w.mean[1],confint(w.mean,df = degf(design.dt))[1,]) }) X.supp.confint &lt;- data.table(t(X.supp.confint)*100, country=c(&quot;France&quot;, &quot;Denmark&quot;, &quot;Russia&quot;)) setnames(X.supp.confint, 1:3, c(&quot;mean&quot;,&quot;lower&quot;,&quot;upper&quot;))  library(ggplot2) limits &lt;- aes(xmax = upper, xmin=lower) p &lt;- ggplot(X.supp.confint, aes(y=country, x=mean, colour=country)) + geom_point(size=4, shape=18) + geom_errorbarh(limits, width=0.2, lwd=1.0) p &lt;- p + ggtitle(&quot;95 % confidence intervals for the antecedent proprotions&quot;) + xlab(&quot;Percentage of population&quot;) p + theme_bw() + theme(plot.title=element_text( face=&quot;bold&quot;, size=16),                        axis.text.y = element_text( face=&quot;bold&quot;, size=14),                        axis.text.x = element_text( face=&quot;bold&quot;, size=14),                        axis.title.x=element_text( face=&quot;bold&quot;, size=14),                        axis.title.y=element_blank(), legend.position=&quot;none&quot;) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/790\/995\/97d\/79099597d4eb4da6be6b84ca4bc4de24.png\"\/><\/div>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044e, \u0432 survey \u043f\u0430\u043a\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0431\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0434\u043e\u043b\u0435\u0439 \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f svyciprop( ). <\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u0434\u043e\u043b\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <i>X<\/i> \u0432 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0430\u0445 \u0441\u0442\u0440\u043e\u0438\u043c \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u0432\u0438\u0434\u0430   <\/p>\n<pre><code class=\"lisp\"> model &lt;- svyglm(x~ cntry, design = design.cntries.data, family=quasibinomial)<\/code><\/pre>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"http:\/\/mathurl.com\/q26az7s.png\" alt=\"image\"\/><\/div>\n<p>  \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0440\u043e\u0432\u043d\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 \u00ab\u043e\u0431\u044b\u0447\u043d\u043e\u0439\u00bb \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c   <\/p>\n<pre><code class=\"lisp\"> sapply(c(coef(model)[1], sum(coef(model)[c(1,2)]), sum(coef(model)[c(1,3)])), function(b) exp(b)\/(1+exp(b)))*100 <\/code><\/pre>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"http:\/\/mathurl.com\/qdxc239.png\" alt=\"image\"\/><\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b <i>B_1<\/i> \u0438 <i>B_2<\/i> \u0437\u043d\u0430\u0447\u0438\u043c\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043d\u0443\u043b\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <i>X<\/i> \u0432\u043e \u0424\u0440\u0430\u043d\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u043e\u043b\u0435\u0439 \u0432 \u0414\u0430\u043d\u0438\u0438 \u0438 \u0420\u043e\u0441\u0441\u0438\u0438.   <\/p>\n<pre><code> library(DT); datatable(round(coef(summary(model)),4)) <\/code><\/pre>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/cd1\/2ec\/97d\/cd12ec97df5d4d7c88a94ade3c494ad9.png\"\/><\/div>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u043d\u0443\u043b\u044c-\u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443, \u0447\u0442\u043e \u043e\u0431\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 <i>B_1<\/i> \u0438 <i>B_2<\/i>, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e  <\/p>\n<pre><code class=\"lisp\">regTermTest(model, ~cntry, method = &quot;LRT&quot;) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"lisp\">Working (Rao-Scott+F) LRT for cntry  in svyglm(formula = x ~ cntry, design = design.cntries.data, family = quasibinomial) Working 2logLR =  379.0228 p= &lt; 2.22e-16  (scale factors:  1.2 0.8 );  denominator df= 2088 <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <i>X<\/i> \u0432 \u0442\u0440\u0435\u0445 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0430\u0445 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u0442\u043e \u043d\u0443\u043b\u044c-\u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0434\u043b\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u043e\u043f\u0440\u043e\u0441\u0430. \u042f \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u043b \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430\u0441\u044c \u0438\u043b\u0438 \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u043b\u0430\u0441\u044c, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0438, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043b\u0438 \u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u043e\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. <br \/>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 6.8 \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 [2]: Testing the independence of alcohol dependence and education level in young adults (ages 18\u201328) using the NCS-R Data, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u043e\u0434 R (<a href=\"http:\/\/www.isr.umich.edu\/src\/smp\/asda\/mysite\/R%20analysis%20examples\/CHAPTER%206%20ANALYSIS%20EXAMPLES%20REPLICATION%20FALL%202011%20R%20.pdf\">pdf<\/a>) \u0441 web \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/files\/3b5\/464\/aa4\/3b5464aa469b45299903b063646e4dee.png\"\/><\/div>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0443\u043b\u044c-\u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u00ab\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0430\u043b\u043a\u043e\u0433\u043e\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u00bb \u0438 \u00ab\u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u00bb \u0441\u0440\u0435\u0434\u0438 \u0433\u0440\u0430\u0436\u0434\u0430\u043d \u0421\u0428\u0410 \u0432 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435 18-28 \u043b\u0435\u0442. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 X^2 \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u0442 \u044d\u0442\u0443 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u0435\u043d\u0435\u0435 1 %, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438. \u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0442\u0435\u0441\u0442, \u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0420\u0430\u043e-\u0421\u043a\u043e\u0442\u0442\u0430 \u043d\u0430 \u0434\u0438\u0437\u0430\u0439\u043d \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u043b\u044c-\u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 10%. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c \u043d\u0443\u043b\u044c-\u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043d\u0430 5% \u0443\u0440\u043e\u0432\u043d\u0435 \u0443\u0436\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. <br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439. <\/p>\n<p>  \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u0435\u0436\u0441\u0442\u0440\u0430\u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c\u0438. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u044d\u0442\u043e\u0433\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0442\u0440\u0430\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0442\u0440\u0430\u043d\u044b (\u0432 ESS \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a), \u0430 \u043d\u0435 \u0432 \u043e\u0431\u0449\u0435\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438. \u041d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u0437\u0434\u043d\u0435\u0435, \u043f\u043e\u043a\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u0441\u0442\u0430\u0442\u0435\u0439 [5].<\/p>\n<p>  \u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430:<br \/>  [1] \u0427\u0443\u0440\u0438\u043a\u043e\u0432 \u0410. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0438 \u043d\u0435\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0432 \u0441\u043e\u0446\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445, \u0436. \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, 4, 2007, \u0441\u0442\u0440. 89-109.<br \/>  [2] Heeringa S.G., West B.T., Berglund P.A. Applied Survey Data Analysis, CRC Press, 2010.<br \/>  [3] Lumley T. Complex Surveys: A Guide to Analysis Using R, Wiley, 2010.<br \/>  [4] Damico A. Transitioning to R: Replicating SAS, Stata, and SUDAAN Analysis Techniques in Health Policy Data, The R Journal Vol. 1\/2, December 2009.<br \/>  [5] Cross-Cultural Analysis: Methods and Applications (edited by Davidov E., Schmidt P., Billiet J.), Routledge, 2011.     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/262005\/\"> http:\/\/habrahabr.ru\/post\/262005\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u0412 <a href=\"http:\/\/habrahabr.ru\/post\/258789\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0432\u0440\u043e\u043f\u0435\u0439\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043e\u043f\u0440\u043e\u0441\u0430. \u041d\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c? \u0418 \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b? \u041e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0432 \u044d\u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d9c\/c11\/20a\/d9cc1120a2c944fc91d582bf63259080.jpg\"\/><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-261327","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=261327"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261327\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}