Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: summary tables for categorical variables
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: summary tables for categorical variables
Date
Wed, 12 Feb 2014 00:26:55 +0000
I don't know what -tabw- is, but I didn't recommend it.
-tabm- from -tab_chi- offers the options of -tabulate-. The help explains:
tabulate_options are options allowed with tabulate varname1 varname2.
Consider
set obs 100
forval j = 1/9 {
gen y`j' = ceil(10 * runiform())
}
tabm y*, row
tabm y*, col
Nick
[email protected]
On 11 February 2014 22:58, Donald Spady <[email protected]> wrote:
> Nick. Thanks for the fast response. Your suggestion of mrtab is close, but not quite what I need. mrtab puts the variables down the left side of the table, but only gives a summary of the frequency of the responses. I want to have (for e.g. 6 columns: 1 for the variable name and 5 for the possible responses (e.g. SA A N D SD). I dont see any option within mrtab to do that.
> I looked at tabw which is much closer to what is needed, but it does not give the option of say percentage rather than frequency. I know that is nitpicking, but Stata is so extensible I wonder if anyone has looked at this.
On Feb 11, 2014, at 1:40 PM, Nick Cox <[email protected]> wrote:
>> Sounds like
>>
>> -mrtab- (SJ)
>>
>> -tabm- (-tab_chi- on SSC)
On 11 February 2014 20:23, Donald Spady <[email protected]> wrote:
>>> I want to create a table for categorical variables that is something like tabstat where the variable names are in a left hand column and, instead of statistics in the columns to the right, I want the contents of the categories that the variable contains.
>>> For example
>>> Varname "likeDon" SA:10, A:5, N:3, D:1 SD 2 Miss/NA: 2
>>> varname "likeNick" SA:50, A;20, N:3, D:12, SD: 0 Miss/NA:4
>>> varname "likeSue" and so on
>>> where SA A N D and SD are the possible responses.
>>>
>>> Is there anything in Stata that can do this. If so, what and how?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/