stepwise AIC and model AIC are different

I ran step wise function using step() function to get the model in linear regression.I got model which have five variables and AIC mentioned in the step wise function is 1538.

then i selected that model and created that model and then checked the AIC with AIC(modelname) command.In this case i got different AIC as 2919

so is stepwise AIC and model AIC are different?

Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you!

If you've never heard of a reprex before, start by reading "What is a reprex", and follow the advice further down that page.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.