<?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: cross-tab of many variables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639143#M21662</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have a dataset and I want to know if there is some dependency between the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which method SAS offer me to do that ?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Apr 2020 12:07:49 GMT</pubDate>
    <dc:creator>ks94</dc:creator>
    <dc:date>2020-04-11T12:07:49Z</dc:date>
    <item>
      <title>cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/638998#M21629</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please i need help, I have a dataset and i want to cross-tab 8 variables . So how&amp;nbsp; SAS can use SAS to to that ? ANd if i must use contingency tables how can analyze the results ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 16:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/638998#M21629</guid>
      <dc:creator>ks94</dc:creator>
      <dc:date>2020-04-10T16:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639001#M21630</link>
      <description>Could you please provide sample data to help you</description>
      <pubDate>Fri, 10 Apr 2020 16:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639001#M21630</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-04-10T16:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639011#M21633</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I add my code to allow you to better understand my concern.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*creer la bibliotheque*/
libname Prep "/folders/myfolders";
/*1-importer les données*/

proc import 
  datafile="/folders/myfolders/Data_projet_AFRIQUE.csv"
  out=Prep.AFRICA
  replace;
  getnames=yes;
  delimiter=';';
  guessingrows=max;
run;

/*rename the variables */

data PREP.AFRICA;
set PREP.AFRICA (rename=(case=ID_PAYS cc3=ID_PAYS_CC3 country=PAYS 
			year=ANNEE systemic_crisis=FLAG_CRISE_SYSTEMIQUE exch_usd=TAUX_CHANGE_USD 
			domestic_debt_in_default=FLAG_DETTE_INTERIEURE sovereign_external_debt_default=FLAG_DETTE_EXTERIEURE
			gdp_weighted_default=TOTAL_DETTE_PIB inflation_annual_cpi=TAUX_INFLATION
			independence=FLAG_INDEPENDANCE currency_crises=FLAG_CRISE_MONETAIRE
			inflation_crises=FLAG_CRISE_INFLATION banking_crisis=FLAG_CRISE_BANCAIRE
));

run;
/*  I change the type of some variables*/
* numeriques à caracteres*/
data prep.africa;

set prep.africa;

char_FLAG_CRISE_INFLATION = put(FLAG_CRISE_INFLATION, $15.) ;
char_FLAG_CRISE_MONETAIRE = put(FLAG_CRISE_MONETAIRE, $15.) ;
char_FLAG_CRISE_SYSTEMIQUE = put(FLAG_CRISE_SYSTEMIQUE, $15.) ;
char_FLAG_DETTE_EXTERIEURE = put(FLAG_DETTE_EXTERIEURE, $15.) ;
char_FLAG_DETTE_INTERIEURE = put(FLAG_DETTE_INTERIEURE, $15.) ;
char_FLAG_INDEPENDANCE = put(FLAG_INDEPENDANCE, $15.) ;

drop FLAG_CRISE_INFLATION;
drop FLAG_CRISE_MONETAIRE ;
drop FLAG_CRISE_SYSTEMIQUE ;
drop FLAG_DETTE_EXTERIEURE ;
drop FLAG_DETTE_INTERIEURE ;
drop FLAG_INDEPENDANCE ;


rename char_FLAG_CRISE_MONETAIRE=FLAG_CRISE_MONETAIRE ;
rename char_FLAG_CRISE_INFLATION=FLAG_CRISE_INFLATION;
rename char_FLAG_CRISE_SYSTEMIQUE=FLAG_CRISE_SYSTEMIQUE;
rename char_FLAG_DETTE_EXTERIEURE=FLAG_DETTE_EXTERIEURE;
rename char_FLAG_DETTE_INTERIEURE=FLAG_DETTE_INTERIEURE;
rename char_FLAG_INDEPENDANCE=FLAG_INDEPENDANCE;

run;

/*  caracteres à numeriques */
data prep.africa;

set prep.africa;

Num_FLAG_CRISE_BANCAIRE = input(FLAG_CRISE_BANCAIRE,best1. ) ;
Num_TAUX_CHANGE_USD = input(TAUX_CHANGE_USD,best1. ) ;

drop FLAG_CRISE_BANCAIRE;
drop TAUX_CHANGE_USD; 

rename Num_FLAG_CRISE_BANCAIRE=FLAG_CRISE_BANCAIRE;
rename Num_TAUX_CHANGE_USD=TAUX_CHANGE_USD;
run;

/*Now I want ton cross the character variable*/&lt;BR /&gt;/*&amp;nbsp;which&amp;nbsp;are&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;FLAG_CRISE_MONETAIRE  FLAG_CRISE_INFLATION  FLAG_INDEPENDANCE&lt;BR /&gt; FLAG_DETTE_EXTERIEURE FLAG_DETTE_INTERIEURE*FLAG_CRISE_SYSTEMIQUE&lt;BR /&gt;&lt;BR /&gt;*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 16:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639011#M21633</guid>
      <dc:creator>ks94</dc:creator>
      <dc:date>2020-04-10T16:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639012#M21634</link>
      <description>&lt;P&gt;Details matter.&lt;/P&gt;
&lt;P&gt;Do you want a bunch of tables of one variable crossed with another?&lt;/P&gt;
&lt;P&gt;One or more variables crossed with other varibles?&lt;/P&gt;
&lt;P&gt;What goes into the result of the cross tab? Counts, means, percentages (row percentage, column percentage, cell contribution to a table) or other statistics?&lt;/P&gt;
&lt;P&gt;Do any of your variables have missing values? How are they to be treated in terms of the results?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want a data set for further manipulation (unlikely but folks sometimes do) or a report for people to read?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your SAS installation should have a small data set available called SASHELP.CLASS. You could use that to provide examples of what you want (there are only 19 records and 5 variables so not too big to look at).&lt;/P&gt;
&lt;P&gt;Or provide your actual data and describe in much detail what you expect.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 16:39:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639012#M21634</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-10T16:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639017#M21635</link>
      <description>&lt;P&gt;I already have my data. But I don't know enough about SAS. So transcribing my idea with sashelp is really not easy for me.&lt;/P&gt;&lt;P&gt;I have variables and I want to cross them to see if there is independence between the variables.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 17:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639017#M21635</guid>
      <dc:creator>ks94</dc:creator>
      <dc:date>2020-04-10T17:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639052#M21642</link>
      <description>&lt;P&gt;Let's try this again, using variable names which variable gets crosstabbed with which variable? And what information is to be shown in the result of the cross tab?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What definition of "see if there is independence between the variables" are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You went to a lot of effort to create character variables. There are some approaches to that "independence" question that are more amenable for numeric values, see PROC CORR.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 20:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639052#M21642</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-10T20:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639054#M21643</link>
      <description>the variables that i want to gets crosstab are:&lt;BR /&gt;-FLAG_CRISE_MONETAIRE&lt;BR /&gt;- FLAG_CRISE_INFLATION&lt;BR /&gt;-FLAG_INDEPENDANCE&lt;BR /&gt;-FLAG_DETTE_EXTERIEURE&lt;BR /&gt;-FLAG_DETTE_INTERIEURE&lt;BR /&gt;-FLAG_CRISE_SYSTEMIQUE&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Apr 2020 20:32:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639054#M21643</guid>
      <dc:creator>ks94</dc:creator>
      <dc:date>2020-04-10T20:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: cross-tab of many variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639143#M21662</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a dataset and I want to know if there is some dependency between the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which method SAS offer me to do that ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2020 12:07:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/cross-tab-of-many-variables/m-p/639143#M21662</guid>
      <dc:creator>ks94</dc:creator>
      <dc:date>2020-04-11T12:07:49Z</dc:date>
    </item>
  </channel>
</rss>

