predict.ahm: Predict method for the fitted ahm object

Description Usage Arguments Value Examples

View source: R/ahm.R

Description

Predict method for the fitted ahm object

Usage

1
2
## S3 method for class 'ahm'
predict(object, newx, ...)

Arguments

object

ahm object

newx

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

...

not used

Value

predicted value(s) at newx

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]
out = ahm (y, x, num_major = 3, dist_minor = c(2,2,1),
           type = "weak", alpha=0, lambda_seq=seq(0,5,0.01), nfold = NULL,
           mapping_type = c("power"), powerh = h_tmp,
           rep_gcv=100)
predict(out)

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