inst/tests/bplot.r

require(rms)
x1 <- runif(100)
x2 <- runif(100)
y  <- x1 + 2 * x2 + 3 * runif(100)
dd <- datadist(x1, x2); options(datadist='dd')
f  <- ols(y ~ x1 * x2)
f
p <- Predict(f, x1, x2, np=20)
require(lattice)
bplot(p, lfun=wireframe, col='red')
bplot(p, lfun=wireframe, col='red', xlab='Age (days)', xlabrot=-10,
      cex.lab=1.4)

Try the rms package in your browser

Any scripts or data that you put into this service are public.

rms documentation built on Sept. 12, 2023, 9:07 a.m.