[R] function censReg in panel data setting

Arne Henningsen arne.henningsen at googlemail.com
Wed Sep 7 13:44:27 CEST 2011


Dear Igors

On 7 September 2011 10:39, Igors <igors.lahanciks at gmail.com> wrote:
> However I am still struggling to obtain model estmates.
>
> The same code:
>
>> UpC <- censReg(Power ~ Windspeed, left = -Inf, right =
>> 2000,data=PData_In,method="BHHH",nGHQ = 4,start=c(-691.18,186.79,3.9,3.9))
>
> Error in maxNRCompute(fn = logLikAttr, fnOrig = fn, gradOrig = grad,
> hessOrig = hess,  :
>  NA in the initial gradient
>
>
> I have tried to change starting values and regressors in the model several
> times, but I always get the same mentioned error message. How can I make it
> work?  Is this function maxNRCompute() on the last step of calculation
> (maximization of the ML)?
>
> I had an idea that the error could appear since I have huge sample, but I
> tried to cut it and it still doesn't work.

It is hard to figure out the cause of this error without a
reproducible example. Is is possible that you send a reproducible
example to me?

Could it be that there are NAs in the data or something in the panel
data specification is not as censReg() expects it?

/Arne

-- 
Arne Henningsen
http://www.arne-henningsen.name



More information about the R-help mailing list