{"id":3629,"date":"2023-07-16T11:14:31","date_gmt":"2023-07-16T11:14:31","guid":{"rendered":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/"},"modified":"2023-07-16T11:14:31","modified_gmt":"2023-07-16T11:14:31","slug":"extraheer-de-standaardfout-uit-lm-in-r","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/","title":{"rendered":"Hoe standaardfouten uit de lm()-functie in r te extraheren"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de volgende methoden gebruiken om de resterende standaardfout en de standaardfout van de individuele regressieco\u00ebffici\u00ebnten van de functie <a href=\"https:\/\/statorials.org\/nl\/lm-functie-in-r\/\" target=\"_blank\" rel=\"noopener\">lm()<\/a> in R te extraheren:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Methode 1: Extraheer de resterende standaardfout<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#extract residual standard error of regression model\n<span style=\"color: #000000;\">summary(model)$sigma<\/span><\/span>\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><strong>Methode 2: Extraheer de standaardfout van individuele regressieco\u00ebffici\u00ebnten<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#extract standard error of individual regression coefficients\n<span style=\"color: #000000;\">sqrt(diag(vcov(model)))<\/span>\n<\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u elke methode in de praktijk kunt gebruiken.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld: standaardfouten extraheren uit lm() in R<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Stel dat we het volgende meervoudige lineaire regressiemodel in R passen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create data frame\n<\/span>df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (rating=c(67, 75, 79, 85, 90, 96, 97),\n                 points=c(8, 12, 16, 15, 22, 28, 24),\n                 assists=c(4, 6, 6, 5, 3, 8, 7),\n                 rebounds=c(1, 4, 3, 3, 2, 6, 7))\n\n<span style=\"color: #008080;\">#fit multiple linear regression model\n<\/span>model &lt;- lm(rating ~ points + assists + rebounds, data=df)\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">We kunnen de functie <strong>summary()<\/strong> gebruiken om de volledige samenvatting van het regressiemodel weer te geven:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#view model summary\n<\/span>summary(model)\n\nCall:\nlm(formula = rating ~ points + assists + rebounds, data = df)\n\nResiduals:\n      1 2 3 4 5 6 7 \n-1.5902 -1.7181 0.2413 4.8597 -1.0201 -0.6082 -0.1644 \n\nCoefficients:\n            Estimate Std. Error t value Pr(&gt;|t|)   \n(Intercept) 66.4355 6.6932 9.926 0.00218 **\npoints 1.2152 0.2788 4.359 0.02232 * \nassists -2.5968 1.6263 -1.597 0.20860   \nrebounds 2.8202 1.6118 1.750 0.17847   \n---\nSignificant. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\nResidual standard error: 3.193 on 3 degrees of freedom\nMultiple R-squared: 0.9589, Adjusted R-squared: 0.9179 \nF-statistic: 23.35 on 3 and 3 DF, p-value: 0.01396\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De resterende standaardfout van het model is 3,193 en elk van de standaardfouten voor de individuele regressieco\u00ebffici\u00ebnten is te zien in <strong>Std.<\/strong> Kolom met <strong>uitvoerfouten<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Om alleen de resterende standaardfout uit het model te extraheren, kunnen we de volgende syntaxis gebruiken:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008080;\">#extract residual standard error of regression model<\/span>\nsummary(model)$sigma\n\n[1] 3.19339<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">En om alleen de standaardfouten voor elk van de individuele regressieco\u00ebffici\u00ebnten te extraheren, kunnen we de volgende syntaxis gebruiken:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008080;\">#extract standard error of individual regression coefficients<\/span>\nsqrt(diag(vcov(model)))\n\n(Intercept) points assists rebounds \n  6.6931808 0.2787838 1.6262899 1.6117911 \n<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Merk op dat deze waarden overeenkomen met de waarden die we eerder zagen in de gehele samenvatting van de regressieresultaten.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Gerelateerd:<\/strong> <a href=\"https:\/\/statorials.org\/nl\/hoe-de-resterende-standaardfout-moet-worden-geinterpreteerd\/\" target=\"_blank\" rel=\"noopener\">Residuele standaardfouten interpreteren<\/a><\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende tutorials wordt uitgelegd hoe u andere veelvoorkomende taken in R kunt uitvoeren:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/nl\/eenvoudige-lineaire-regressie-in-r\/\" target=\"_blank\" rel=\"noopener\">Hoe eenvoudige lineaire regressie uit te voeren in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/meervoudige-lineaire-regressie-r\/\" target=\"_blank\" rel=\"noopener\">Hoe meervoudige lineaire regressie uit te voeren in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/restspoor-r\/\" target=\"_blank\" rel=\"noopener\">Hoe maak je een restplot in R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de volgende methoden gebruiken om de resterende standaardfout en de standaardfout van de individuele regressieco\u00ebffici\u00ebnten van de functie lm() in R te extraheren: Methode 1: Extraheer de resterende standaardfout #extract residual standard error of regression model summary(model)$sigma Methode 2: Extraheer de standaardfout van individuele regressieco\u00ebffici\u00ebnten #extract standard error of individual regression coefficients sqrt(diag(vcov(model))) [&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":[],"class_list":["post-3629","post","type-post","status-publish","format-standard","hentry","category-gids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hoe standaardfouten uit de lm()-functie in R - Statorials te extraheren<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt uitgelegd hoe u standaardfouten uit de functie lm() in R kunt extraheren, met verschillende voorbeelden.\" \/>\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\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe standaardfouten uit de lm()-functie in R - Statorials te extraheren\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt uitgelegd hoe u standaardfouten uit de functie lm() in R kunt extraheren, met verschillende voorbeelden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-16T11:14:31+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\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/\",\"url\":\"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/\",\"name\":\"Hoe standaardfouten uit de lm()-functie in R - Statorials te extraheren\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-16T11:14:31+00:00\",\"dateModified\":\"2023-07-16T11:14:31+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt uitgelegd hoe u standaardfouten uit de functie lm() in R kunt extraheren, met verschillende voorbeelden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe standaardfouten uit de lm()-functie in r te extraheren\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/nl\/#website\",\"url\":\"https:\/\/statorials.org\/nl\/\",\"name\":\"Statorials\",\"description\":\"Uw gids voor statistische competentie\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/nl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder\",\"sameAs\":[\"http:\/\/statorials.org\/nl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe standaardfouten uit de lm()-functie in R - Statorials te extraheren","description":"In deze tutorial wordt uitgelegd hoe u standaardfouten uit de functie lm() in R kunt extraheren, met verschillende voorbeelden.","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\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe standaardfouten uit de lm()-functie in R - Statorials te extraheren","og_description":"In deze tutorial wordt uitgelegd hoe u standaardfouten uit de functie lm() in R kunt extraheren, met verschillende voorbeelden.","og_url":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/","og_site_name":"Statorials","article_published_time":"2023-07-16T11:14:31+00:00","author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/","url":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/","name":"Hoe standaardfouten uit de lm()-functie in R - Statorials te extraheren","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-16T11:14:31+00:00","dateModified":"2023-07-16T11:14:31+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt uitgelegd hoe u standaardfouten uit de functie lm() in R kunt extraheren, met verschillende voorbeelden.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/extraheer-de-standaardfout-uit-lm-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe standaardfouten uit de lm()-functie in r te extraheren"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/nl\/#website","url":"https:\/\/statorials.org\/nl\/","name":"Statorials","description":"Uw gids voor statistische competentie","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder","sameAs":["http:\/\/statorials.org\/nl"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/3629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/comments?post=3629"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/3629\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=3629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=3629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=3629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}