I'm trying to run 2sri approach in Stata 15. My first stage is a probit regression and the second regression is tobit (using xtdpf code from the website)

My code is as:
program twosri, eclass
xtset gvkey year
tempname b
tempvar Xhat
tempvar a1
capture drop Xuhat
global Z "a b c d "
probit X IV $Z i.year i.industry, r
predict `Xhat'
matrix `a1'=e(b)
gen Xuhat=X-`Xhat'
global Z "a b c d"
xtdpf Y X $Z Xuhat, timedummies
matrix `b' = e(b)
ereturn post `b'
end
**************************************************
** Bootstrap. **
*************************************************/
xtset, clear
gen gvkey2=gvkey
bootstrap _b, reps(500) seed (10101) nodots nowarn cluster(gvkey) idcluster(gvkey2) : twosri



then the system reports the error "repeated time values within panel", please help me to figure out the cause of the error. I will appreciate for any help!