Description Usage Arguments Details Examples

Extract various types of predictions from beta regression models: either on the scale of responses in (0, 1) or the scale of the linear predictor.

1 2 3 4 |

`object` |
fitted model object of class |

`newdata` |
optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used. |

`type` |
character indicating type of predictions: fitted means of response ( |

`na.action` |
function determining what should be done with missing values
in |

`at` |
numeric vector indicating the level(s) at which quantiles
should be predicted (only if |

`...` |
currently not used. |

FIXME: Update to extended type and at processing.

FIXME: Add comments about pit and rootogram.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ```
options(digits = 4)
data("GasolineYield", package = "betareg")
gy2 <- betareg(yield ~ batch + temp | temp, data = GasolineYield)
cbind(
predict(gy2, type = "response"),
predict(gy2, type = "link"),
predict(gy2, type = "precision"),
predict(gy2, type = "variance"),
predict(gy2, type = "quantile", at = c(0.25, 0.5, 0.75))
)
## evaluate cumulative _p_robabilities for (small) new data set
gyd <- GasolineYield[c(1, 5, 10), ]
## CDF at 0.1 for each observation
predict(gy2, newdata = gyd, type = "probability", at = 0.1)
## CDF at each combination of 0.1/0.2 and observations
predict(gy2, newdata = gyd, type = "probability", at = c(0.1, 0.2))
## CDF at pairwise combinations of 0.1/0.2/0.3 and observations
predict(gy2, newdata = gyd, type = "probability", at = c(0.1, 0.2, 0.3))
## CDF at all combinations of 0.1/0.2/0.3 and observations
predict(gy2, newdata = gyd, type = "probability", at = rbind(c(0.1, 0.2, 0.3)))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.