Bookmark and Share

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: combining results from -tabulate- and -bitest- in the same table


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   Re: st: combining results from -tabulate- and -bitest- in the same table
Date   Thu, 7 Nov 2013 11:34:45 -0800

Sorry Nick, the syntax was supposed to be
	. bysort box:	bitest uti=.2
and I want to combine this per row in a table with a tabulation of another variable, called correct.
Both results will be in a table stratified per row, with a third figure, the calculated confidence interval.

What I'm seeking to do is, stratified by level of the variable -station-, display the value for variable -correct- and its 95%CI.

Thank you also for pointing out your article!


Best wishes,
Michael McCulloch

--
Pine Street Foundation, since 1989
124 Pine Street | San Anselmo | California | 94960-2674  
P: (415) 407-1357 | F: (206) 338-2391 | http://www.PineStreetFoundation.org

On Nov 4, 2013, at 10:39 AM, Nick Cox wrote:

> I don't understand the syntax
> 
> bitest uti=.> 2
> 
> In principle, I would loop over values of -station- and print one line
> at a time. The fact that you can get chunks of what you want
> separately is mostly a red herring, as you still face the problem of
> putting them together without  a lot of editing.
> 
> Some of the tips in
> 
> SJ-12-1 pr0053  . . . . . . . . . . . . . . .  Speaking Stata: Output to order
>        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
>        Q1/12   SJ 12(1):147--158                                (no commands)
>        shows basic tips and tricks for presenting Stata output
>        in a different way
> 
> may help.
> 
> Nick
> [email protected]
> 
> 
> On 4 November 2013 16:29, Michael McCulloch <[email protected]> wrote:
>> Apologies for previous incomplete posting. Here is the full message:
>> 
>> I have data of the structure shown below.
>> 
>>   station   uti   correct
>>         4     1         1
>>         5     0         1
>>         1     1         1
>>         1     0         1
>>         3     0         1
>>         3     0         1
>>         4     0         1
>>         2     0         1
>>         3     0         1
>>         5     0         1
>>         3     0         1
>>         4     0         0
>>         5     0         1
>>         1     1         1
>>         1     1         1
>>         2     0         1
>>         3     0         1
>>         1     0         1
>>         1     0         1
>>         4     0         1
>>         1     0         1
>>         2     0         1
>> 
>> I wish to combine results of two different tests in the same table generated by Stata. I wish to learn this technique because the table will need to be generated many times from different datasets. The table I envision has the following structure:
>> 
>>        Column A        -bysort station: bitest uti=.> 2-
>>        Column B        -tab station correct, row-
>>        Column C        confidence intervals for -correct-, stratified by -station-, based on the normal approximation, p+/-1.96(sqrt(p(1-p)/n))
>> 
>> Is this possible to do?
>> 
>> 
>> 
>> 
>> Best wishes,
>> Michael McCulloch
>> 
>> --
>> Pine Street Foundation, since 1989
>> 124 Pine Street | San Anselmo | California | 94960-2674
>> P: (415) 407-1357 | F: (206) 338-2391 | http://www.PineStreetFoundation.org
>> 
>> 
>> *
>> *   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/
> *
> *   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/


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index