I am a bit confused about the output of Statsmodels Mixedlm and am hoping someone could explain.
I have a large dataset of single family homes, including the previous two sale prices/sale dates for each property. I have geocoded this entire dataset and fetched the elevation for each property. I am trying to understand the way in which the relationship between elevation and property price appreciation varies between different cities.
I have used statsmodels mixed linear model to regress price appreciation on elevation, holding a number of other factors constant, with cities as my groups category.
md = smf.mixedlm('price_relative_ind~Elevation+YearBuilt+Sale_Amount_1+LivingSqFt',data=Miami_SF,groups=Miami_SF['City'])
mdf = md.fit()
mdf.random_effects
Entering mdf.random_effects returns a list of coefficients. Can I interpret this list as, essentially, the slope for each individual city (i.e., the individual regression coefficient relating Elevation to sale price appreciation)? Or are these results the intercepts for each City?
group
values to the conditional means of the random effects for the group given the data." But I don't quite know how conditional means work. Any idea how to calculate the individual intercept and slope given the random variables? Why is it the difference? – Mohave