Description Usage Arguments Value Examples
Obtains predictions from the fitted bivariate gamma regression models.
1 2 3 4 5 6 7 8 | ## S3 method for class 'BGR'
predict(object, newdata, ...)
predict_BGR_EE(object, newdata, ...)
predict_BGR_EI(object, newdata, ...)
predict_BGR_IE(object, newdata, ...)
|
object |
a fitted model object of class |
newdata |
a data frame that prediction is based upon |
... |
further arguments passed to or from other methods. |
a list with components (depends on model class):
fit |
predictions. |
alpha1.fit |
predicted alpha1 values. |
alpha2.fit |
predicted alpha2 values. |
alpha3.fit |
predicted alpha3 values. |
beta.fit |
predicted beta values. |
tau.fit |
predicted mixing proportion values, if covariates enter the gating network. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | mod1 <- BGR(modelName = "EE",
y = c("y1","y2"), data = fullsim,
f1 = ~ w1 + w2,
f2 = ~ w2 + w3,
f3 = ~ w1 + w2 + w3,
f4 = ~ w1 + w2 + w3,
verbose= FALSE)
fitted1 <- predict(mod1, newdata=fullsim)
plot(fitted1$fit)
mod2 <- BGR(modelName = "EI",
y = c("y1","y2"), data = fullsim,
f1 = ~ w1 + w2,
f2 = ~ w2 + w3,
f3 = ~ w1 + w2 + w3,
verbose= FALSE)
fitted2 <- predict(mod2, newdata=fullsim)
mod3 <- BGR(modelName = "IE",
y = c("y1","y2"), data = fullsim,
f4 = ~ w1 + w2 + w3,
verbose= FALSE)
fitted3 <- predict(mod3, newdata=fullsim)
plot(fitted2$fit)
plot(fitted3$fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.