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(ste
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
2 matches
Mail list logo