## S3 method for class 'mat':
predict(object, newdata, k, weighted = FALSE,
bootstrap = FALSE, n.boot = 1000,
probs = c(0.01, 0.025, 0.05, 0.1), ...)mat.x in mat. See example below or
k is chosen
automatically as the k that achieves lowest RMSE.newdata is
missing.predict.mat is returned if newdata is
supplied, otherwise an object of fitted.mat is
returned. If bootstrap = FALSE then not all components will be
returned.estimated"y", the
environment.}
residualsr.squared"y".}
avg.biasmax.biasrmsekestimated"y".}
residuals"y".}
r.squared"y".}
avg.biasmax.biasrmseps1s2krmseps1s2"k" was choosen automatically or
user-selected.observednewenv is provided.}
apparentapparent, above.
}
bootstrapbootstrap, above.}
sample.errorssample.errors, above.}bootstrap(model, newdata,
...) - see bootstrap.mat, bootstrap## continue the RLGH and SWAP example from ?join
example(join)
## fit the MAT model using the squared chord distance measure
swap.mat <- mat(swapdiat, swappH, method = "SQchord")
## returns only fitted values
predict(swap.mat)
## predict for RLGH data
predict(swap.mat, rlgh)
## again but with bootstrap estimates and sample specific errors
predict(swap.mat, rlgh, bootstrap = TRUE)Run the code above in your browser using DataLab