{"id":2815,"date":"2023-11-24T15:56:25","date_gmt":"2023-11-24T14:56:25","guid":{"rendered":"https:\/\/www.istat.it\/?page_id=2815"},"modified":"2024-04-29T18:09:44","modified_gmt":"2024-04-29T16:09:44","slug":"statmatch","status":"publish","type":"page","link":"https:\/\/www.istat.it\/en\/classifications-and-tools\/methods-and-software-of-the-statistical-process\/process-phase\/data-integration\/statmatch\/","title":{"rendered":"StatMatch"},"content":{"rendered":"\n<p>The contents related to StatMatch are shown in the following sections:<\/p>\n\n\n<section class=\"gblock accordion_livelli white-bg  py-0\"  aria-labelledby=\"section-1\"><div class=\"container p-lg-0 block_count_1\" data-blockcount=\"1\"><div class=\"row pb-2\">\t\t<div class=\"accordion bianco\" id=\"accordion_1liv_0_block_98cc932e1a93736880829488990a3d2a\">\r\n\t\t\t\t\t\t\t<div class=\"accordion-item liv1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<h2 class=\"accordion-header\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"accordion-button collapsed\" type=\"button\" \r\n\t\t\t\t\t\t\t\tdata-bs-toggle=\"collapse\" data-bs-target=\"#collapse_al_1_1liv_block_98cc932e1a93736880829488990a3d2a\" aria-expanded=\"false\" aria-controls=\"collapse_al_1_1liv_block_98cc932e1a93736880829488990a3d2a\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDescription\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/button>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/h2>\r\n\t\t\t\t\t\t\t\t\t\t<div id=\"collapse_al_1_1liv_block_98cc932e1a93736880829488990a3d2a\" class=\"accordion-collapse collapse\" \r\n\t\t\t\t\t\tdata-row=\"0\" \r\n\t\t\t\t\t\tdata-depth=\"1\" \r\n\t\t\t\t\t\t\t\t\t\t\t\tdata-bs-parent=\"#accordion_1liv_0_block_98cc932e1a93736880829488990a3d2a\">\r\n                        <div class=\"row\">\r\n                                                            <div class=\"accordion-body col-12\">\r\n                                    <p>StatMatch is an add-on package for the R environment to carry out data integration through statistical matching and, as a by-product, to impute missing values in a data set.<\/p>\n<p>The package contains functions that implement methods of matching and functions to support matching (calculation of the distances, etc.). There are three functions dedicated to the application of nonparametric methods of matching at the micro level:<\/p>\n<ul class=\"lista\">\n<li>NND.hotdeck: mimimum distance donor selection; implements many distance functions; allows the definition of donation classes. It is possible to introduce a constraint for avoiding the selection of a donor more than once (constrained matching).<\/li>\n<li>RNDwNND.hotdeck: random selection of the donor in fixed or \u201cmoving\u201d classes. In the latter case, it is possible to select at random a donor among the k closest ones; random choice of a donor among those with a distance less than a given threshold, etc. The selection of the donor can be done with probability proportional to a weighing variable. Different distance functions are implemented.<\/li>\n<li>rankNND.hotdeck: select the donor closer based on the distance between the percentiles of the empirical cumulative distribution of a continuous variable available in both the data set. In estimating the empirical cumulative distribution it is possible to account for different weights assigned to units. The empirical cumulative distribution may be estimated in given classes of units.<\/li>\n<\/ul>\n<p>These functions can be used to impute the missing values in a data set through the corresponding hot-deck methods.<\/p>\n<p>There is only one function mixed.mtc that allows to implement methods of matching in parametric macro or mixed framework. The function assumes that the variables\u00a0<em>X<\/em>,\u00a0<em>Y<\/em>\u00a0and\u00a0<em>Z<\/em>\u00a0are distributed according to a multivariate normal distribution. The estimation of the parameters can be done via the maximum likelihood method or by applying a method based on sample estimates of the parameters of interest (means and variances).<\/p>\n<p>Two functions implement methods for matching at the macro level in the presence of data from complex surveys. These functions are based on a series of calibrations of the weights associated to the units in the source data sets according to the methods suggested by Renssen (1998). At this time the application of these methods is limited to the case where\u00a0<em>Y<\/em>\u00a0and\u00a0<em>Z<\/em>\u00a0are both categorical and the goal consists in estimating the contingency table\u00a0<em>Y<\/em>\u00a0vs.\u00a0<em>Z<\/em>. In particular, the function harmonize.x harmonizes the marginal\/joint distribution of the chosen X variables so to make it coherent between the two initial data sets; then the function comb.samples estimates the table Y vs. Z through the methodologies proposed by Renssen, with or without an additional data source C where\u00a0<em>Y<\/em>\u00a0and\u00a0<em>Z<\/em>\u00a0or\u00a0<em>X<\/em>,\u00a0<em>Y<\/em>\u00a0and\u00a0<em>Z<\/em>\u00a0are jointly observed.<\/p>\n<p>Finally the functions Frechet.bounds.cat and Fbwidths.by.x allow the exploration of uncertainty when all the variables (<em>X<\/em>,\u00a0<em>Y<\/em>, and\u00a0<em>Z<\/em>) are categorical. The first function estimates the ranges of uncertainty bounds for all the cells in the contingency table\u00a0<em>Y<\/em>\u00a0vs.\u00a0<em>Z<\/em>. In the presence of many common variables\u00a0<em>X<\/em>, the function Fbwidths.by.x permits to identify the variables most related to\u00a0<em>Y<\/em>\u00a0and\u00a0<em>Z<\/em>, and that allow a reduction of the width of the uncertainty bounds.<\/p>\n                                <\/div>\r\n                                                                                <\/div>\r\n                        \t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t<div class=\"accordion-item liv1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<h2 class=\"accordion-header\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"accordion-button collapsed\" type=\"button\" \r\n\t\t\t\t\t\t\t\tdata-bs-toggle=\"collapse\" data-bs-target=\"#collapse_al_2_1liv_block_98cc932e1a93736880829488990a3d2a\" aria-expanded=\"false\" aria-controls=\"collapse_al_2_1liv_block_98cc932e1a93736880829488990a3d2a\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInformation\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/button>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/h2>\r\n\t\t\t\t\t\t\t\t\t\t<div id=\"collapse_al_2_1liv_block_98cc932e1a93736880829488990a3d2a\" class=\"accordion-collapse collapse\" \r\n\t\t\t\t\t\tdata-row=\"0\" \r\n\t\t\t\t\t\tdata-depth=\"1\" \r\n\t\t\t\t\t\t\t\t\t\t\t\tdata-bs-parent=\"#accordion_1liv_0_block_98cc932e1a93736880829488990a3d2a\">\r\n                        <div class=\"row\">\r\n                                                            <div class=\"accordion-body col-12\">\r\n                                    <p><strong>Status:<\/strong> validated<\/p>\n<p><strong>Author:<\/strong> Istat<\/p>\n<p><strong>Licence:<\/strong> <a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2023\/12\/GPL-2.txt\">GPL-2<\/a> | <a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2023\/12\/GPL-3.txt\">GPL-3<\/a><\/p>\n<p><strong>GSBPM code:<\/strong><\/p>\n<p>5.1 Integrate data<br \/>\n5.4 Edit and impute<\/p>\n<p><strong>Programming language:<\/strong> R<\/p>\n<p><strong>Keywords:<\/strong> statistical matching, data fusion, hot deck imputation, uncertainty analysis<\/p>\n<p><strong>Contact:<\/strong><\/p>\n<p>name: Marcello D\u2019Orazio<br \/>\nemail: <a href=\"mailto:madorazi@istat.it\">madorazi@istat.it<\/a><\/p>\n                                <\/div>\r\n                                                                                <\/div>\r\n                        \t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t<div class=\"accordion-item liv1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<h2 class=\"accordion-header\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"accordion-button collapsed\" type=\"button\" \r\n\t\t\t\t\t\t\t\tdata-bs-toggle=\"collapse\" data-bs-target=\"#collapse_al_3_1liv_block_98cc932e1a93736880829488990a3d2a\" aria-expanded=\"false\" aria-controls=\"collapse_al_3_1liv_block_98cc932e1a93736880829488990a3d2a\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSoftware and documentation\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/button>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/h2>\r\n\t\t\t\t\t\t\t\t\t\t<div id=\"collapse_al_3_1liv_block_98cc932e1a93736880829488990a3d2a\" class=\"accordion-collapse collapse\" \r\n\t\t\t\t\t\tdata-row=\"0\" \r\n\t\t\t\t\t\tdata-depth=\"1\" \r\n\t\t\t\t\t\t\t\t\t\t\t\tdata-bs-parent=\"#accordion_1liv_0_block_98cc932e1a93736880829488990a3d2a\">\r\n                        <div class=\"row\">\r\n                                                            <div class=\"accordion-body col-12\">\r\n                                    <p><strong>SOFTWARE DEPENDENCIES<\/strong><\/p>\n<p>R ( \u2265 2.7.0)<\/p>\n<p>R packages:\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/proxy\/index.html\">proxy<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/lpSolve\/index.html\">lpSolve<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/survey\/index.html\">survey<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/ggplot2\/index.html\">ggplot2<\/a>.<\/p>\n<p>In some cases, it may be necessary to have the additional R packages:\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/Hmisc\/index.html\">Hmisc<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/MASS\/index.html\">MASS<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/mipfp\/index.html\">mipfp<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/clue\/index.html\">clue<\/a>,\u00a0<a href=\"http:\/\/cran.r-project.org\/web\/packages\/RANN\/index.html\">RANN<\/a>.<\/p>\n<p><strong>COPYRIGHT<\/strong><\/p>\n<p>Copyright 2016 Marcello D\u2019Orazio<\/p>\n<p>Licensed under the GNU General Public License (GPL), version 2 or subsequent. You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at:\u00a0<a href=\"http:\/\/www.gnu.org\/licenses\/licenses.en.html\">http:\/\/www.gnu.org\/licenses\/licenses.en.html<\/a>. Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an \u201cAS IS\u201d basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<\/p>\n<p><strong>DISCLAIMER<\/strong><\/p>\n<p>Istat assumes no responsibility for the results arising from use of the instrument that is inconsistent with the methodological guidance contained in the documentation available.<\/p>\n<p><strong>DOWNLOAD<\/strong><br \/>\nRelease date: 01\/03\/2022<\/p>\n<ul>\n<li><a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2023\/12\/StatMatch_1.4.1.zip\">STATMATCH Version 1.4.1 \u2013 Windows binaries<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2024\/03\/StatMatch_1.4.1.tar.gz\">STATMATCH Version 1.4.1 \u2013 Package source<\/a><\/li>\n<\/ul>\n<p><strong>INSTALLATION<\/strong><br \/>\nInstall the downloaded package from within R as follows:<br \/>\n&gt; install.packages(path_to_file, repos = NULL)<br \/>\nwhere the character path_to_file is the path to the .zip or .tar.gz file you downloaded.<\/p>\n<p><strong>TECHNICAL AND METHODOLOGICAL DOCUMENTATION<\/strong><\/p>\n<p><a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2023\/12\/StatMatch.pdf\">Reference manual \u2013 StatMatch v. 1.4.1<\/a><\/p>\n<p><strong>OTHER DOCUMENTATION<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/marcellodo\/StatMatch\/tree\/master\/Tutorials_Vignette_OtherDocs\" target=\"_blank\" rel=\"noopener\">StatMatch website<\/a><\/p>\n                                <\/div>\r\n                                                                                <\/div>\r\n                        \t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t<\/div><\/div><\/section>","protected":false},"excerpt":{"rendered":"<p>The contents related to StatMatch are shown in the following sections:<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":2529,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2815","page","type-page","status-publish","hentry"],"acf":[],"wpml_current_locale":"en_US","wpml_translations":[],"_links":{"self":[{"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/2815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/comments?post=2815"}],"version-history":[{"count":7,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/2815\/revisions"}],"predecessor-version":[{"id":13522,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/2815\/revisions\/13522"}],"up":[{"embeddable":true,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/2529"}],"wp:attachment":[{"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/media?parent=2815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}