Once you factor in rent, then cooking at home is maybe not cheaper. Rent and mortgages is the black hole sucking all money from the restaurants. Not ingredients or wages.
On the other hand, how high is the marginal rent of a kitchen at home? It's usually included whether you use it or not - and some parts like the fridge would take up space even if you exclusively ate out.
If you compare the cost of renting a room in a house, and renting an apartment it is a little easier to figure out. Usually room rentals will charge extra for kitchen access or just ban it outright.