I'm trying to get the coefficient of partial determination for each of three independent variables. I've tried mvr in package pls.pcr. I'm a little confused by the output. I'm curious how I can order the LV's according to their names rather than their relative contribution to the regression. For instance, using the crabs data from MASS I made a regression of FL~RW+noise set.seed(124) library(pls.pcr) library(MASS) attach(crabs) crabs.simpls <- mvr(data.frame(x1 = RW,x2 = runif(200)), FL, validation="CV", method="SIMPLS") summary(crabs.simpls) crabs.simpls <- mvr(data.frame(x1 = runif(200), x2 = RW), FL, validation="CV", method="SIMPLS") summary(crabs.simpls) # compare to summary(lm(FL~RW+runif(200))) detach(crabs) The two summaries are almost identical, as are the inputs. But the order of the LVs are different. How can I know that it is x1 is the useful predictor in the first example and that x2 is the useful predictor in the second example. I hope to run a three variable regression in a MC framework and output the partial rsq for x1, x2, and x3 in every run. Can I do this? I fear I've made some fundamental misunderstanding about mvr() Thanks, DC> version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 0.1 year 2004 month 11 day 15 language R
Dr Carbon
2005-Mar-08 03:12 UTC
[R] coefficient of partial determination...partial r square [redux]
After the deafening silence from my last post (which likely caused shudders of disgust in statistics departments on the six continents) I'll reformulate: Is there a function that will return the coefficients of partial determination for the independent variables in a lm (or glm). For y x1 + x2....xn can I use R to extract the partial rsq for x1 to n? I am, and remain, with Admiration, etc. etc., at your Bidding, DC