Displaying 1 result from an estimated 1 matches for "mybreg2".
Did you mean:
mybreg
2006 Apr 17
1
using betareg: problems with anova and predict
...s the small working example:
----------------------------
x <- c(1, 3, 1, 4, 5, 3, 5, 2, 5, 2)
y <- c(.3, .4, .4, .5, , .7, .4, .3, .4, .3, .5)
x2 <- c( 4, 2, 1, 5, 1, 2, 4, 2, 1, 3)
library(betareg)
mybreg <- betareg(y~x)
summary(mybreg)
predict(mybreg, newdata=data.frame(x=c(2,2)))
mybreg2 <- betareg(y~x+x2)
summary(mybreg)
anova(mybreg, mybreg2)
-------------------------------
Example output:
> predict(mybreg, newdata=data.frame(x=c(2,2)))
[1] 0.3903155 0.4207632 0.3903155 0.4362319 0.4518258 0.4207632 0.4518258
[8] 0.4054484 0.4518258 0.4054484
...
> anova(mybreg, mybr...