predict.cv.ahm: Predict method for the fitted cv.ahm object

Description Usage Arguments Value Examples

View source: R/cv_ahm.R

Description

Predict method for the fitted cv.ahm object

Usage

1
2
## S3 method for class 'cv.ahm'
predict(object, newx, metric = "mse", ...)

Arguments

object

cv.ahm object

newx

Matrix of new values for x at which predictions are to be made.

metric

"mse" or "aicc"

...

not used

Value

Return a list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("pringles_fat")
data_fat = pringles_fat
h_tmp = 1.3
x = data_fat[,c("c1","c2","c3","x11","x12","x21","x22")]
y = data_fat[,1]
powerh_path = round(seq(0.001,2,length.out =15),3)
num_major = 3; dist_minor = c(2,2,1)
res = cv.ahm (y, x, powerh_path=powerh_path, metric = "mse", num_major, dist_minor, type = "weak"
, alpha=0, lambda_seq=seq(0,5,0.01), nfolds=NULL, mapping_type = c("power"), rep_gcv=100)
pred = predict(res)

AHM documentation built on July 28, 2019, 9:02 a.m.