Hi, I am a Stata beginner.

I want to use xtivreg2 to do a 2SLS estimation with two way fixed effect and clustering error. My data is already in the panel setting.
Endogenous variable: chinapeindDE
Instrument: chinainapeindUK

#xtivreg2 cta lntotal_assets lntotal_assetsquar cfta LnNoE salegrowth leverage PriGdp markcapGdp Growth i.year (chinapeindDE=chinapeindUK),fe vce(cluster nace)#
Then the output is factor-variable operators not allowed
I wonder are there any other command that allows me to do the estimation with two way fixed effect and cluster error at "nace "level?