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

From |
"vmz@vol.net.mt" <vmz@vol.net.mt> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: Uncorrelated observations |

Date |
Tue, 20 Oct 2009 20:47:01 +0100 |

Dear Statalisters, I am going over Microeconometrics Using Stata by A.Colin Cameron & Pravin K.Trivedi ,and I have been trying hard to understand what is meant by the 3rd assumption,on page 81, E(UiUj | Xi , Xj) = 0 ,i~=j,(conditionally uncorrelated observations) .I have generated the following data to get some insight on the purpose of this assumption,but I am getting nowhere.I have written the following two programs trying to shed some light,but i am not pleased with the output. *First program : version 9 drop _all set obs 30000 set seed 1267655 gen Xi = invnorm(uniform())*10+100 qui summ Xi gen Ui = Xi-r(mean) keep in 1/15000 drop Xi gen n = _n sort n save Ui,replace drop _all set obs 30000 set seed 1267655 gen Xj = invnorm(uniform())*10+100 qui summ Xj gen Uj = Xj-r(mean) keep in 15001/30000 drop Xj gen n = _n sort n save Uj,replace use Ui,clear merge n using Uj drop _merge drop n gen UiUj = Ui*Uj summ * Note that this demonstrates the first assumption,that E(Ui | Xi)= 0 (exogeneity of regressors) is demonstrated) * since (.023252 -.0232521)/2 = 0 ,which is the expected values of the full 30000 observations. * The expected value of the 15000 pairs of observations,is -.1155355 ,which is way off from zero. *Second Program version 9 drop _all set obs 30000 set seed 1267655 gen Xi = invnorm(uniform())*10+100 gen Xj = Xi[_n-1] qui summ Xi replace Xi = Xi-r(mean) rename Xi Ui qui summ Xj replace Xj = Xj-r(mean) rename Xj Uj summ gen UiUj = Ui*Uj summ * Again,the mean (expected value) of Ui is zero ,but that of Ui*Uj is 1795954. * This is making me think that there is something basic that I am not following. * Can anyone help me with this.I thank you before hand.Victor M.Zammit * * 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/

**References**:**RE: st: Elements of Statistical Learning***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st: Is a "merge, if" possible?** - Next by Date:
**Re: st: Reading the output of xtmelogit** - Previous by thread:
**RE: st: Elements of Statistical Learning** - Next by thread:
**Re: st: Elements of Statistical Learning** - Index(es):

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