[R] Truncreg package help
Achim Zeileis
Achim.Zeileis at uibk.ac.at
Sat May 7 21:18:14 CEST 2016
On Fri, 6 May 2016, Philipp Schaper wrote:
> Dear R userers,
>
> I am running truncated regressions with the 'truncreg' package. My sample
> is large (6,000 observations), the data is left-truncated at 1 and the
> left tail of the data is heavily centered at 1. When I am running the
> regression I receive the following error message:
>
> Error in optim(par = start[!fixed], fn = logLikFunc, control = control,
> :
> initial value in 'vmmin' is not finite
>
>> From a previous discussion (
> http://r.789695.n4.nabble.com/betareg-help-td3350129.html) on a similar
> issue in the betareg function I assume that the error message stems from
> that the estimate of the starting value of the precision parameter is
> negative. However, I do not know how I can take care of this. Thus I would
> be very thankful for any help.
As in the thread you quote above, it is hard to say what is going on
without a reproducible example. It is possible that the problem is caused
by some problem of (almost) degenerate data (as was the case with the
betareg example). With a reproducible example we might be able to say
more.
As an alternative to truncreg() you might try the function trch() from
package "crch": trch(y ~ x1 + x2 + ... | 1, data = mydata, left = 0). This
is a different implementation of the same model so possibly this avoids
the problem - but maybe not.
> Best regards,
> Philipp
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
More information about the R-help
mailing list