samplics icon indicating copy to clipboard operation
samplics copied to clipboard

RuntimeWarning: divide by zero encountered in log ll_term1 = np.log(np.linalg.det(V))

Open rifkigst opened this issue 2 years ago • 1 comments

Excuse me, I'm getting an error in the EBLUP calculation. The error message is as follows:

RuntimeWarning: divide by zero encountered in log ll_term1 = np.log(np.linalg.det(V)).

And this is my script:

area = data_sae["id"] yhat = data_sae["cons"] X = data_sae[["ntl", 'feat_1', 'feat_2', 'feat_3']] sigma_e = data_sae["se"]

fh_model_reml = EblupAreaModel(method="ML") fh_model_reml.fit( yhat=yhat, X=X, area=area, error_std=sigma_e, intercept=True, tol=1e-8, )

This is my data collation:

id centroid_lon centroid_lat cons ntl feat_1 feat_2 feat_3 se 181 3404070003 110.399345 -7.755213 2.336299e+06 13.000000 -0.657062 0.256064 -0.718757 3.782321e+05 68 3402080003 110.367601 -7.901088 7.120323e+05 3.570000 -0.365713 0.222525 -1.224635 8.464960e+04 57 3402050003 110.322569 -7.928683 7.259114e+05 2.400000 -0.515885 0.689977 -1.196988 2.273737e-11

rifkigst avatar Jan 17 '22 13:01 rifkigst