Description Usage Arguments See Also Examples
A (filled) contour or perspective plot of a fitted model.
1 2 3 4 5 6 7 8 9 10 |
object |
fit created by a modeling function, e.g., |
which |
a vector with two elements, each an integer giving the two independent variables of the plot (the integers are indices of the respective data set). |
constant |
a numeric vector that states for each variable a constant value that it will take on
if it is not varied in the plot. This affects the parameters not selected by the |
xlab |
a vector of characters, giving the labels for each of the two independent variables. |
ylab |
character, the value of the dependent variable predicted by the corresponding model. |
type |
string describing the type of the plot: |
... |
additional parameters passed to the |
1 2 3 4 5 6 7 8 9 10 11 12 | ## generate random test data
testfun <- function (x) sum(x^2)
set.seed(1)
k <- 30
x <- cbind(runif(k)*15-5,runif(k)*15,runif(k)*2-7,runif(k)*5+22)
y <- as.matrix(apply(x,1,testfun))
fit <- buildLM(x,y)
plotModel(fit)
plotModel(fit,type="contour")
plotModel(fit,type="persp")
plotModel(fit,which=c(1,4))
plotModel(fit,which=2:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.