{"id":4217,"date":"2023-07-12T18:44:36","date_gmt":"2023-07-12T18:44:36","guid":{"rendered":"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/"},"modified":"2023-07-12T18:44:36","modified_gmt":"2023-07-12T18:44:36","slug":"pivot-tabelle-sas","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/","title":{"rendered":"So erstellen sie pivottables in sas (mit beispiel)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Sie k\u00f6nnen <strong>PROC TABULATE<\/strong> in SAS verwenden, um Pivot-Tabellen zu erstellen, um Variablen in einem Datensatz zusammenzufassen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dieses Verfahren verwendet die folgende grundlegende Syntax:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #800080;\">proc tabulate<\/span> <span style=\"color: #3366ff;\">data<\/span> =my_data;\n    <span style=\"color: #3366ff;\">class<\/span> var1;\n    <span style=\"color: #3366ff;\">var<\/span> var2 var3;\n    <span style=\"color: #3366ff;\">table<\/span> var1, var2 var3;\n<span style=\"color: #800080;\">run<\/span> ;\n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Die <strong>Klassenanweisung<\/strong> gibt die zu gruppierende Variable an, die <strong>var-<\/strong> Anweisung gibt die zusammenzufassenden numerischen Variablen an und die <strong>Tabellenanweisung<\/strong> gibt das Format der Pivot-Tabelle an.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Das folgende Beispiel zeigt, wie diese Syntax in der Praxis verwendet wird.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Beispiel: Verwenden Sie Proc Tabulate, um eine PivotTable in SAS zu erstellen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Nehmen wir an, wir haben in SAS den folgenden Datensatz, der Informationen \u00fcber die Anzahl der Verk\u00e4ufe und Retouren in verschiedenen Lebensmittelgesch\u00e4ften enth\u00e4lt:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">\/*create dataset*\/\n<span style=\"color: #000000;\"><span style=\"color: #800080;\">data<\/span> my_data;\n    <span style=\"color: #3366ff;\">input<\/span> store $sales returns;\n    <span style=\"color: #3366ff;\">datalines<\/span> ;\nAt 10 2\nAt 7 0\nAt 7 1\nAt 8 1\nAt 6 0\nB 10 2\nB 14 5\nB 13 4\nB 9 0\nB-52\nC 12 1\nC 10 1\nC 10 3\nC 12 4\nC 9 1\n;\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view dataset*\/\n<\/span><span style=\"color: #800080;\">proc print<\/span> <span style=\"color: #3366ff;\">data<\/span> =my_data;\n<\/span><\/span><\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-33365 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pivotsas1.jpg\" alt=\"\" width=\"214\" height=\"404\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Nehmen wir nun an, wir m\u00f6chten eine Pivot-Tabelle erstellen, die die Summe der Verk\u00e4ufe und Retouren in jedem Gesch\u00e4ft zusammenfasst.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen dazu die folgende Syntax verwenden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #800080;\"><span style=\"color: #008000;\">\/*create pivot table to summarize sum of sales and returns by store*\/<\/span>\nproc tabulate<\/span> <span style=\"color: #3366ff;\">data<\/span> =my_data;\n    <span style=\"color: #3366ff;\">classstore<\/span> ;\n    <span style=\"color: #3366ff;\">var<\/span> salesreturns;\n    <span style=\"color: #3366ff;\">table<\/span> store, sales returns;\n<span style=\"color: #800080;\">run<\/span> ;<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-33366\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pivotsas2.jpg\" alt=\"Pivot-Tabelle in SAS\" width=\"186\" height=\"174\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Die resultierende Pivot-Tabelle zeigt die Summe der Verk\u00e4ufe und Retouren in jedem Gesch\u00e4ft.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen zum Beispiel sehen:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Die Summe der in Gesch\u00e4ft A get\u00e4tigten Verk\u00e4ufe betr\u00e4gt <strong>38<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Die Summe der Retouren an Gesch\u00e4ft A betr\u00e4gt <strong>4<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Die Summe der in Gesch\u00e4ft B get\u00e4tigten Verk\u00e4ufe betr\u00e4gt <strong>51<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Die Summe der an Filiale B get\u00e4tigten Retouren betr\u00e4gt <strong>13<\/strong> .<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Und so weiter.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Standardm\u00e4\u00dfig berechnet SAS die Summe jeder numerischen Variablen in der Pivot-Tabelle.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Sie k\u00f6nnen jedoch nach jeder numerischen Variablen <strong>*Average<\/strong> eingeben, um den Durchschnittswert zu berechnen:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #800080;\"><span style=\"color: #008000;\">\/*create pivot table to summarize mean of sales and returns by store*\/<\/span>\nproc tabulate<\/span> <span style=\"color: #3366ff;\">data<\/span> =my_data;\n    <span style=\"color: #3366ff;\">classstore<\/span> ;\n    <span style=\"color: #3366ff;\">var<\/span> salesreturns;\n    <span style=\"color: #3366ff;\">table<\/span> store, sales*Mean returns*Mean;\n<span style=\"color: #800080;\">run<\/span> ;<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-33367 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pivotsas3.jpg\" alt=\"\" width=\"172\" height=\"158\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Die resultierende Pivot-Tabelle zeigt die durchschnittlichen Verk\u00e4ufe und Retouren in jedem Gesch\u00e4ft.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen zum Beispiel sehen:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Der durchschnittliche Umsatzwert in Gesch\u00e4ft A betr\u00e4gt <strong>7,6<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Der durchschnittliche Wert der in Filiale A get\u00e4tigten Retouren betr\u00e4gt <strong>0,80<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Der durchschnittliche Umsatzwert in Gesch\u00e4ft B betr\u00e4gt <strong>10,2<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Der durchschnittliche Wert der in Filiale B get\u00e4tigten Retouren betr\u00e4gt <strong>2,6<\/strong> .<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Und so weiter.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In den folgenden Tutorials wird erl\u00e4utert, wie Sie andere h\u00e4ufige Aufgaben in SAS ausf\u00fchren:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/de\/zusammenfassendes-verfahren-in-sas\/\" target=\"_blank\" rel=\"noopener\">So verwenden Sie die Verfahrenszusammenfassung in SAS<\/a><br \/><a href=\"https:\/\/statorials.org\/de\/korrelation-in-der-luftschleuse\/\" target=\"_blank\" rel=\"noopener\">So berechnen Sie die Korrelation in SAS<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/sas-frequenztabelle\/\" target=\"_blank\" rel=\"noopener\">So erstellen Sie H\u00e4ufigkeitstabellen in SAS<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sie k\u00f6nnen PROC TABULATE in SAS verwenden, um Pivot-Tabellen zu erstellen, um Variablen in einem Datensatz zusammenzufassen. Dieses Verfahren verwendet die folgende grundlegende Syntax: proc tabulate data =my_data; class var1; var var2 var3; table var1, var2 var3; run ; Die Klassenanweisung gibt die zu gruppierende Variable an, die var- Anweisung gibt die zusammenzufassenden numerischen Variablen [&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 PivotTables in SAS (mit Beispiel) \u2013 Statistik<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie Sie eine Pivot-Tabelle in SAS erstellen.\" \/>\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\/pivot-tabelle-sas\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So erstellen Sie PivotTables in SAS (mit Beispiel) \u2013 Statistik\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie Sie eine Pivot-Tabelle in SAS erstellen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-12T18:44:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pivotsas1.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\/pivot-tabelle-sas\/\",\"url\":\"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/\",\"name\":\"So erstellen Sie PivotTables in SAS (mit Beispiel) \u2013 Statistik\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-12T18:44:36+00:00\",\"dateModified\":\"2023-07-12T18:44:36+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie Sie eine Pivot-Tabelle in SAS erstellen.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So erstellen sie pivottables in sas (mit beispiel)\"}]},{\"@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 PivotTables in SAS (mit Beispiel) \u2013 Statistik","description":"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie Sie eine Pivot-Tabelle in SAS erstellen.","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\/pivot-tabelle-sas\/","og_locale":"de_DE","og_type":"article","og_title":"So erstellen Sie PivotTables in SAS (mit Beispiel) \u2013 Statistik","og_description":"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie Sie eine Pivot-Tabelle in SAS erstellen.","og_url":"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/","og_site_name":"Statorials","article_published_time":"2023-07-12T18:44:36+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pivotsas1.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\/pivot-tabelle-sas\/","url":"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/","name":"So erstellen Sie PivotTables in SAS (mit Beispiel) \u2013 Statistik","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-12T18:44:36+00:00","dateModified":"2023-07-12T18:44:36+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie Sie eine Pivot-Tabelle in SAS erstellen.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/pivot-tabelle-sas\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/pivot-tabelle-sas\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So erstellen sie pivottables in sas (mit beispiel)"}]},{"@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\/4217"}],"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=4217"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/4217\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=4217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=4217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=4217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}