Hi I have a relatively similar question as posted here (no observations in stata - Statalist), but I am hoping someone can explain to me why this error is occurring with my situation. I have a dataset with approximately 69 observations (below).
When I attempt to perform a reverse selection for my beta regression model with "Adult_Res_ESBL" as outcome and other variables as predictors using "stepwise, pr(0.1): betareg Adult_Res_ESBL h_stand dairykern_stand beefkern_stand wildlife_res_stand if County == "B" & !missing(wildlife_res_stand) & !missing(SomeAccess) & !missing(MaxAccess) & !missing(FarmLivestock) & !missing(Import_YN) & !missing(Herd_Size) & !missing(H_CDL) & !missing(DairyKernMEAN) & !missing(BeefKernMEAN) & !missing(WWTPNEAR_DIST) & !missing(HospNEAR_DIST)", there is an output (output 1 below).
However, when I remove "wildlife_res_stand" and "!missing(wildlife_res_stand), which should increase the number of observations because that is a relatively sparse field, I receive the error "no observations". Does anyone have any suggestions for how to handle this error?
I spoke with my advisor who suggested investigating the estimation procedure for the betareg function but I have not found a great source to elucidate further.
When I attempt to perform a reverse selection for my beta regression model with "Adult_Res_ESBL" as outcome and other variables as predictors using "stepwise, pr(0.1): betareg Adult_Res_ESBL h_stand dairykern_stand beefkern_stand wildlife_res_stand if County == "B" & !missing(wildlife_res_stand) & !missing(SomeAccess) & !missing(MaxAccess) & !missing(FarmLivestock) & !missing(Import_YN) & !missing(Herd_Size) & !missing(H_CDL) & !missing(DairyKernMEAN) & !missing(BeefKernMEAN) & !missing(WWTPNEAR_DIST) & !missing(HospNEAR_DIST)", there is an output (output 1 below).
However, when I remove "wildlife_res_stand" and "!missing(wildlife_res_stand), which should increase the number of observations because that is a relatively sparse field, I receive the error "no observations". Does anyone have any suggestions for how to handle this error?
I spoke with my advisor who suggested investigating the estimation procedure for the betareg function but I have not found a great source to elucidate further.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str1 County double Adult_Res_ESBL float(h_stand dairykern_stand beefkern_stand wildlife_res_stand) "A" .010413787697006028 .56159365 -.18140635 -.9818244 . "A" .005974910611648814 -.09779117 -.3410016 -.45496625 -.005848474 "" . . . . . "A" .000057822612747190216 -.470439 -.07183883 -.0418575 -.006885073 "A" .0036042094159723773 -.28406972 .3102941 3.075861 . "B" . .7205552 -.11922163 -.986141 . "B" .00022276432368234018 .9445554 .8574577 -.6137585 -.006889232 "B" 1.000e-08 .6004553 1.0196443 -.5914747 . "B" 3.708982802780827e-07 1.1435293 .7869495 -.6849468 . "B" .007135803354753441 .6296864 .8292803 -.3441681 . "B" .062500005 -.1996507 .9389117 -.7636957 -.006802789 "B" 1.000e-08 .5087349 .9819379 -.5968383 . "B" 3.7890136054421768e-06 .4611996 .9197039 -.7507252 -.006872643 "B" 1.000e-08 -.22933945 .6628096 2.2968295 . "B" .0003074566310949159 -.09487648 1.1809835 3.21312 -.00464945 "B" .0029887946434567704 .4888917 1.3176657 -.8110185 -.004751146 "B" .0005411305411255411 .8257725 .5392841 1.3801568 . "B" .014782311519594655 .5035158 1.1024483 -.4689167 -.006848556 "B" .017737082948682398 1.1652253 1.0457335 .028338427 -.00681396 "B" .004580790590548549 .9927385 .984697 -1.0385243 -.006602556 "B" 1.8344914013904134e-06 .9777048 .7167819 -.5984433 -.004751146 "B" .005235043861799425 .960099 .9950309 -.3905323 .001405997 "B" .24620535714285713 1.3246374 .7331297 -.4059121 . "B" .005636110188343995 . .980153 -.3846744 -.006889236 "B" .033619452779111644 . 1.0396208 -.3802326 . "B" .0007093311942153359 .6751089 .848569 .597278 -.006803065 "B" .004018496454552835 .6125379 1.055388 .25478962 . "B" .01097638671973824 .6959932 .7467434 .22562805 . "B" .014144964143657637 . -.013478243 -.167303 -.004751146 "B" .010644404460188935 .9238241 1.07795 -.722593 .0001037 "B" .005476997987663372 .7467261 1.1286021 -.7439111 -.004751146 "B" .000024207154434712574 1.0240388 .4248944 -.6927644 . "B" .00010984765253057938 1.012859 .7794555 -.02379079 -.004289746 "B" .00011574574074074074 .7049913 1.315886 -.19396158 .21196434 "B" 1.000e-08 .9203275 1.0082839 -.26147956 -.006794166 "B" .0008313447129186602 -.14565544 .9048413 -.4282168 . "B" 1.000e-08 .3205093 -1.1409297 -.49929845 . "B" .0015396875396825396 .9011276 -1.1414543 -.29631478 -.006875886 "C" 1.000e-08 -.7825692 -1.1531996 -.26652265 -.006889232 "C" .019924242424242424 -.8993682 -1.1467012 -.3536408 -.003846266 "C" .026587301587301587 -.5596062 -1.1592528 -.18730263 -.006889232 "C" 1.000e-08 -.5414124 -1.1442583 -.1663779 -.006889232 "C" .015000000000000001 -.47717065 -1.157569 -.3133174 -.006637148 "C" .006222222222222223 -.7813948 -1.1556836 .1185969 -.006889232 "C" .0004292929292929293 -.20039025 -1.152707 -.41068435 -.006881791 "C" 1.000e-08 -.5994968 -1.1610153 .818488 -.006889232 "C" .02167674731182796 -1.1172055 -1.1540314 .7337947 -.006659773 "C" 1.000e-08 -1.7957867 -1.1656958 .9133849 -.006889232 "C" .014798072660345524 -1.458521 -1.1176392 3.9049 -.006889232 "C" .000289669005556336 .04956792 -1.189643 -.3848584 . "C" 1.000e-08 .19768025 -1.187266 .6926791 .004169557 "C" 1.000e-08 -2.3342626 -1.208055 -.001191989 -.005824755 "C" .005542388107088989 -1.506056 -1.1557913 -.20597467 -.005915749 "C" .031157191887083217 -2.842635 -1.1225733 -.18730263 .002405899 "C" 1.000e-08 .017108921 -1.1408812 -.1663779 -.006848267 "C" 1.000e-08 . -1.1441882 -.3536408 -.006760196 "C" 1.000e-08 -.17321014 -1.1225733 .7337947 -.006888193 "C" .0002470405731225297 -2.3817506 -1.1408812 -.26147956 -.006817623 "C" 4.171666666666668e-06 -1.6386383 -1.144188 -.41068435 -.006764919 . . . . . end
Comment