Description Usage Arguments See Also Examples
View source: R/predict.bayesbr.R
A function that informs various types of prediction through a beta regression by the Bayesian view.
1 2 3 4 |
object |
an object of the class bayesbr, containing the list returned from the |
newdata |
A data frame in which to look for variables with which to predict. If omitted, the original observations are used. |
type |
A character containing the types of predictions: if type is "response" the function will calculate fitted values for theta; if type is "link" the function will calculate the linear predictor for theta and zeta;if type is "precision" the function will calculate fitted values for zeta parameter;if type is "variance" the function will calculate fitted variances of response; if type is "quantile" the function will calculate fitted quantiles of theta values; |
na.action |
Characters provided or treatment used in NA values. If |
at |
numeric vector indicating the quantiles that will be informed by the function (only if |
... |
further arguments passed to or from other methods. |
bayesbr
,residuals.bayesbr
,pmse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data("CarTask", package = "bayesbr")
bbr = bayesbr(probability~ NFCCscale,data=CarTask,
iter = 100, mean_betas = c(1,1.2))
predict(bbr, type = "response")
predict(bbr, type = "link")
predict(bbr, type = "precision")
predict(bbr, type = "variance")
predict(bbr, type = "quantile", at = c(0.25, 0.5, 0.75))
df = data.frame(NFCCscale = rnorm(10,4,1.4))
predict(bbr, newdata = df, type = "response")
predict(bbr, newdata = df, type = "link")
predict(bbr, newdata = df, type = "precision")
predict(bbr, newdata = df, type = "variance")
predict(bbr, newdata = df, type = "quantile", at = c(0.25, 0.5, 0.75))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.