{"id":2656,"date":"2018-04-11T22:19:50","date_gmt":"2018-04-12T02:19:50","guid":{"rendered":"https:\/\/cyrussamii.com\/?p=2656"},"modified":"2018-05-04T15:16:57","modified_gmt":"2018-05-04T19:16:57","slug":"r-and-stata-code-for-inverse-covariance-weighting","status":"publish","type":"post","link":"https:\/\/cyrussamii.com\/?p=2656","title":{"rendered":"R and Stata code for inverse covariance weighting"},"content":{"rendered":"<p>A previous post had discussed differences between dimension reduction through principal components and factor analysis on the one hand and inverse covariance weighting (ICW) on the other: <a href=\"https:\/\/cyrussamii.com\/?p=2177\">[link]<\/a>. <\/p>\n<p>Here is a link to a <del datetime=\"2018-05-04T19:12:04+00:00\">Stata .ado<\/del> GitHub repository with the code for ICW index construction, including both an R example as well as a Stata .do file that loads a program to construct indices: <a href=\"https:\/\/github.com\/cdsamii\/make_index\">[.git]<\/a>.  The .do file itself contains instructions on using the function &#8220;make_index_gr&#8221;, which generates an ICW index that can include weights and can be set to standardize with respect to any subset of the data (e.g., against the control group).<\/p>\n<p>Please give them a try and if you find any bugs, please let me know.  Also, if anyone wants to do a more professional job with the coding, and even integrate them into broader packages, please be my guest.<\/p>\n<p>Updates: <\/p>\n<ul>\n<li> The make_index_gr Stata program was modified on 2018-05-03 so that the resulting index indeed centers on the standardization group.\n<li> Post was edited on 2018-05-04 to link to the GitHub repository.\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A previous post had discussed differences between dimension reduction through principal components and factor analysis on the one hand and inverse covariance weighting (ICW) on the other: [link]. Here is a link to a Stata .ado GitHub repository with the code for ICW index construction, including both an R example as well as a Stata &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/cyrussamii.com\/?p=2656\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;R and Stata code for inverse covariance weighting&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2656","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/cyrussamii.com\/index.php?rest_route=\/wp\/v2\/posts\/2656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyrussamii.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cyrussamii.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cyrussamii.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cyrussamii.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2656"}],"version-history":[{"count":11,"href":"https:\/\/cyrussamii.com\/index.php?rest_route=\/wp\/v2\/posts\/2656\/revisions"}],"predecessor-version":[{"id":2685,"href":"https:\/\/cyrussamii.com\/index.php?rest_route=\/wp\/v2\/posts\/2656\/revisions\/2685"}],"wp:attachment":[{"href":"https:\/\/cyrussamii.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cyrussamii.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cyrussamii.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}