# NOT RUN {
# }
# NOT RUN {
if (require("betareg")) {
data("GasolineYield", package = "betareg")
gy <- betareg(yield ~ batch + temp, data = GasolineYield)
# Get a function that evaluates the expected information for gy at supplied parameter values
gy_info <- get_information_function(gy)
. # compare standard errors with what `summary` returns
all.equal(sqrt(diag(solve(gy_info())))[1:11],
coef(summary(gy))$mean[, 2], check.attributes = FALSE)
. # evaluating at different parameter values
gy_info(rep(1, length = 12))
# Get a function that evaluates the first-order bias of gy at supplied parameter values
gy_bias <- get_bias_function(gy)
# compare with internal betareg implementation of bias correction
gy_bc <- update(gy, type = "BC")
all.equal(gy_bias(coef(gy)), gy_bc$bias, check.attributes = FALSE)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab