<?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: request for help in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/request-for-help/m-p/23148#M3616</link>
    <description>No idea how you get the sums in your examples with the data you give us.&lt;BR /&gt;
&lt;BR /&gt;
The following code might give you some hints of how to tackle this challenge:&lt;BR /&gt;
&lt;BR /&gt;
data have;&lt;BR /&gt;
infile datalines dlm=' ' dsd truncover;&lt;BR /&gt;
input&lt;BR /&gt;
paper1 paper2 paper3 paper4 web1 web2 web3 radio1 radio2 tv1 tv2 age gender;&lt;BR /&gt;
anytwopapers= (sum(of paper:)=2);&lt;BR /&gt;
radio= (sum(of radio:)&amp;gt;1);&lt;BR /&gt;
tv= (sum(of tv:)&amp;gt;1);&lt;BR /&gt;
web= (sum(of web:)&amp;gt;1);&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 0 1 0 1 0 0 1 1 0 1 2 1&lt;BR /&gt;
1 1 0 0 0 1 0 0 1 1 1 3 2&lt;BR /&gt;
1 1 1 0 1 1 1 0 0 0 1 4 1&lt;BR /&gt;
0 1 0 1 1 1 0 0 1 0 1 1 2 &lt;BR /&gt;
0 0 1 1 0 1 0 1 0 0 1 2 2&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
  value gender&lt;BR /&gt;
    1='Male'&lt;BR /&gt;
    2='Female'&lt;BR /&gt;
    other='?'&lt;BR /&gt;
  ;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
proc tabulate data=have format=8. noseps;&lt;BR /&gt;
  where anytwopapers=1 and (radio=1 or tv=1 or web=1);&lt;BR /&gt;
  class age gender anytwopapers radio tv web;&lt;BR /&gt;
  format gender gender.;&lt;BR /&gt;
  keylabel n=' ' ;&lt;BR /&gt;
  table age all='Total', (gender all='Total')*(anytwopapers radio tv web )&lt;BR /&gt;
    /rts=10;&lt;BR /&gt;
run;

Message was edited by: Patrick</description>
    <pubDate>Tue, 18 May 2010 09:13:59 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2010-05-18T09:13:59Z</dc:date>
    <item>
      <title>request for help</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/request-for-help/m-p/23147#M3615</link>
      <description>Hi could any one suggest the solution&lt;BR /&gt;
i have data set with the following media variables&lt;BR /&gt;
newspaer1 paper2  paper3  paper4  web1  web2  web3  radio1 radio2  tv1  tv2 age gender&lt;BR /&gt;
1 0 1 0 1 0 0 1 1 0 1 2 1&lt;BR /&gt;
1 1 0 0 0 1 0 0 1 1 1 3 2&lt;BR /&gt;
1 1 1 0 1 1 1 0 0 0 1 4 1&lt;BR /&gt;
0 1 0 1 1 1 0 0 1 0 1 1 2 &lt;BR /&gt;
0 0 1 1 0 1 0 1 0 0 1 2 2&lt;BR /&gt;
&lt;BR /&gt;
i would like to find out cross overs between variables - let us say&lt;BR /&gt;
how many people read any two news papers and watch web/tv/radio vise versa&lt;BR /&gt;
then&lt;BR /&gt;
age vs. gender wise cross sections&lt;BR /&gt;
&lt;BR /&gt;
for papers,web,radio,tv 1- read, 0-don't read&lt;BR /&gt;
for age 1: 18-24 , 2: 25-34.........&lt;BR /&gt;
for gender 1 male, 2 female&lt;BR /&gt;
&lt;BR /&gt;
i would like to see my out put&lt;BR /&gt;
1.&lt;BR /&gt;
&lt;BR /&gt;
anytwonewspapers   radio    tv   web&lt;BR /&gt;
15                           5       6       8&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
output 2.&lt;BR /&gt;
web     radio   tv    newspapers1&lt;BR /&gt;
15        8       9         25&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
output3:&lt;BR /&gt;
&lt;BR /&gt;
news papers1xpaper2/paper3/paper4   radio   tv  web&lt;BR /&gt;
10                                                     3             8&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
i tried through summary tables but i couldn't able to figure out.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks in-advance&lt;BR /&gt;
ps</description>
      <pubDate>Mon, 17 May 2010 15:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/request-for-help/m-p/23147#M3615</guid>
      <dc:creator>ssas</dc:creator>
      <dc:date>2010-05-17T15:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: request for help</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/request-for-help/m-p/23148#M3616</link>
      <description>No idea how you get the sums in your examples with the data you give us.&lt;BR /&gt;
&lt;BR /&gt;
The following code might give you some hints of how to tackle this challenge:&lt;BR /&gt;
&lt;BR /&gt;
data have;&lt;BR /&gt;
infile datalines dlm=' ' dsd truncover;&lt;BR /&gt;
input&lt;BR /&gt;
paper1 paper2 paper3 paper4 web1 web2 web3 radio1 radio2 tv1 tv2 age gender;&lt;BR /&gt;
anytwopapers= (sum(of paper:)=2);&lt;BR /&gt;
radio= (sum(of radio:)&amp;gt;1);&lt;BR /&gt;
tv= (sum(of tv:)&amp;gt;1);&lt;BR /&gt;
web= (sum(of web:)&amp;gt;1);&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 0 1 0 1 0 0 1 1 0 1 2 1&lt;BR /&gt;
1 1 0 0 0 1 0 0 1 1 1 3 2&lt;BR /&gt;
1 1 1 0 1 1 1 0 0 0 1 4 1&lt;BR /&gt;
0 1 0 1 1 1 0 0 1 0 1 1 2 &lt;BR /&gt;
0 0 1 1 0 1 0 1 0 0 1 2 2&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
  value gender&lt;BR /&gt;
    1='Male'&lt;BR /&gt;
    2='Female'&lt;BR /&gt;
    other='?'&lt;BR /&gt;
  ;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
proc tabulate data=have format=8. noseps;&lt;BR /&gt;
  where anytwopapers=1 and (radio=1 or tv=1 or web=1);&lt;BR /&gt;
  class age gender anytwopapers radio tv web;&lt;BR /&gt;
  format gender gender.;&lt;BR /&gt;
  keylabel n=' ' ;&lt;BR /&gt;
  table age all='Total', (gender all='Total')*(anytwopapers radio tv web )&lt;BR /&gt;
    /rts=10;&lt;BR /&gt;
run;

Message was edited by: Patrick</description>
      <pubDate>Tue, 18 May 2010 09:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/request-for-help/m-p/23148#M3616</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-05-18T09:13:59Z</dc:date>
    </item>
  </channel>
</rss>

