loglm: Add a linear model to a plot

Description Usage Arguments Examples

Description

Plot the regression line of a linear model to a plot

Usage

1
2
 
loglm(mod,log='xy',range=NULL,...)

Arguments

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

Examples

 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)

log10 documentation built on May 2, 2019, 4:53 p.m.

Related to loglm in log10...