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]

st: Re: quantile regression with IV


From   xueliansharon <[email protected]>
To   [email protected]
Subject   st: Re: quantile regression with IV
Date   Fri, 2 Jul 2010 13:52:51 -0700 (PDT)

Hi, Austin,

Thanks a lot for your information. They are quite helpful! 

I adjust my codes, but I meet new problem now: I get an error message
"Convergence not achieved" and thus no results show up. I can't understand
why this happens. Could you please help me?  Thanks a lot.

My new codes:

sysuse auto, clear 
        program drop qregivb
        program qregivb, eclass 
        version 11.1 

        // Stage 1 
		tempvar pricehat
        regress price foreign weight length 
       	 predict `pricehat', xb 

        // Stage 2 
        foreach q of numlist 10 20 30 { 
                qreg mpg foreign `pricehat', quantile (`q') 
				
				matrix b`q'=e(b)
				matrix colnames b`q'=q`q':
				matrix b=nullmat(b), b`q'
                } 
		gen e=e(sample)
		qui count if e
		eret post b, dep(sch) es(e) obs(`r(N)')
		ereturn local cmd "schrural19"
		ereturn local properties "b"
		
        end 

        bootstrap _b , reps(1000) seed(10101) nodots: qregivb

Regards,
Sharon

-- 
View this message in context: http://statalist.1588530.n2.nabble.com/quantile-regression-with-IV-tp5245688p5249244.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index