Hello!
I am building a model to explore the relationship between property value and flood risk. I have 6 variables in total including flood risk. The spline part is only put on the variable of flood risk, so the equation is
Property Value = intercept +
bathrooms_slope x bathrooms +
livingArea_slope x livingArea +
POOL_slope x POOL +
hhinc_k_slope x hhinc_k +
dist2coast_km_slope x dist2coast_km +
pm.math.dot(np.asarray(B, order=“F”), w.T)
where ‘B’ in the last term are basis functions transformed for flood risk.
Here is the plot of standardized flood risk (originally is a 0 - 1 probability variable) versus log-property value:
Here is my model specification:
However, the coefficients I got for my 6 basis functions doesn’t differ from one another, which is strange, and the std of the sample are exactly the same for all w[i]:
You can also see from the sampling plot that all my w[i] are overlapped for each chain:
I don’t know why this happened and want to ask for insights.
I have tested a simple linear regression model without the spline component first:
Property Value = intercept +
bathrooms_slope x bathrooms +
livingArea_slope x livingArea +
POOL_slope x POOL +
hhinc_k_slope x hhinc_k +
dist2coast_km_slope x dist2coast_km +
flood_risk_slope x flood_risk
And the result was reasonable:
I am wondering why I get strange coefficients for my spline components… And are there any possible solutions for this issue. Tons of thanks!