predict.AccurateGLM: Make predictions from a fitted AccurateGLM

Description Usage Arguments Value

View source: R/predict-aglm.R

Description

Make predictions from a fitted AccurateGLM

Usage

1
2
3
4
## S3 method for class 'AccurateGLM'
predict(model, newx = NULL, s = NULL,
  type = c("link", "response", "coefficients", "nonzero", "class"),
  exact = FALSE, newoffset, ...)

Arguments

model

An AccurateGLM object.

newx

An input matrix or data.frame used for predictions.

type

Type of prediction required.

  • Type "link" gives the linear predictors for "binomial", "poisson" models, and for "gaussian" models it gives the fitted values.

  • Type "response" gives the fitted probabilities for "binomial", fitted mean for "poisson", and for "gaussian" models it is equivalent to type "link".

  • Type "coefficients" computes the coefficients at the requested values for s. Note that for "binomial" models, results are returned only for the class corresponding to the second level of the factor response.

  • Type "class" applies only to "binomial", and produces the class label corresponding to the maximum probability.

  • Type "nonzero" returns a list of the indices of the nonzero coefficients for each value of s.

...

Other arguments are passed directly to backend (currently glmnet() is used), and if not given, backend API's deault values are used.

Value

The object returned depends on type.


kazuzowo/aglm-LVar documentation built on Dec. 10, 2019, 12:13 a.m.