Hi,
I created a matrix of correlation coefficients and their respective scatterplots
using the commands hetcor() and panel.cor(). Can I edit this matrix? I would
like to have the scale values display at the top, as opposed to the alternating
top-bottom scale approach. Also, I would like to increase the font size of the
graphic for print purposes. Any help on how to accomplish this would be greatly
appreciated!
Thanks,
Mark
Here is the code I am using for this analysis:
data <- read.table("X:/GWRclip/corrmatrix.txt", header = T)
ASHDEP <- data [,1]
ELE <- data [,2]
SLP <- data [,3]
ASP <- data [,4]
PLCU <- data [,5]
PRCU <- data [,6]
CTI <- data [,7]
STI <- data [,8]
SPI <- data [,9]
data <- data.frame(ASHDEP, ELE, SLP, ASP, PLCU, PRCU, CTI, STI, SPI)
hetcor(data) # Pearson, polychoric, and polyserial correlations, 2-step est.
hetcor(ASHDEP, ELE, SLP, ASP, PLCU, PRCU, CTI, STI, SPI, ML=TRUE)
# Pearson, polychoric, polyserial correlations, ML est.
panel.cor <- function(x, y, digits=2, prefix="", cex.cor) {
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0,1,0,1))
r <- (cor(x, y))
txt <- format(c(r, 0.123456789), digits=digits)[1]
txt <- paste(prefix, txt, sep="")
if(missing(cex.cor))
text(0.5, 0.5, txt)
}
pairs( data[c(1, 2:9 )], main = "Partial Correlation Coefficients for
Selected Soil-Terrain Attributes",
upper.panel=panel.smooth, lower.panel=panel.cor )
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Mark Kimsey
Research Assistant
Intermountain Forest Tree Nutrition Cooperative
University of Idaho
Moscow, Idaho 83844-1133
------------------------
Work: 208.885.7520
Mobile: 509.330.0640
Fax: 208.885.7442 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[[alternative HTML version deleted]]