[R] function censReg in panel data setting

Igors igors.lahanciks at gmail.com
Mon Sep 5 23:58:27 CEST 2011


Hello all,

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?


Thanks in advance!


Best,
Igors



--
View this message in context: http://r.789695.n4.nabble.com/function-censReg-in-panel-data-setting-tp3792227p3792227.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list