{"id":495,"date":"2010-07-01T19:13:47","date_gmt":"2010-07-01T17:13:47","guid":{"rendered":"http:\/\/www.theusrus.de\/blog\/?p=495"},"modified":"2011-02-09T20:21:37","modified_gmt":"2011-02-09T18:21:37","slug":"can-you-spot-the-error","status":"publish","type":"post","link":"https:\/\/www.theusrus.de\/blog\/can-you-spot-the-error\/","title":{"rendered":"Can you spot the Error?"},"content":{"rendered":"<p><a href=\"http:\/\/www.stoch.uni-bayreuth.de\/de\/team\/z_former-members\/Huber_Peter_J\/index.html\" target=\"_blank\">Peter Huber<\/a> referred to \u201cthe rawness of raw data\u201d, a kind of data we would not expect to find in a textbook. The book of <a href=\"http:\/\/www.amazon.com\/Multivariate-Statistical-Modelling-Generalized-Statistics\/dp\/0387951873\/ref=sr_1_10?ie=UTF8&amp;s=books-intl-de&amp;qid=1278010637&amp;sr=8-10\" target=\"_blank\">Fahrmeir and Tutz<\/a> on multivariate modelling refers to the visual impairment data from Liang et al., 1992 in table 3.12:<\/p>\n<div style=\"width: 555px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" title=\"Visual Impairment Data from Liang et al.\" src=\"http:\/\/theusRus.de\/Blog-files\/FTimpairment.png\" alt=\"\" width=\"545\" height=\"264\" \/><p class=\"wp-caption-text\">Visual Impairment Data from Liang et al. as found in Fahrmeir and Tutz<\/p><\/div>\n<p>Nothing wrong here at first sight; but how would you tell? There are some people who are actually able to look at non-trivial table data and spot &#8220;the round peg in the square hole&#8221;, but that just won&#8217;t work for the rest of us.<\/p>\n<p>As you might guess, I am going to make a case for graphics here.<\/p>\n<p>Let&#8217;s start with what the mainstream would do: plot the data in a dotplot like thing using the trellis paradigm of conditioning. I used <a href=\"http:\/\/had.co.nz\/ggplot2\/\" target=\"_blank\">ggplot2<\/a> to make sure to trellis state-of-the-art. A simple<\/p>\n<pre>  qplot(count, side, data=visual2, colour=impaired) + facet_grid(age ~ race)<\/pre>\n<p>gives me:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.theusRus.de\/Blog-files\/ggplot2.png\" alt=\"The visual impairment data in a trellis display\" width=\"561\" height=\"474\" \/>(I still have a hard time to find that syntax intuitive &#8230;) Surprisingly this plot already is sufficient to spot the &#8220;problem&#8221; in the data, although some important properties of the data can&#8217;t be seen here.<\/p>\n<p>A mosaic plot makes the whole thing even easier:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\" aligncenter\" title=\"Mosaic Plot of the impairment data\" src=\"http:\/\/www.theusRus.de\/Blog-files\/mosaic_imp.png\" alt=\"\" width=\"560\" height=\"314\" \/><\/p>\n<p style=\"text-align: center;\">(impairment cases highlighted, left and right is left and right)<\/p>\n<p style=\"text-align: left;\">The left and right cases are (what a surprise) always of the same size, except for the 70+, black &#8211; hard to believe that in this group 110 cyclops show up not having a right eye.<\/p>\n<p style=\"text-align: left;\">In the mosaic plot the higher proportion of the impaired right eyes for 70+ blacks jumps immediately to ones eyes, but what reveals the error is the missing independence between race and side for 70+. That implies that we have too few cases here, and what is &#8216;226&#8217; in the table should actually be &#8216;336&#8217;.<\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/www.theusRus.de\/Blog-files\/visual.txt\">Here<\/a> is the (corrected) data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Peter Huber referred to \u201cthe rawness of raw data\u201d, a kind of data we would not expect to find in a textbook. The book of Fahrmeir and Tutz on multivariate modelling refers to the visual impairment data from Liang et al., 1992 in table 3.12: Nothing wrong here at first sight; but how would you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,15,14,5],"tags":[],"class_list":["post-495","post","type-post","status-publish","format-standard","hentry","category-general","category-mondrian","category-r","category-the-good-the-bad"],"_links":{"self":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/comments?post=495"}],"version-history":[{"count":28,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/495\/revisions"}],"predecessor-version":[{"id":1001,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/495\/revisions\/1001"}],"wp:attachment":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/media?parent=495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/categories?post=495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/tags?post=495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}