predict.mlcm: Predict Method for MLCM Objects

View source: R/predict.mlcm.R

predict.mlcmR Documentation

Predict Method for MLCM Objects

Description

Predict values based on conjoint measurment scale fit.

Usage

## S3 method for class 'mlcm'
predict(object, newdata = NULL, type = "link", ...)

Arguments

object

object of class ‘mlcm’ usually created from running mlcm.

newdata

numeric vector of new data for which to predict scale values. Only relevant when the formula method is used.

type

character indicating whether the predicted value should be on the “link” or “response” scale. Only relevant when the glm method is used.

...

Other parameters passed along to the predict method of glm when the glm method is used.

Details

For data sets fit with the glm method, the predicted values are returned either on the “link” or “response” scale. For the formula method, predicted values are returned on the “link” scale. The “newdata” argument is there for this case.

Value

Numeric vector of predicted values.

Author(s)

Kenneth Knoblauch

See Also

mlcm, fitted.mlcm

Examples

bg.add <- mlcm(BumpyGlossy)
bg.frm <- mlcm(~ p[1] * (x - 1)^p[2] + p[3] * (y - 1)^p[4],
	p = c(0.1, 1.3, 1.6, 0.8), data = BumpyGlossy)
xx <- seq(1, 5, len = 100)
plot(bg.add)
lines(xx, predict(bg.frm, newdata = xx)[seq_along(xx)])
lines(xx, predict(bg.frm, newdata = xx)[-seq_along(xx)])

MLCM documentation built on March 18, 2022, 7:31 p.m.