Description Usage Arguments Examples
Plot the regression line of a linear model to a plot
1 2 |
mod |
The matrix to be plotted. X and Y coordinates must be passed as rownames and colnames respectively |
log |
The axes to be transformed to log |
range |
The interval on which the regression line is to be plotted (calculated internally with the model terms if none is supplied) |
... |
Further arguments to be passed to addlog |
1 2 3 4 5 6 7 8 9 10 |
a <- seq(from=1,to=10,by=0.1)
b <- a + abs(rnorm(length(a),0,5))
c <- 2*a + abs(rnorm(length(a),0,5))
logplot(a,b,log='xy',pch=19,ylim=c(1,100))
addlog(a,c,log='xy',pch=19,col='grey')
model <- lm(b~a)
model.2 <- lm(c~a)
loglm(model,col='red',log='xy')
loglm(model.2,col='blue',log='xy',range=c(2,8),lty=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.