{"id":123764,"date":"2026-04-17T10:05:46","date_gmt":"2026-04-17T08:05:46","guid":{"rendered":"https:\/\/www.istat.it\/?page_id=123764"},"modified":"2026-04-17T10:13:54","modified_gmt":"2026-04-17T08:13:54","slug":"unitmix","status":"publish","type":"page","link":"https:\/\/www.istat.it\/en\/classifications-and-tools\/methods-and-software-of-the-statistical-process\/process-phase\/detection-and-treatment-of-measurement-errors-and-imputation-of-partial-non-responses\/unitmix\/","title":{"rendered":"UnitMix"},"content":{"rendered":"\n<p>The contents related to UnitMix 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_b73bcff4033dcd85ef960e2b3a0204bf\">\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_b73bcff4033dcd85ef960e2b3a0204bf\" aria-expanded=\"false\" aria-controls=\"collapse_al_1_1liv_block_b73bcff4033dcd85ef960e2b3a0204bf\">\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_b73bcff4033dcd85ef960e2b3a0204bf\" 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_b73bcff4033dcd85ef960e2b3a0204bf\">\r\n                        <div class=\"row\">\r\n                                                            <div class=\"accordion-body col-12\">\r\n                                    <p>In statistical surveys, particularly economic and business ones, it is common for some units to report values in units of measurement different from the expected ones \u2014 for example, amounts in thousands of euros instead of euros, or in cents instead of units. The <strong>UnitMix<\/strong> package for the R environment provides tools to detect and correct these errors in multivariate numeric data using model-based clustering. The methodology relies on <em>Gaussian Mixture Models<\/em> (GMM) with user-defined translation vectors (patterns of potential errors), which identify clusters of records that differ in scale or unit of measurement.<\/p>\n<p>The <strong>UnitMix<\/strong> package includes three main functions:<\/p>\n<ul class=\"lista\">\n<li>assign.cluster: performs clustering of observations using the EM (Expectation-Maximization) algorithm, shifting the global mean vector according to user-specified error patterns;<\/li>\n<li>cluster.plot: dynamically generates pairwise scatterplots for all variables, log-transformed, colouring points according to their cluster membership as determined by posterior probabilities;<\/li>\n<li>refine.cluster: performs post-processing of assign.cluster results, evaluating the compatibility of each observation with its assigned cluster using the Mahalanobis distance on log-transformed data.<\/li>\n<\/ul>\n<p>The method assumes multivariate log-normality and equal covariance across clusters. The package imports the mvtnorm package for computing multivariate Gaussian distribution densities.<\/p>\n<p>&nbsp;<\/p>\n<p>Main references<\/p>\n<p>Di Zio, M., Guarnera, U., &amp; Luzi, O. (2005). \u201cEditing systematic unity measure errors through mixture modelling\u201d. <em>Survey Methodology<\/em>, 31(1), 53\u201363.<\/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_b73bcff4033dcd85ef960e2b3a0204bf\" aria-expanded=\"false\" aria-controls=\"collapse_al_2_1liv_block_b73bcff4033dcd85ef960e2b3a0204bf\">\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_b73bcff4033dcd85ef960e2b3a0204bf\" 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_b73bcff4033dcd85ef960e2b3a0204bf\">\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> GPL-3<\/p>\n<p><strong>GSBPM code: <\/strong>5.4 Edit and impute<\/p>\n<p><strong>Programming language:<\/strong> R<\/p>\n<p><strong>Keywords:\u00a0<\/strong>measurement-unit errors; Gaussian mixture; EM algorithm; Mahalanobis distance<\/p>\n<p><strong>Contact:\u00a0<\/strong>name: Renato Magistro &#8211;\u00a0email: <a href=\"mailto:renato.magistro@istat.it\">renato.magistro@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_b73bcff4033dcd85ef960e2b3a0204bf\" aria-expanded=\"false\" aria-controls=\"collapse_al_3_1liv_block_b73bcff4033dcd85ef960e2b3a0204bf\">\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_b73bcff4033dcd85ef960e2b3a0204bf\" 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_b73bcff4033dcd85ef960e2b3a0204bf\">\r\n                        <div class=\"row\">\r\n                                                            <div class=\"accordion-body col-12\">\r\n                                    <p><strong>TECHNICAL REQUIREMENTS<\/strong><\/p>\n<p>The UnitMix package works on R versions 4.0.0 and later on any operating system (Windows, Mac, or Linux). It requires the following additional R package to be installed: mvtnorm.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>COPYRIGHT<\/strong><\/p>\n<p>Copyright 2025 Cristina Faricelli, Renato Magistro<\/p>\n<p>Licensed under the GNU General Public License (GPL), version 3 or later. You may not use this work except in compliance with the License. You may obtain a copy of the License at the following address: http:\/\/www.gnu.org\/licenses\/.<\/p>\n<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &#8220;AS IS&#8221; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>DISCLAIMER<\/strong><\/p>\n<p>Istat does not assume responsibility for results deriving from a use of the tool that is not consistent with the methodological indications contained in the available documentation.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>DOWNLOAD<\/strong><\/p>\n<p>Release date: 10\/03\/2026<\/p>\n<p><a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2026\/04\/UnitMix_0.0.1.zip\">UnitMix Version 0.0.1<\/a> \u2013 Precompiled package for Windows<\/p>\n<p><a href=\"https:\/\/www.istat.it\/wp-content\/uploads\/2026\/04\/UnitMix_0.0.1.tar.gz\">UnitMix Version 0.0.1<\/a> \u2013 Package source for Windows and Unix-like systems<\/p>\n<p>&nbsp;<\/p>\n<p><strong>INSTALLATION<\/strong><\/p>\n<p>In R the package can be installed using the following instructions:<\/p>\n<p>&gt; install.packages(path_to_file, repos = NULL)<\/p>\n<p>where path_to_file indicated the path of the downloaded.zip or .tar.gz.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>TECHNICAL AND METHODOLOGICAL DOCUMENTATION<\/strong><\/p>\n<p>Reference manual \u2013 UnitMix v. 0.0.1<\/p>\n<p><a href=\"https:\/\/cran.r-project.org\/web\/packages\/UnitMix\/UnitMix.pdf\">https:\/\/cran.r-project.org\/web\/packages\/UnitMix\/UnitMix.pdf<\/a><\/p>\n<p>Di Zio, M., Guarnera, U., &amp; Luzi, O. (2005). \u201cEditing systematic unity measure errors through mixture modelling\u201d. <em>Survey Methodology<\/em>, 31(1), 53\u201363. https:\/\/www150.statcan.gc.ca\/n1\/en\/pub\/12-001-x\/2005001\/article\/8087-eng.pdf<\/p>\n<p>&nbsp;<\/p>\n<p><strong>OTHER DOCUMENTATION<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/CristinaFaricelli\/UnitMix\">https:\/\/github.com\/CristinaFaricelli\/UnitMix<\/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 UnitMix are shown in the following sections:<\/p>\n","protected":false},"author":19,"featured_media":0,"parent":2728,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-123764","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\/123764","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\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/comments?post=123764"}],"version-history":[{"count":6,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/123764\/revisions"}],"predecessor-version":[{"id":123792,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/123764\/revisions\/123792"}],"up":[{"embeddable":true,"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/pages\/2728"}],"wp:attachment":[{"href":"https:\/\/www.istat.it\/en\/wp-json\/wp\/v2\/media?parent=123764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}