predict.dbglm {dbstats}R Documentation

Predicted values for a dbglm object


predict.dbglm returns the predicted values, obtained by tested the generalized distance regression function in the new data (newdata).


## S3 method for class 'dbglm'
predict(object,newdata,type.pred=c("link", "response"),



an object of class dbglm. Result of dbglm.


data.frame or matrix which contains the values of Z (if type.var="Z". The squared distances between k new individuals and the original n individuals (only if type.var="D2"). Finally, the G inner products matrix (if type.var="G").


the type of prediction (required). The default "link" is on the scale of the linear predictors; the alternative "response" is on the scale of the response variable.


set de type of newdata. Can be "Z" if newdata contains the values of the explanatory variables, "D2" if contains the squared distances matrix or "G" if contains the inner products matrix.


arguments passed to or from other methods to the low level.


The predicted values may be the expected mean values of response for the new data (type.pred="response"), or the linear predictors evaluated in the estimated dblm of the last iteration.

In classical linear models the mean and the linear predictor are the same (makes use of the identity link). However, other distributions such as Poisson or binomial, the link could change. It's easy to get the predicted mean values, as these are calculated by the inverse link of linear predictors. See family to view how to use linkfun and linkinv.


predict.dbglm produces a vector of predictions for the k new individuals.


Look at which way (or type.var) was made the dbglm call. The parameter type.var must be consistent with the data type that is introduced to dbglm.


Boj, Eva <>, Caballe, Adria <>, Delicado, Pedro <> and Fortiana, Josep <>


Boj E, Delicado P, Fortiana J (2010). Distance-based local linear regression for functional predictors. Computational Statistics and Data Analysis 54, 429-437.

Boj E, Grane A, Fortiana J, Claramunt MM (2007). Selection of predictors in distance-based regression. Communications in Statistics B - Simulation and Computation 36, 87-98.

Cuadras CM, Arenas C, Fortiana J (1996). Some computational aspects of a distance-based model for prediction. Communications in Statistics B - Simulation and Computation 25, 593-609.

Cuadras C, Arenas C (1990). A distance-based regression model for prediction with mixed data. Communications in Statistics A - Theory and Methods 19, 2261-2279.

Cuadras CM (1989). Distance analysis in discrimination and classification using both continuous and categorical variables. In: Y. Dodge (ed.), Statistical Data Analysis and Inference. Amsterdam, The Netherlands: North-Holland Publishing Co., pp. 459-473.

See Also

dbglm for distance-based generalized linear models.


z <- rnorm(100)
y <- rpois(100, exp(1+z))
glm1 <- glm(y ~z, family=quasi("identity"))
dbglm1 <- dbglm(y~z,family=quasi("identity"), method="rel.gvar")


pr1 <- predict(dbglm1,newdata,type.pred="response",type.var="Z")

[Package dbstats version 2.0.2 Index]