I'm trying to perform some postestimation analysis after fitting a multilevel mixed-effects linear regression model, using xtmixed command, and then predict ..., reffects. I'm getting a code error 459 "BLUP calculation failed; estimation data have changed", even though my data haven't changed between these two commands (that are adjacent in the .do).
I'm using Stata 16.1 on Windows 10.
My database consists on 151 observations corresponding to food stores, with 4 variables: tip8 is the type of food store (8 categories), seccionid is an integer (1-52) which represents their census tract, affordability is my dependent variable, and ses5 is an index of socio-economic status (5 categories).
Here is my full database:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(affordability tip8) long seccionid float ses5
.3470162 7 1 2
.8847362 2 1 2
1.2732084 1 1 2
.761627 2 1 2
.9701622 2 2 4
1.637232 1 2 4
1.684274 5 2 4
. 8 2 4
1.2340882 2 2 4
.895658 3 3 3
1.3606808 4 3 3
.5766954 1 3 3
.6797326 5 3 3
.8230124 3 3 3
.8584712 2 3 3
.59267896 1 3 3
1.211958 4 3 3
.8890573 2 3 3
1.0112512 6 3 3
. 2 3 3
.9898938 6 4 2
1.0591949 3 5 3
1.367633 1 5 3
1.1584 1 6 3
1.7946315 1 6 3
. 6 6 3
. 6 6 3
1.3316513 2 7 3
1.2643427 4 8 4
1.402854 2 8 4
1.5368075 2 9 3
1.3019353 2 10 4
.8253586 2 11 3
1.1899409 2 11 3
1.0766286 2 11 3
.9874325 8 12 4
1.278363 2 12 4
.9886444 3 12 4
1.2088873 2 12 4
1.0845821 2 12 4
2.0370996 1 12 4
1.575081 3 12 4
. 7 12 4
1.15797 1 13 2
. 2 13 2
.9725555 2 13 2
.5549259 2 13 2
1.1450877 1 14 3
1.3744744 3 14 3
.9235132 2 14 3
.7059501 2 15 2
.9723693 1 15 2
.7696528 4 15 2
1.4129267 2 16 4
. 7 17 4
.26558498 6 17 4
.7530096 7 17 4
.4046937 4 17 4
1.0993522 2 18 4
1.0162872 2 18 4
1.8039973 2 18 4
1.2506953 1 19 2
1.0112356 4 19 2
.3382055 6 19 2
2.468209 1 20 3
1.2541163 2 20 3
.9272996 3 21 4
2.2145 1 22 4
1.3281648 2 22 4
1.3858925 5 23 2
1.5925432 3 23 2
. 6 23 2
1.0931851 1 23 2
. 2 23 2
.3568257 6 24 1
.6470747 3 24 1
.6730999 2 24 1
.58744943 3 25 1
. 6 25 1
.6586046 2 25 1
.51008946 2 25 1
.6332879 2 26 0
.6149406 2 26 0
1.070049 3 27 1
.47104555 2 27 1
.6699582 3 27 1
1.2817193 1 27 1
.6765088 4 27 1
. 6 27 1
.7971926 1 27 1
.9509648 2 27 1
1.172395 3 27 1
.58902127 2 28 0
.4634099 2 28 0
.821103 4 28 0
1.1809568 1 29 0
. 8 29 0
.871049 2 30 0
.6757722 2 30 0
.5284542 8 31 0
end
label values tip8 tip8
label def tip8 1 "Supermarket", modify
label def tip8 2 "Convenience", modify
label def tip8 3 "Fruit store", modify
label def tip8 4 "Butcher's", modify
label def tip8 5 "Fishmonger's", modify
label def tip8 6 "Bakery", modify
label def tip8 7 "Herbalist", modify
label def tip8 8 "Other", modify
label values ses5 ses5
label def ses5 0 "Low SES", modify
label def ses5 1 "Low-medium SES", modify
label def ses5 2 "Medium SES", modify
label def ses5 3 "Medium-high SES", modify
label def ses5 4 "High SES", modifyCode:
xtmixed affordability i.tip8 || seccionid: i.ses5, mle var
Code:
predict u*, reffects
Code:
BLUP calculation failed; estimation data have changed r(459);
Thank you very much,
Regards.
0 Response to Multilevel mixed-effects linear regression error: BLUP calculation failed; estimation data have changed
Post a Comment