
panel.cor.res
provides correlation
coefficients (any alternative from cor
can be used) and p-values for correlation
tests. The function panel.lm
puts linear fitted lines from simple linear
regression in scatterplots. Note that the function panel.smooth
provides a
smoother fit.panel.cor.res(x, y, digits = 2, meth = "pearson", cex.cor=1)
panel.lm(x, y, col = par("col"), bg = NA, pch = par("pch"), cex = 1,
col.line = 2,lty = par("lty"))
panel.cor.res
"pearson", "spearman", "kendall"
panel.lm
panel.lm
panel.lm
panel.lm
panel.lm
panel.lm
panel.lm
cor
, cor.test
, panel.smooth
data(asthma)
attach(asthma)
pairs(asthma,cex.labels=1,cex=.95,gap=.1,lower.panel=panel.cor.res,
upper.panel=panel.lm)
Run the code above in your browser using DataLab