Dear Igors

On 5 September 2011 23:58, Igors <igors.lahanc...@gmail.com> wrote:
> I have a problem estimating Random Effects model using censReg function.
>
> small part of code:
>
> UpC <- censReg(Power ~ Windspeed, left = -Inf, right =
> 2000,data=PData_In,method="BHHH",nGHQ = 4)
>
> Error in maxNRCompute(fn = logLikAttr, fnOrig = fn, gradOrig = grad,
> hessOrig = hess,  :
>  NA in the initial gradient
>
>
> ...then I tried to set starting values myself and here is the error what I
> got:
>
> UpC <- censReg(Power ~ Windspeed, left = -Inf, right =
> 2000,data=PData_In,method="BHHH",nGHQ = 4,start=c(-691,189,5))
>
> Error in names(start) <- c(colnames(xMat), "logSigmaMu", "logSigmaNu") :
>  'names' attribute [4] must be the same length as the vector [3]
>
>
> How can I solve any of these errors?

You chose a suitable solution for the first problem (NA in initial
gradient). Unfortunately, the documentation of "censReg" is not very
clear regarding starting values of panel tobit models. Please note
that you have to specify 4 starting values: intercept, slope
parameter, variance of the individual effects ("mu"), and variance of
the general error term ("nu").

http://cran.r-project.org/web/packages/censReg/vignettes/censReg.pdf

Best wishes from Copenhagen,
Arne

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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to