Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: error in forval?


From   helen bian <helenbian06@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: error in forval?
Date   Wed, 20 Oct 2010 14:47:44 +0100

Many thanks for all your kind help!

Best wishes,
Helen

On 20 October 2010 12:38, Austin Nichols <austinnichols@gmail.com> wrote:
> helen bian <helenbian06@gmail.com>:
>
> Incorrect numlist; try instead
> forvalues i=1(1)6 {
>  forvalues j=`=`i'+1'/7 {
>  di `i', `j'
>  }
> }
>
> but also note that -prtest- is a poor solution for most problems;
> svy:tab is better (even for non-survey data--just -svyset, srs- first)
> or a -logit- of FLAG_ChoseBestHosp1 on the single dummy variable
> defined by BG_Condition_recode==`i'.
>
> On Wed, Oct 20, 2010 at 7:29 AM, helen bian <helenbian06@gmail.com> wrote:
>> Dear all,
>>
>> Could any one point to me what the problem is in the following for loop, please?
>>
>> forvalues i=1(1)6{
>>  forvalues j= `i'+1 /7{
>>  prtest FLAG_ChoseBestHosp1 if ( BG_Condition_recode==`i'|
>> BG_Condition_recode==`j'), by( BG_Condition_recode)
>>     }
>> }
>>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index