This function fits an bivariate regression model for interval-valued variables, based on bivariate exponential family of distributions, and return the fitted values, the residuals, rho, phi and the goodness-of-fit measure deviance

bivar(formula1, lig1, formula2, lig2, data, ...)

Arguments

formula1

an object of class "formula": the description of the first model to be fitted.

lig1

the link function to be considered in the first model: identity, inverse or log

formula2

an object of class "formula": the description of the second model to be fitted.

lig2

the link function to be considered in the second model: identity, inverse or log

data

an optional data frame containing the variables in the model.

other arguments.

Details

This function fits an bivariate regression model for interval-valued variables considering the bivariate Gaussian distribution in the random component Y = [Y1, Y2]. It is possible consider any pair of interval features for the bivariate random vector Y. For example, the lower and upper interval bounds or the midpoint and the range of intervals, respectively. It also possible to choice different link functions (identity, inverse or log) to connect the random variables Y1 and Y2 with the respective linear predictors.

Value

bivar returns an object of class "bivar" including at least the following elements:

coefficients1

a named vector of coefficients for the explanatory variables of the model "1".

coefficients2

a named vector of coefficients for the explanatory variables of the model "2".

fitted.values1

the fitted values for the response variable Y1 .

fitted.values2

the fitted values for the response variable Y2.

residuals1

the ordinary residual for the response variable Y1.

residuals2

the ordinary residual for the response variable Y2.

residual.deviance

the global residual for the bivariate vector Y=[Y1, Y2].

Rho

the estimative for the correlation coefficient between Y1 and Y2.

Phi

the estimative of the dispersion parameter.

D

the goodness-of-fit measure deviance for the current model.

References

Lima Neto, E. A., Cordeiro, G. and De Carvalho, F.A.T. (2011). Bivariate symbolic regression models for interval-valued variables. Journal of Statistical Computation and Simulation (Print), 81, 1727--1744.

Note

lig1 and lig2 must be "identity", "inverse" or "log" for identity, inverse or logarithmic link functions, respectively.

See also

Examples

data("soccer.bivar", package = "iRegression") ex.bivar <- bivar(yMin~t1Min+t2Min, "identity", yMax~t1Max+t2Max, "identity", data=soccer.bivar) ex.bivar
#> Call: #> bivar.formula(formula1 = yMin ~ t1Min + t2Min, lig1 = "identity", #> formula2 = yMax ~ t1Max + t2Max, lig2 = "identity", data = soccer.bivar) #> #> $coefficients1 #> [,1] #> [1,] -46.2858437 #> [2,] 0.6322040 #> [3,] 0.1427709 #> #> $coefficients2 #> [,1] #> [1,] -20.8118364 #> [2,] 0.5274485 #> [3,] 0.1569776 #> #> $fitted.values1 #> [1] 60.39379 64.67645 63.75871 58.84384 63.75871 65.65532 67.69470 63.90148 #> [9] 62.49430 62.00486 59.96548 62.63707 61.86209 62.77984 63.75871 63.75871 #> [17] 62.49430 63.12650 65.02311 63.41204 #> #> $fitted.values2 #> [1] 85.95248 84.11270 82.94477 83.21478 84.21316 85.05456 86.32295 85.85202 #> [9] 83.68571 88.58973 85.26806 84.37014 84.26968 88.06228 83.31524 88.90368 #> [17] 84.42665 85.95248 85.63853 86.85040 #> #> $residuals1 #> [1] -2.3937940 2.3235491 1.2412949 1.1561557 -3.7587051 1.3446830 #> [7] 1.3053002 1.0985240 0.5057028 -4.0048641 2.0345186 -0.6370681 #> [13] 1.1379067 2.2201610 -0.7587051 -3.7587051 4.5057028 -1.1265012 #> [19] -2.0231130 -0.4120429 #> #> $residuals2 #> [1] -0.9524830 -0.1126982 5.0552302 -0.2147788 -0.2131600 -2.0545636 #> [7] 3.6770461 -0.8520211 0.3142884 -0.5897253 0.7319431 -4.3701376 #> [13] 0.7303242 6.9377232 -0.3152407 -1.9036804 0.5733467 -2.9524830 #> [19] -1.6385278 -1.8504023 #> #> $residual.deviance #> [1] -1.5688973 1.6745895 3.3449471 0.8858783 -2.6048795 -2.0133284 #> [7] 2.4098901 1.1481596 0.3427771 -2.7028376 1.3332600 -2.9504520 #> [13] 0.7756489 4.5540183 -0.4975695 -2.4870688 3.0567483 -1.9345577 #> [19] -1.4637170 -1.2289038 #> #> $rho #> [1] 0.376 #> #> $phi #> [1] 5.742479 #> #> $D #> [1] 195.2443 #>