title: Calculating three-way tables with percentages
body: <p>How can I create a three-way table in Stata but with percentages rather than  frequencies? </p>
  
  <p>For example:</p>
  
  <pre><code>table var mcdstr year if inlist(year,1900,1930) &amp;  ///
                            inlist(mcdstr,"BRONX","BROOKLYN","MANHATTAN","QUEENS","RICHMOND")
  </code></pre>
  
  <p>To my understanding the <code>table</code> command does not have a built in frequency function.</p>
  
  <p>As an alternative, I used the <em>community-contributed</em> command <code>tabout</code>:</p>
  
  <pre><code>tabout lit mcdstr year if inlist(year,1910,1930) &amp; ///
                            inlist(mcdstr,"BRONX","BROOKLYN","MANHATTAN","QUEENS","RICHMOND") ///
                            using table1.text, cells(freq col cum) format(0 1) ///
                            clab(No. Col_% Cum_%) 
  </code></pre>
  
  <p>However the aforementioned syntax does not create a three-way table.</p>