Hi,

I am estimating a simple OLS persistence model where I regress f.x on x. x is a variable that takes on the values [0,1]. I estimate this model for each decile of x separately. Somehow, I get negative beta estimates in Stata (although insignificant). If my intuition is correct, the beta estimate must be larger or equal than 0. Is this a statistical or a Stata issue? (see code below)

Code:
gen dum=1 in 1
forval x=1/10{
local i=(`x'/100)*10
local j=`i'-0.1
replace dum=`x' if x>=`j' & x<`i'
reg f.x x if dum==`x'
}