{"id":1747,"date":"2023-07-25T03:40:00","date_gmt":"2023-07-25T03:40:00","guid":{"rendered":"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/"},"modified":"2023-07-25T03:40:00","modified_gmt":"2023-07-25T03:40:00","slug":"wie-man-lila-cp-in-r-berechnet","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/","title":{"rendered":"So berechnen sie lila &#39;cp in r"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">In der Regressionsanalyse ist <a href=\"https:\/\/statorials.org\/de\/lila-vgl\/\" target=\"_blank\" rel=\"noopener\">Mallows Cp<\/a> eine Metrik, die zur Auswahl des besten Regressionsmodells aus mehreren potenziellen Modellen verwendet wird.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen das \u201ebeste\u201c Regressionsmodell identifizieren, indem wir das Modell mit dem niedrigsten Cp-Wert nahe <em>p<\/em> +1 identifizieren, wobei <em>p<\/em> die Anzahl der Pr\u00e4diktorvariablen im Modell ist.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Der einfachste Weg, den Cp von Mallows in R zu berechnen, ist die Verwendung der Funktion <a href=\"https:\/\/www.rdocumentation.org\/packages\/olsrr\/versions\/0.5.3\/topics\/ols_mallows_cp\" target=\"_blank\" rel=\"noopener\">ols_mallows_cp()<\/a> aus dem <strong>olsrr-<\/strong> Paket.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Das folgende Beispiel zeigt, wie diese Funktion zur Berechnung des Cp von Mallows verwendet wird, um das beste Regressionsmodell aus mehreren potenziellen Modellen in R auszuw\u00e4hlen.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel: Berechnung von Mallows Cp in R<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Nehmen wir an, wir m\u00f6chten drei verschiedene multiple lineare Regressionsmodelle mithilfe von Variablen aus dem <strong>mtcars-<\/strong> Datensatz anpassen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie die folgenden Regressionsmodelle angepasst werden:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Pr\u00e4diktorvariablen im vollst\u00e4ndigen Modell: die 10 Variablen<\/span><\/li>\n<li> <span style=\"color: #000000;\">Pr\u00e4diktorvariablen in Modell 1: disp, hp, wt, qsec<\/span><\/li>\n<li> <span style=\"color: #000000;\">Pr\u00e4diktorvariablen in Modell 2: disp, qsec<\/span><\/li>\n<li> <span style=\"color: #000000;\">Pr\u00e4diktorvariablen in Modell 3: disp, wt<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie jedes dieser Regressionsmodelle angepasst und die Funktion <a href=\"https:\/\/www.rdocumentation.org\/packages\/olsrr\/versions\/0.5.3\/topics\/ols_mallows_cp\" target=\"_blank\" rel=\"noopener\">ols_mallows_cp()<\/a> verwendet wird, um den Mallows-Cp jedes Modells zu berechnen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\">library<\/span> (olsrr)\n\n<span style=\"color: #008080;\">#fit full model\n<\/span>full_model &lt;- lm(mpg ~ ., data = mtcars)\n\n<span style=\"color: #008080;\">#fit three smaller models\n<\/span>model1 &lt;- lm(mpg ~ disp + hp + wt + qsec, data = mtcars)\nmodel2 &lt;- lm(mpg ~ disp + qsec, data = mtcars)\nmodel3 &lt;- lm(mpg ~ disp + wt, data = mtcars)\n\n<span style=\"color: #008080;\">#calculate Mallows' Cp for each model\n<\/span>ols_mallows_cp(model1, full_model)\n\n[1] 4.430434\n\nols_mallows_cp(model2, full_model)\n\n[1] 18.64082\n\nols_mallows_cp(model3, full_model)\n\n[1] 9.122225\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">So interpretieren Sie das Ergebnis:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Modell 1: <em>p<\/em> + 1 = 5, Mallows Cp = 4,43<\/span><\/li>\n<li> <span style=\"color: #000000;\">Modell 2: <em>p<\/em> + 1 = 3, Mallows Cp = 18,64<\/span><\/li>\n<li> <span style=\"color: #000000;\">Modell 3: <em>p<\/em> + 1 = 30, Mallows Cp = 9,12<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen sehen, dass Modell 1 einen Wert f\u00fcr Mallows&#8216; Cp hat, der <em>p<\/em> + 1 am n\u00e4chsten kommt, was darauf hinweist, dass es das beste Modell ist, das zu der geringsten Verzerrung unter den drei potenziellen Modellen f\u00fchrt.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Anmerkungen zum Cp des mauves<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Hier sind einige Dinge, die Sie bei Mallows Cp beachten sollten:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Wenn jedes potenzielle Modell einen hohen Mallows-Cp-Wert aufweist, deutet dies darauf hin, dass in jedem Modell wahrscheinlich einige wichtige Pr\u00e4diktorvariablen fehlen.<\/span><\/li>\n<li> <span style=\"color: #000000;\">Wenn mehrere potenzielle Modelle niedrige Werte f\u00fcr Mallows Cp aufweisen, w\u00e4hlen Sie das Modell mit dem niedrigsten Wert als bestes zu verwendendes Modell aus.<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Bedenken Sie, dass der Cp von Mallows nur eine M\u00f6glichkeit ist, das \u201ebeste\u201c Regressionsmodell unter mehreren potenziellen Modellen zu identifizieren.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Ein weiteres h\u00e4ufig verwendetes Ma\u00df ist das angepasste R-Quadrat, das uns den Anteil der Varianz in der <a href=\"https:\/\/statorials.org\/de\/variablen-erklarende-antworten\/\" target=\"_blank\" rel=\"noopener\">Antwortvariablen<\/a> angibt, der durch die Pr\u00e4diktorvariablen im Modell erkl\u00e4rt werden kann, angepasst an die Anzahl der verwendeten Pr\u00e4diktorvariablen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Um zu entscheiden, welches Regressionsmodell aus einer Liste verschiedener Modelle das beste ist, empfiehlt es sich, sowohl den Cp von Mallows als auch das angepasste R-Quadrat zu betrachten.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/de\/r-quadrate-in-r-passt\/\" target=\"_blank\" rel=\"noopener\">So berechnen Sie das angepasste R-Quadrat in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/aic-nach-r\/\" target=\"_blank\" rel=\"noopener\">So berechnen Sie den AIC in R<\/a><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In der Regressionsanalyse ist Mallows Cp eine Metrik, die zur Auswahl des besten Regressionsmodells aus mehreren potenziellen Modellen verwendet wird. Wir k\u00f6nnen das \u201ebeste\u201c Regressionsmodell identifizieren, indem wir das Modell mit dem niedrigsten Cp-Wert nahe p +1 identifizieren, wobei p die Anzahl der Pr\u00e4diktorvariablen im Modell ist. Der einfachste Weg, den Cp von Mallows in [&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 berechnen Sie Mallows Cp in R \u2013 Statorials<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand eines Schritt-f\u00fcr-Schritt-Beispiels erl\u00e4utert, wie Mallows Cp in R berechnet wird.\" \/>\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\/wie-man-lila-cp-in-r-berechnet\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So berechnen Sie Mallows Cp in R \u2013 Statorials\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand eines Schritt-f\u00fcr-Schritt-Beispiels erl\u00e4utert, wie Mallows Cp in R berechnet wird.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-25T03:40:00+00:00\" \/>\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\/wie-man-lila-cp-in-r-berechnet\/\",\"url\":\"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/\",\"name\":\"So berechnen Sie Mallows Cp in R \u2013 Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-25T03:40:00+00:00\",\"dateModified\":\"2023-07-25T03:40:00+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand eines Schritt-f\u00fcr-Schritt-Beispiels erl\u00e4utert, wie Mallows Cp in R berechnet wird.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So berechnen sie lila &#39;cp 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 berechnen Sie Mallows Cp in R \u2013 Statorials","description":"In diesem Tutorial wird anhand eines Schritt-f\u00fcr-Schritt-Beispiels erl\u00e4utert, wie Mallows Cp in R berechnet wird.","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\/wie-man-lila-cp-in-r-berechnet\/","og_locale":"de_DE","og_type":"article","og_title":"So berechnen Sie Mallows Cp in R \u2013 Statorials","og_description":"In diesem Tutorial wird anhand eines Schritt-f\u00fcr-Schritt-Beispiels erl\u00e4utert, wie Mallows Cp in R berechnet wird.","og_url":"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/","og_site_name":"Statorials","article_published_time":"2023-07-25T03:40:00+00:00","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\/wie-man-lila-cp-in-r-berechnet\/","url":"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/","name":"So berechnen Sie Mallows Cp in R \u2013 Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-25T03:40:00+00:00","dateModified":"2023-07-25T03:40:00+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand eines Schritt-f\u00fcr-Schritt-Beispiels erl\u00e4utert, wie Mallows Cp in R berechnet wird.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/wie-man-lila-cp-in-r-berechnet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So berechnen sie lila &#39;cp 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\/1747"}],"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=1747"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/1747\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=1747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=1747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=1747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}