[R] need help with errors in betareg analysis
knussear
knussear at mac.com
Sat Feb 14 22:28:21 CET 2009
Yes, fair enough. I wasn't sure it was fitting the mode at all, but here is
an example of what I see
> model <- betareg(ACT ~ ST+DOY, data = actDL_F)
Warning messages:
1: In sqrt(diag(fisherinv)) : NaNs produced
2: In sqrt(diag(fisherinv)) : NaNs produced
3: In sqrt(W) : NaNs produced
4: In sqrt(W) : NaNs produced
5: In sqrt(1 + phihat) : NaNs produced
Call:
betareg(formula = ACT ~ ST + DOY, data = actDL_F)
Coefficients:
(Intercept) ST DOY phi
1.780e+07 -1.149e+09 2.225e+08 -4.090e+08
So I don't see a W listed, but the phi is going negative just as you
suggested.
So are the results wonky if phi is negative?
Ben Bolker wrote:
>
> knussear <knussear <at> mac.com> writes:
>
>>
>>
>> Hi
>>
>> I'm trying to fit a model in betareg and I'm getting errors, but have no
>> idea what they mean or how to solve them. Does anyone have experience
>> with
>> this?
>>
>> > model <- betareg(ACT ~ ST*SoilT, data = actDL_F)
>> Warning messages:
>> 1: In sqrt(W) : NaNs produced
>> 2: In sqrt(W) : NaNs produced
>> 3: In sqrt(1 + phihat) : NaNs produced
>>
>> data summaries don't give any na's or problems I can see
>>
>> > summary(actDL_F$ACT)
>> Min. 1st Qu. Median Mean 3rd Qu. Max.
>> 0.0006227 0.0505600 0.2163000 0.2643000 0.4084000 0.9994000
>>
>> > summary(actDL_F$ST)
>> Min. 1st Qu. Median Mean 3rd Qu. Max.
>> 8.085 29.560 34.760 33.870 39.430 49.610
>>
>> > summary(actDL_F$SoilT)
>> Min. 1st Qu. Median Mean 3rd Qu. Max.
>> 17.42 20.95 24.18 24.26 27.21 31.19
>>
>> Thanks
>>
>> Ken
>
> Note that these results are from the contributed "betareg"
> package, so if my answer doesn't do it for you, you could
> contact the package authors (see help(package="betareg") ).
> Also note that you haven't given us a reproducible example,
> so there's no way we can say for sure.
>
> That said: it seems *likely* (take my word for it
> at your own risk) that W (whatever it is) and phihat
> (whatever it is) are not constrained to be positive,
> so they might wander negative in the course of the
> optimization. If this is not fatal to
> the optimization process, then you can still arrive
> at a reasonable solution where they are all positive.
> There doesn't seem to be see any "trace" option in
> betareg, so it will be a little harder to see what's
> going on.
>
> It's not wonky data I would worry about, but wonky
> results (which you haven't shown us).
>
> Ben Bolker
>
> ______________________________________________
> R-help at 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.
>
>
--
View this message in context: http://www.nabble.com/need-help-with-errors-in-betareg-analysis-tp22000860p22017178.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list