<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The best way to handle  a dataset where where we have countries that are also involved in an oth in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927025#M10775</link>
    <description>&lt;P&gt;I cannot figure out what you are asking.&amp;nbsp; I cannot figure out what data you have.&lt;/P&gt;
&lt;P&gt;Are you asking how to make a dataset to record the information?&lt;/P&gt;
&lt;P&gt;Or do you already have a dataset and are asking how to analyze it?&amp;nbsp; If so then what is the dataset you have?&amp;nbsp; What are the variable names, their types and how many observations do you have?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here a pure guess about what you might have based on snippets of information pull from different parts of your question:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length compary country $20 year value 8 currency $10 ;
  input company -- currency ;
cards;
A Spain 2000 100 Euro
A France 2000 200 Euro
B US 2002 300 Dollar
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Am I close to guessing what your data look like?&lt;/P&gt;</description>
    <pubDate>Sat, 04 May 2024 14:44:54 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-05-04T14:44:54Z</dc:date>
    <item>
      <title>The best way to handle  a dataset where where we have countries that are also involved in an other?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927020#M10774</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I have a dataset where the year goes from [2000,2015] where I have these countries:&amp;nbsp;&lt;BR /&gt;Spain, France, Denmark and European Union and let's say two colomns;&lt;SPAN&gt;&amp;nbsp;company='A' and 'B' and value='dollar'&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Q1: if Spain for company A have average vaule 0.288&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Denmark also&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; France also&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for aaaalll of the 15 years. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BUT! We have EU (recall, France, Spain, Denmark are all in European Union (EU)) and for one (1) year EU have the avarage for the same company A, have tha average vaule at 1,000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Q2:&amp;nbsp; For company B;,&amp;nbsp;France, Spain, Denmark and&amp;nbsp; European Union (EU)) have data from [2000,2015] and have ~the same avarage all the four, how to solve that issue besT?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 14:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927020#M10774</guid>
      <dc:creator>cleokatt</dc:creator>
      <dc:date>2024-05-04T14:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927025#M10775</link>
      <description>&lt;P&gt;I cannot figure out what you are asking.&amp;nbsp; I cannot figure out what data you have.&lt;/P&gt;
&lt;P&gt;Are you asking how to make a dataset to record the information?&lt;/P&gt;
&lt;P&gt;Or do you already have a dataset and are asking how to analyze it?&amp;nbsp; If so then what is the dataset you have?&amp;nbsp; What are the variable names, their types and how many observations do you have?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here a pure guess about what you might have based on snippets of information pull from different parts of your question:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length compary country $20 year value 8 currency $10 ;
  input company -- currency ;
cards;
A Spain 2000 100 Euro
A France 2000 200 Euro
B US 2002 300 Dollar
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Am I close to guessing what your data look like?&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 14:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927025#M10775</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-04T14:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927027#M10776</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My dataset have #obs=3000~ and it looks like this: this is just me and my fiction data that I just trying to be better so I can become an data analyst, and let's say that we have a data set like this?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;avg(value)&lt;/TD&gt;&lt;TD&gt;how many we have data years&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;TD&gt;0.11&lt;/TD&gt;&lt;TD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;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-EU Europe&lt;/TD&gt;&lt;TD&gt;Non-EU Europe&lt;/TD&gt;&lt;TD&gt;1.0&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;Schweiz&lt;/TD&gt;&lt;TD&gt;0.8&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;EU&lt;/TD&gt;&lt;TD&gt;European Union&lt;/TD&gt;&lt;TD&gt;1.0&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See? Germany and France are in EU but we have "in total" a row that have the name EU, isn't that a bias? How to solve that?&lt;BR /&gt;&lt;BR /&gt;And for Ukraine example, it only have data for 3years, how to solve that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And how about the row "World" all of the countires above is in the world, how to solve that?&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 15:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927027#M10776</guid>
      <dc:creator>cleokatt</dc:creator>
      <dc:date>2024-05-04T15:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927039#M10777</link>
      <description>&lt;P&gt;Still not communicating clearly.&lt;/P&gt;
&lt;P&gt;First let's convert your LISTING into an actual dataset.&amp;nbsp; A dataset cannot have two variables with the same name. And you don't want to use variable names that have parentheses and other strange characters in them.&amp;nbsp; You could put such text in to the variable's LABEL if you want so that it can be used to make other pretty listings.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards dsd dlm='|' truncover;
  input country1 :$20. country2 :$20. value years;
cards;
DE|Germany|0.11|14
CA|Canada|0.2|15
NO|Norway|2.0|16
FR|France|0.11|15
TR|Turkey|0.11|15
UA|Ukraine|0.11|3
World|World|1.00|16
ID|Indonesia|0.5|9
IN|India|0.5|15
GB|United Kingdom|0.8|15
Non-EU Europe|Non-EU Europe|1.0|15
CH|Schweiz|0.8|9
EU|European Union|1.0|15
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now what is the question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Is the goal to create such data?&amp;nbsp; If so what does the SOURCE data look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Is the goal to use such data? If so what is it you want to create? Do you just want to make a REPORT (textual or graphical)?&amp;nbsp; Or do you need to generate some aggregated data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that perhaps you are trying to ask how to summarize data across multiple dimensions.&amp;nbsp; So perhaps you want the average for each country but also an average for all countries in one region (geographical regions such as Europe or North America.&amp;nbsp; or perhaps political regions such as the EU.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS has lots of features to help with that question.&amp;nbsp; Which to use depends on how you have the source data and what type of report you want to produce.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 17:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927039#M10777</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-04T17:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927044#M10778</link>
      <description>Just want to learn how to solve this kind of dataset &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;but say just for generate some aggregated data</description>
      <pubDate>Sat, 04 May 2024 18:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927044#M10778</guid>
      <dc:creator>cleokatt</dc:creator>
      <dc:date>2024-05-04T18:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927049#M10779</link>
      <description>&lt;P&gt;We can't provide a solution, without more of a question.&amp;nbsp; We can't solve a dataset, but we can solve a question about how to get some specific information from a dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At a high level, I agree with your thought that having rows in the data for Country='World' and Country='EU' is&amp;nbsp; a bad idea.&amp;nbsp; They're not countries.&amp;nbsp; If you want to calculate and average value for all countries using PROC MEANS, you would not want to have rows for World and EU be included in that calculation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I were given that dataset, my first thought would be to delete the rows that are not actually countries.&amp;nbsp; But whether I did that or not would depend on my goal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a single dataset, I only want one level of aggregation.&amp;nbsp; I might have a dataset for country information, and another dataset for city information, and another for region information.&amp;nbsp; But I wouldn't want a dataset where some rows are for countries, some are for cities, and some are for regions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 19:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927049#M10779</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-05-04T19:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927083#M10781</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;In a single dataset, I only want one level of aggregation.&amp;nbsp; I might have a dataset for country information, and another dataset for city information, and another for region information.&amp;nbsp; But I wouldn't want a dataset where some rows are for countries, some are for cities, and some are for regions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So you would split the dataset into three different sets?&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2024 10:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927083#M10781</guid>
      <dc:creator>cleokatt</dc:creator>
      <dc:date>2024-05-05T10:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to handle  a dataset where where we have countries that are also involved in an oth</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927096#M10782</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/432082"&gt;@cleokatt&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So you would split the dataset into three different sets?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is possible.&amp;nbsp; But it might be easier to just have one dataset that uses two ID variables to identify the observations.&amp;nbsp; One could indicate the TYPE of region and other the NAME of the region.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  infile card dsd truncover;
  input region_type :$10. region_name :$30.  value;
cards;
country,USA,100
country,ENGLAND,200
continent,EUROPE,300
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 May 2024 14:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/The-best-way-to-handle-a-dataset-where-where-we-have-countries/m-p/927096#M10782</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-05T14:48:52Z</dc:date>
    </item>
  </channel>
</rss>

