The comparison is rough but they are both assets that produce no income.
Of course not the same. You are deceiving people if you say that.
There is an equivalent income or else the owner would be living on the streets. Real estate provides a value in terms of shelter ( equivalent rent). You add up the mortgage and other expenses to come to total expenses. Then you derive a net dividend ( income) by subtracting the expenses from equivalent rent.