Dear all,

when using nbreg, I encountered a problem which I was able to replicate when estimating a logit model. Consider the following example:

Code:
webuse lbw, clear
centile age, centile(90)
logit low age lwt i.race smoke ptl ht ui if age<r(c_1)
As expected, only 169 cases are used. However, when specifying the tech() option, the if statement is ignored and all 189 cases are used:

Code:
centile age, centile(90)
logit low age lwt i.race smoke ptl ht ui if age<r(c_1), tech(bhhh)
This occurs regardless of the specified algorithm.

Using a macro works as expected:
Code:
centile age, centile(90)
local threshold=r(c_1)
logit low age lwt i.race smoke ptl ht ui if age<`threshold', tech(bhhh)
I encountered this behavior using Stata/MP 16.1 as well as Stata/IC 15, both on Windows 10.

What am I missing here?

Best
Christian