Displaying 1 result from an estimated 1 matches for "mybreg".
2006 Apr 17
1
using betareg: problems with anova and predict
...oblems we see (so far) are that
1. predict ignores newdata
2. anova does not work
Here is 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...