Dear Friends: I like so much to work with R program. Congratulations for your work. I need R for work with multivariate data. My question is: With the pairs(X) command my output is a pairwise scatterplot symmetric matrix. Like: | X1 |X1 vs X2|X1 vs X3|X1 vs X4| |X2 vs X1| X2 |X2 vs X3|X2 vs X4| |X3 vs X1|X3 vs X2| X3 |X3 vs X4| |X4 vs X1|X4 vs X2|X4 vs X3| X4 | It is possible with this command (> pairs(X)) to draw a figure which both indicates the values of correlation coefficients and give the linear regressions of variables? Like this: | X1 | C12 | C13 | C14 | |X2 vs X1| X2 | C23 | C24 | |X3 vs X1|X3 vs X2| X3 | C34 | |X4 vs X1|X4 vs X2|X4 vs X3| X4 | Cij indicate the value of the correlation coefficient for the linear regression of the variable i with the variable j. i=1...4, j=1...4 Xi vs Xj indicate a plot(Xi,Xj). Have a nice day Jorge. -- +----------------------------------------------------------------------+ | Jorge Magalh?es Email: jmagalhaes at eng.uminho.pt | | Departamento de Eng. Mec?nica Phone: + 351 253 510220 | | Universidade do Minho Fax: + 351 253 516007 | | Campus de Azur?m Phone: + 351 276 333008 | | 4810 Guimar?es, Portugal Email: mop41059 at mail.telepac.pt | +----------------------------------------------------------------------+ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jorge Magalhaes <root at mail.telepac.pt> writes:> It is possible with this command (> pairs(X)) to draw a figure which both indicates the values of correlation coefficients and give the linear regressions of variables? Like this: > > > > | X1 | C12 | C13 | C14 | > |X2 vs X1| X2 | C23 | C24 | > |X3 vs X1|X3 vs X2| X3 | C34 | > |X4 vs X1|X4 vs X2|X4 vs X3| X4 | > > Cij indicate the value of the correlation coefficient for the linear regression of the variable i with the variable j. i=1...4, j=1...4 > Xi vs Xj indicate a plot(Xi,Xj).Offhand, no. But it doesn't look excessively complicated to make a customised version of pairs.default. Hint: there's an if (i == j) {} construct in the middle of everything, now if you were to split the else clause into i<j and i>j and do something with text(...) in the former case (like it already happens for i==j). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._