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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: ttest error message


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: ttest error message
Date   Sat, 16 Mar 2013 08:23:57 +0000

Also check for missings on -Return-. If one decile is in fact all missing, -ttest- can't perform.

Nick

On 15 Mar 2013, at 19:47, Xixi Lin <winnielxx@gmail.com> wrote:

Hi,

I am using the following ttest code; however it shows the error
message:1 group found, 2 required-----what does it mean?

Here is my code:
foreach x in x1 x2 x3 x4 x5 {
foreach z of numlist 2/120 {
foreach j of numlist 10 15 20 25 30 35 40 45 50 55 {
   qui ttest Return if inlist(group_`x',1,10) & Period==`z' &
Sector==`j', by(group_`x') unequal
   display "`x'"   "Period "  "`z'"  "Sector " "`j'"  `r(p_l)'
`r(p)'  `r(p_u)'
}
}
}

Any help is appreciated!

Thanks,
Xixi Lin
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index