Hi, stepAIC generic plot function creates useful graphics for the diagnosis of multiple regressions. To create predicted versus observed plots, I use to look for the coefficients, copy them by hand, calculate R?, then plot. Is there a more automated way to plot predicted versus observed with its associated R? output using stepAIC, or another function? Kind regards, S.-?. Parent Universit? Laval, Qu?bec Canada -- View this message in context: http://r.789695.n4.nabble.com/stepAIC-plot-predicted-versus-observed-tp3085991p3085991.html Sent from the R help mailing list archive at Nabble.com.
I figured out how to call coefficients and R? from the summary. ----------------- fit<-lm(...) #multiple regression function stepComp <- stepAIC(fit, direction="both") summary(stepComp)$coef[1,1] #call first coefficient summary(stepComp)$coef[1,2] #call Std. Error of first coefficient summary(stepComp)$coef[2,1] #call second coefficient #... so on... #And the R? can be called by summary(stepComp)$adj.r.squared #call adjusted R? summary(stepComp)$r.squared #call multiple R? -- View this message in context: http://r.789695.n4.nabble.com/stepAIC-plot-predicted-versus-observed-tp3085991p3087345.html Sent from the R help mailing list archive at Nabble.com.