Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: LM (score) test for omitted variable after probit


From   nick bungy <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: LM (score) test for omitted variable after probit
Date   Fri, 5 Apr 2013 09:28:37 +0100

It looks correct to me. 
Alternatively, you can calculate the generalised residual manually by using a conditional function:
gen GeneralisedResidual = cond(y==1, normalden(xb)/normal(xb1), -normalden(xb)/(1-normal(xb)))
where the first function after 'y==1' is evaluated if y=1 and the second is evaluated if y=0.


---------------------------------------- > Date: Thu, 4 Apr 2013 22:43:25 +0100 > Subject: st: LM (score) test for omitted variable after probit > From: [email protected] > To: [email protected] > > Dear Statalist, > > I am trying to run an LM (score) test for an omitted relevant variable > after running a probit using the probit command with STATA 12 IC. > > My first question is does anyone know if there is a user-written > command out there which will do this? Looking through the archive, I > can see there used to be a command called -testomit- written by Jeroen > Weesie which did this but using -ssc install testomit- and -findit > testomit- doesn't yield any results. I found a webpage which said this > command was no longer available in STATA. > > My second question is would this be the right way of going about doing > the LM test for an omitted variable "manually" in STATA after a probit > in the absence of such a command: > > gen constant=1 > probit y!
  x1 x2 x3 > predict genres, score > gen gen1=genres*x1 > gen gen2=genres*x2 > gen gen3=genres*x3 > > *Here i am calling x4 the omitted variable to be tested* > gen gen4=genres*x4 > > reg cons genres gen1 gen2 gen3 gen4, nocons > di "chi2(1)=" e(N)*e(r2) > di "prob>chi2 = " chi2tail(1,e(N)*e(r2)) > > Many Thanks for your help, > > Jamie > * > * 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index