predict.MBGR: Predict Method for Bivariate Gamma Regressions

Description Usage Arguments Value Examples

View source: R/predict.MBGR.R

Description

Obtains predictions from the fitted bivariate gamma regression models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S3 method for class 'MBGR'
predict(object, newdata, ...)

predict_MBGR_VC(object, newdata)

predict_MBGR_CV(object, newdata)

predict_MBGR_VV(object, newdata)

predict_MBGR_VI(object, newdata)

predict_MBGR_IV(object, newdata)

predict_MBGR_VE(object, newdata)

predict_MBGR_EV(object, newdata)

predict_MBGR_EC(object, newdata)

predict_MBGR_CE(object, newdata)

Arguments

object

a fitted model object of class "BGR" or "MBGR"

newdata

a data frame that prediction is based upon

...

further arguments passed to or from other methods.

Value

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.

Examples

1
2
3
4
5
6
7
8
m1 <- MBGR(modelName = "VC", G=2,
           y=c("y1","y2"), data = fullsim,
           f1     = ~ w1 + w2,
           f2     = ~ w2 + w3,
           f3     = ~ w1 + w2 + w3,
           f4     = ~ w1 + w2 + w3,
           gating = "C", verbose=FALSE)
fitted1 <- predict(m1, newdata=fullsim)

senhu/mvClaim documentation built on Jan. 29, 2022, 3:18 p.m.