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]

st: AW: manual F-test


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: manual F-test
Date   Tue, 20 Apr 2010 18:18:07 +0200

<> 

".  Is there a built in command I don't know about that would make  
this all a lot easier?"



*************
help suest
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von
nolaa@sportmgt.umass.edu
Gesendet: Dienstag, 20. April 2010 18:15
An: statalist@hsphsun2.harvard.edu
Betreff: st: manual F-test

Hi -
    I recently conducted a manual F-test to determine whether I could  
pool both large and small market data.  Test worked great. (see code  
below)
    I now have two questions, the first of which is most important.

1.  I now need to conduct a similar test using -regress- (instead of  
xtpcse). Since Stata does not collect e(n_cf) in -regress- is there a  
way for me to re-write the code to still perform this manual test  
after using -regress-?

2.  Is there a built in command I don't know about that would make  
this all a lot easier?

Thanks,
Nola

-----code-------

* Step 1 F test - only small markets
xtpcse ..etc.. if big==0
display e(rss)
display e(n_cf)
generate rssS = e(rss)
generate KS = e(n_cf)

* Step 2 of F test - only big markets
xtpcse ..etc.. if big==1
display e(rss)
display e(n_cf)
generate rssB = e(rss)
generate KB = e(n_cf)

* Step 3 of F test - all markets (restricted model)
xtpcse ..etc..
display e(rss)
display e(n_cf)
generate rssR = e(rss)
generate KR = e(n_cf)
generate N = e(N)

* Step 4 of F test - do the math
generate rssU = rssS + rssB
generate KU = KS + KB

generate Fcalc = ((rssR-rssU)/(KU-KR))/(rssU/(N-KU))
display Fcalc
*
*   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