{"id":2534,"date":"2023-07-21T20:38:30","date_gmt":"2023-07-21T20:38:30","guid":{"rendered":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/"},"modified":"2023-07-21T20:38:30","modified_gmt":"2023-07-21T20:38:30","slug":"partieller-restgraph-in-r","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/","title":{"rendered":"So erstellen sie partielle residuendiagramme in r"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/de\/multiple-lineare-regression\/\" target=\"_blank\" rel=\"noopener\">Die multiple lineare Regression<\/a> ist eine statistische Methode, mit der wir die Beziehung zwischen mehreren Pr\u00e4diktorvariablen und einer <a href=\"https:\/\/statorials.org\/de\/variablen-erklarende-antworten\/\" target=\"_blank\" rel=\"noopener\">Antwortvariablen<\/a> verstehen k\u00f6nnen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Eine der wichtigsten <a href=\"https:\/\/statorials.org\/de\/multiple-lineare-regressionshypothesen\/\" target=\"_blank\" rel=\"noopener\">Annahmen<\/a> der multiplen linearen Regression ist jedoch, dass zwischen jeder Pr\u00e4diktorvariablen und der Antwortvariablen eine lineare Beziehung besteht.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wenn diese Annahme nicht erf\u00fcllt ist, sind die Ergebnisse des Regressionsmodells m\u00f6glicherweise nicht zuverl\u00e4ssig.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Eine M\u00f6glichkeit, diese Annahme zu testen, besteht darin, ein <strong>Diagramm mit partiellen Residuen<\/strong> zu erstellen, das die <a href=\"https:\/\/statorials.org\/de\/ruckstand\/\" target=\"_blank\" rel=\"noopener\">Residuen<\/a> einer Pr\u00e4diktorvariablen relativ zur Antwortvariablen anzeigt.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Das folgende Beispiel zeigt, wie man partielle Residuendiagramme f\u00fcr ein Regressionsmodell in R erstellt.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel: So erstellen Sie partielle Residuendiagramme in R<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Angenommen, wir passen ein Regressionsmodell mit drei Pr\u00e4diktorvariablen in R an:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#make this example reproducible\n<\/span>set. <span style=\"color: #3366ff;\">seeds<\/span> (0)\n\n<span style=\"color: #008080;\">#define response variable\n<\/span>y &lt;- c(1:1000)\n\n<span style=\"color: #008080;\">#define three predictor variables\n<\/span>x1 &lt;- c(1:1000)*runif(n=1000)\nx2 &lt;- (c(1:1000)*rnorm(n=1000))^2\nx3 &lt;- (c(1:1000)*rnorm(n=1000))^3\n\n<span style=\"color: #008080;\">#fit multiple linear regression model\n<\/span>model &lt;- lm(y~x1+x2+x3))<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen die Funktion <strong>crPlots()<\/strong> aus dem Paket <strong>car<\/strong> in R verwenden, um partielle Residuendiagramme f\u00fcr jede Pr\u00e4diktorvariable im Modell zu erstellen:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">library<\/span> (car)\n\n<span style=\"color: #008080;\">#create partial residual plots\n<\/span>crPlots(model)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-22535 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/partiel1.jpg\" alt=\"Teilrestdiagramme in R\" width=\"450\" height=\"455\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Die blaue Linie zeigt die erwarteten Residuen, wenn die Beziehung zwischen dem Pr\u00e4diktor und der Antwortvariablen linear w\u00e4re. Die rosa Linie zeigt die tats\u00e4chlichen Residuen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wenn sich die beiden Linien deutlich unterscheiden, deutet dies auf einen nichtlinearen Zusammenhang hin.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Aus den obigen Grafiken k\u00f6nnen wir ersehen, dass die Residuen f\u00fcr x2 und x3 nichtlinear erscheinen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dies verst\u00f6\u00dft gegen die Linearit\u00e4tsannahme der multiplen linearen Regression. Eine M\u00f6glichkeit, dieses Problem zu l\u00f6sen, besteht darin, eine Quadrat- oder Kubikwurzeltransformation f\u00fcr die Pr\u00e4diktorvariablen zu verwenden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">library<\/span> (car)\n\n<span style=\"color: #008080;\">#fit new model with transformed predictor variables\n<\/span>model_transformed &lt;- lm(y~x1+sqrt(x2)+log10(x3^(1\/3)))\n\n<span style=\"color: #008080;\">#create partial residual plots for new model\n<\/span>crPlots(model_transformed)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-22536 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/partiel2.jpg\" alt=\"\" width=\"448\" height=\"455\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Aus den partiellen Residuendiagrammen k\u00f6nnen wir erkennen, dass x2 jetzt eine linearere Beziehung zur Antwortvariablen hat.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Die x3-Pr\u00e4diktorvariable ist immer noch etwas nichtlinear, daher entscheiden wir uns m\u00f6glicherweise f\u00fcr eine andere Transformation oder entfernen die Variable m\u00f6glicherweise ganz aus dem Modell.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Die folgenden Tutorials erkl\u00e4ren, wie man andere g\u00e4ngige Diagramme in R erstellt:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/de\/diagnosediagramme-in-r\/\" target=\"_blank\" rel=\"noopener\">So erstellen Sie Diagnosediagramme in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/standort-skalierbar\/\" target=\"_blank\" rel=\"noopener\">So erstellen Sie ein Ma\u00dfstabs- und Standortdiagramm in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/restspur-r\/\" target=\"_blank\" rel=\"noopener\">So erstellen Sie ein Residuendiagramm in R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die multiple lineare Regression ist eine statistische Methode, mit der wir die Beziehung zwischen mehreren Pr\u00e4diktorvariablen und einer Antwortvariablen verstehen k\u00f6nnen. Eine der wichtigsten Annahmen der multiplen linearen Regression ist jedoch, dass zwischen jeder Pr\u00e4diktorvariablen und der Antwortvariablen eine lineare Beziehung besteht. Wenn diese Annahme nicht erf\u00fcllt ist, sind die Ergebnisse des Regressionsmodells m\u00f6glicherweise nicht [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>So erstellen Sie partielle Residuendiagramme in R - Statorials<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erkl\u00e4rt, wie man partielle Residuendiagramme in R erstellt und interpretiert.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So erstellen Sie partielle Residuendiagramme in R - Statorials\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erkl\u00e4rt, wie man partielle Residuendiagramme in R erstellt und interpretiert.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-21T20:38:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/partiel1.jpg\" \/>\n<meta name=\"author\" content=\"Dr. Benjamin Anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. Benjamin Anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/\",\"url\":\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/\",\"name\":\"So erstellen Sie partielle Residuendiagramme in R - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-21T20:38:30+00:00\",\"dateModified\":\"2023-07-21T20:38:30+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand mehrerer Beispiele erkl\u00e4rt, wie man partielle Residuendiagramme in R erstellt und interpretiert.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So erstellen sie partielle residuendiagramme in r\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/de\/#website\",\"url\":\"https:\/\/statorials.org\/de\/\",\"name\":\"Statorials\",\"description\":\"Ihr Leitfaden f\u00fcr statistische Kompetenz !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\",\"name\":\"Dr. Benjamin Anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. Benjamin Anderson\"},\"description\":\"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen\",\"sameAs\":[\"https:\/\/statorials.org\/de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"So erstellen Sie partielle Residuendiagramme in R - Statorials","description":"In diesem Tutorial wird anhand mehrerer Beispiele erkl\u00e4rt, wie man partielle Residuendiagramme in R erstellt und interpretiert.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/","og_locale":"de_DE","og_type":"article","og_title":"So erstellen Sie partielle Residuendiagramme in R - Statorials","og_description":"In diesem Tutorial wird anhand mehrerer Beispiele erkl\u00e4rt, wie man partielle Residuendiagramme in R erstellt und interpretiert.","og_url":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/","og_site_name":"Statorials","article_published_time":"2023-07-21T20:38:30+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/partiel1.jpg"}],"author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"2 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/","url":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/","name":"So erstellen Sie partielle Residuendiagramme in R - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-21T20:38:30+00:00","dateModified":"2023-07-21T20:38:30+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand mehrerer Beispiele erkl\u00e4rt, wie man partielle Residuendiagramme in R erstellt und interpretiert.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/partieller-restgraph-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So erstellen sie partielle residuendiagramme in r"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/de\/#website","url":"https:\/\/statorials.org\/de\/","name":"Statorials","description":"Ihr Leitfaden f\u00fcr statistische Kompetenz !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":"Person","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0","name":"Dr. Benjamin Anderson","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","caption":"Dr. Benjamin Anderson"},"description":"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen","sameAs":["https:\/\/statorials.org\/de"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/2534"}],"collection":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/comments?post=2534"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/2534\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=2534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=2534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=2534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}