predict.mlcm {MLCM} | R 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 |
newdata |
numeric vector of new data for which to predict scale values. Only relevant when the |
type |
character indicating whether the predicted value should be on the “link” or “response” scale. Only relevant when the |
... |
Other parameters passed along to the |
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
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)])
[Package MLCM version 0.4.3 Index]