Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: RE: Re: Initial values not feasible and -ufrom()- option.


From   Weihua Guan <wguan@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: RE: Re: Initial values not feasible and -ufrom()- option.
Date   Thu, 10 Jul 2003 13:45:00 -0500

--"Wu, Xun" <WuX@wharton.upenn.edu> wrote,


> I did try to delete "copy", but then I got the message " ufrom() must
> specify a 1 x 31 matrix". Like I said in the last email, I followed David's
> method and created a 1*30 matrix, but why -ufrom()- asked for a 1*31 matrix?
> 
> It is like, for instance, David created a 1*5 matrix of initial values, but
> -ufrom()- asked for a 1*6 matrix.

and here is how Xun generated the matrix:

> I follow David Drucker's method to feed my own initial values:
> 1. Run OLS
> 2. matrix b0 = e(b), ln(e(rmse)^2), .1
> 3. I add option to the frontier command: distribution(tnormal) ufrom(b0,
> copy)

-ufrom()- requires a 1XK matrix for the starting values, where K is the number
of parameters to be estimated.  In the truncated-normal model, the parameters
includes the the coefficients of the covariate (including the constant term),
the "mean" and variance of the truncated normal distribution, and the variance
of the random noise.  Therefore, Xun needs 3 extra parameters after running
the OLS regression, but he only specified 2, i.e., ln(e(rmse)^2) and .1.

BTW, in David's example
(http://www.stata.com/statalist/archive/2003-05/msg00650.html), he fitted a
half-normal model, which only estimates two extra parameters besides the
coefficients on the covariates.  That is why David only added 2 values to e(b)
as the starting values.  Xun may see [R]-frontier- for more information.


Weihua Guan <wguan@stata.com> 
Stata Corp.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index