predict.spar {spareg}R Documentation

predict.spar

Description

Predict responses for new predictors from 'spar' object

Usage

## S3 method for class 'spar'
predict(
  object,
  xnew = NULL,
  type = c("response", "link"),
  avg_type = c("link", "response"),
  nummod = NULL,
  nu = NULL,
  aggregate = c("mean", "median"),
  ...
)

Arguments

object

result of spar function of class 'spar'.

xnew

matrix of new predictor variables; must have same number of columns as x.

type

the type of required predictions; either on response level (default) or on link level

avg_type

type of averaging the marginal models; either on link (default) or on response level

nummod

number of models used to form coefficients; value with minimal validation measure is used if not provided.

nu

threshold level used to form coefficients; value with minimal validation measure is used if not provided.

aggregate

character one of c("mean", "median"); the aggregation over the ensembles is done using the specified method (mean or median). Defaults to mean aggregation.

...

further arguments passed to or from other methods

Value

Vector of predictions


[Package spareg version 1.1.0 Index]