Jian Zhang:
Your data has very extreme values and ones you know var5, var6 doesn't add enough information. I would perform the following transformations:
o I would add either var5 or var6, but not both
o I would either recode var5 as a dummy distinguishing between zero and non zero values or if the sign is really important I would accept that I just don't have enough cases to make such a distinction and not add that variable at all.
o I would replace var1 and var3 with their natural logarithms to "tug in" the outliers.
see example below:
*----- begin example -----
input /*
*/var1 var3 var5 var6
1 789 0 0
3 45 0 0
5 2358 -4 4
4 65 0 0
5 12 14 -7
453 12 0 0
6 4 0 0
45 2 0 0
8 3 -123 123
897 5 0 0
43 87 0 0
43 56 0 0
4 25 0 0
end
gen lnvar1 = ln(var1)
gen dvar5 = var5!=0
gen lnvar3=ln(var3)
reg lnvar1 lnvar3 dvar5
predict yhatnew
twoway scatter lnvar1 lnvar3 if dvar5==0 || /*
*/ scatter lnvar1 lnvar3 if dvar5==1 || /*
*/ line yhatnew lnvar3 if dvar==0, sort || /*
*/ line yhatnew lnvar3 if dvar==1, sort /*
*/ name(newdata)
reg var1 var3 dvar5
predict yhatold
twoway scatter var1 var3 if dvar5==0 || /*
*/ scatter var1 var3 if dvar5==1 || /*
*/ line yhatold var3 if dvar==0, sort || /*
*/ line yhatold var3 if dvar==1, sort /*
*/ name(olddata)
*------- end example -------
HTH,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Jian Zhang
Sent: vrijdag 18 augustus 2006 1:51
To: [email protected]
Subject: st: why is F statistic still missing even though there is no singleton dummy problem?
Dear Statalisters,
I am running a ols regression on a small data set. The reported F statistic is still mssing
although the data set doesn' have so-called singleton dummies. Is there anyone knowing what is
going on? Here are the data set and the regression results. Many thanks!
. list var1 var3 var5 var6
+---------------------------+
var1 var3 var5 var6
---------------------------
1. 1 789 0 0
2. 3 45 0 0
3. 5 2358 -4 4
4. 4 65 0 0
5. 5 12 14 -7
---------------------------
6. 453 12 0 0
7. 6 4 0 0
8. 45 2 0 0
9. 8 3 -123 123
10. 897 5 0 0
---------------------------
11. 43 87 0 0
12. 43 56 0 0
13. 4 25 0 0
+---------------------------+
reg var1 var3 var5 var6, robust nocons
Linear regression Number of obs = 13
F( 2, 10) = .
Prob > F = .
R-squared = 0.0002
Root MSE = 318.67
Robust
var1 Coef. Std. Err. t P>t [95% Conf. Interval]
var3 .0046225 .0031 1.49 0.167 -.0022847 .0115297
var5 .7696625 .0060938 126.30 0.000 .7560848 .7832403
var6 .8329636 .007418 112.29 0.000 .8164353 .8494919
Best regards,
Jian Zhang
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/