Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: CLAD error message and coefficient interpretation


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: CLAD error message and coefficient interpretation
Date   Thu, 1 Jun 2006 16:55:05 -0500

-clad- is written by Dean Jolliffe, Bohdan Krushelnytskyy, and Anastassia
Semykina (see http://users.starpower.net/djolliffe/cv/cv.htm for his
"Censored Least Absolute Deviations Estimator: CLAD." Stata Technical
Bulletin,).

Yes, the problem is that -clad- is not handling collinear variables very
gracefully.  The collinear variables are dropped when -qreg- is used but
then the original varlist is passed to -postfile- which complains that not
all the variables are present.  -set trace on- will show you what is
happening as -clad- runs.  You could use -_rmcoll- to remove the collinear
variables before call -clad-.  

An alternative program (rough draft), -cqreg2- is presented below; it makes
use of Joao Pedro Azevedo's very useful -grqreg-.

Two good introductions to quantile regression are 

Koenker, R. and K. Hallock, (2001) "Quantile Regression", Journal of
Economic Perspectives, 15, 143-156. 

Cade, B. and B. Noon, (2003) "A Gentle Introduction to Quantile Regression
for Ecologists". Frontiers in Ecology and the Environment, 1, 412-420.

Both of these papers are available Roger Koenker's site 

http://www.econ.uiuc.edu/~roger/research/rq/rq.html



Scott


---------------------------------------------------------
*!1.0.0 June 1, 2006 Scott Merryman
program cqreg2 
version 9.2
	syntax varlist(min=1) [if] [, Quantile(real 0.5)  ll(real 0) bs
reps(integer  100) save(string) grqreg]

tempvar yhat 
tokenize `varlist'
local lhs "`1'"
mac shift
local rhs "`*'"
		
preserve
qui {
qreg `lhs' `rhs' `if', q(`quantile')

predict `yhat'
sum `hat'
tempvar tag
while  r(min) < `ll' {
	keep if  `yhat' >= `ll'
	qui qreg `lhs' `rhs' `if', quantile(`quantile' )
	qui drop `yhat'  
	predict `yhat' if e(sample)
	qui sum `yhat' if e(sample)
}
}
if "`bs'" == "bs" {
	bsqreg `lhs' `rhs' `if', quantile(`quantile' ) reps(`reps')
	}
else {
	qreg 
}
if "`grqreg'" != "" {
	grqreg, ci
}
if "`save'" != "" {
	disp ""
	save "`save'", replace
	}

end

------------------------------------------


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Kevin McCourt
> Sent: Monday, May 22, 2006 1:36 PM
> To: [email protected]
> Subject: st: CLAD error message and coefficient interpretation
> 
> Hi everyone,
> 
> I have two questions regarding STATA's CLAD procedure.
> 
> Firstly, I have a censored dependent variable--it is
> fraction of plant capacity used. My data set is a
> panel of 10 years tracking about 30 different timber
> processing factories. Model specification requires
> fixed effects and I definitely have heteroskedasticity
> so tobit does not do what I need. I read Chay &
> Powell's paper and I think they might just provide the
> solution to my problem. When I input my data and run
> the model, I get an error that states one of my dummy
> variables that identifies one of the plants is
> missing. The variable IS there. Depending on the model
> specification (that is, what other explanatory
> variables I include), I get the same error message but
> for varying dummy variables. It is always the same
> message--"factoryZ not found" (where factoryZ is the
> name of the dummy). I have a suspicion this is caused
> by collinearity, because when I remove some of the
> variables the error is resolved. How can I know for
> sure what is going wrong? This error happens
> regardless of whether I use CLAD or CQREG (chay &
> powell's version).
> 
> Also, how do I interpret the coefficients? Are they
> likelihood ratios or are they in units of my dependent
> variable? My dependent variable goes from 0 to 1.02. I
> ask this because one of the coefficients is 1.2 and I
> have a hard time understanding what it really implies.
> Also, should I use the BIAS value and substract it
> from the coefficient?
> 
> thank you all in advance,
> 
> Kevin McCourt
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> *
> *   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/



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