predict.speedglm: Predict method for a speedglm object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

summary The method is currently under construction but some functionalities are available.

Usage

1
2
3
## S3 method for class 'speedglm'
predict(object, newdata, type = c("link", "response"), 
                           na.action = na.pass, ...)

Arguments

object

an object of class 'speedlgm'.

newdata

An optional data frame with new data or the original data.

type

Type of prediction.

na.action

function determining what should be done with missing values in newdata.

...

further optional arguments

Details

If newdata is omitted prediction are based on the data used for the fit only if argument fitted was previously set to TRUE in the speedglm object. Currently the method does not work for function shglm.

Value

pred

a vector of predictions.

Author(s)

Tomer Kalimi and Marco Enea

See Also

speedglm

Examples

1
2
3
4
5
6
7
set.seed(10)
y <- rgamma(20,1.5,1)
x <-round( matrix(rnorm(20*2),20,2),digits=3)
colnames(x) <-c("s1","s2")
da <- data.frame(y,x)
mod <- speedglm(y~s1+s2, data=da, family=Gamma(log), fitted=TRUE)
predict(mod)

MarcoEnea/speedglm documentation built on Feb. 21, 2022, 9:46 a.m.