Re: [R] stepAIC: plot predicted versus observed
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. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] stepAIC: plot predicted versus observed
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. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.