If all you want is the intercept, then try extracting it manually. In Python's linearmodels package, try the params attribute, indexing by the constant term:
results = model.fit(...)
results.params['const']
Or, if you want all the estimated panel level effects, then try using the estimated_effects attribute:
results = model.fit(...)
results.estimated_effects
In my opinion, the git documentation is inexhaustive to say the least, but it should help to get you what you want.
In Stata, the intercept is succinctly referred to as the "average value" of the fixed effects. To be clear, you're actually considering the following fixed effects model:
$$
y_{it} = \alpha + x_{it}'\beta + \mu_{i} + \epsilon_{it},
$$
where $\alpha$ is a global intercept (i.e., constant term) and $\mu_{i}$ denotes entity (e.g., individual, firm, state, etc.) fixed effects. Note how you cannot estimate a constant term and the entity-specific effects without imposing some kind of constraint. The constraint StataCorp places on the system is that the panel fixed effects sum to 0 across all observations in the sample.
In short, the "intercept" in -xtreg, fe- is the average of $\alpha + \mu_{i}$. Stata's support page discusses this in further detail.
R's plm package estimates a within model using the following equation:
$$
y_{it} = \alpha_{i} + x_{it}'\beta + \epsilon_{it},
$$
where $\alpha_{i}$ denotes entity fixed effects. This amounts to fitting a separate intercept for each unit in your panel. Note how the overall intercept parameter, $\alpha$ (unsubscripted), is not specified. In this context, $\alpha$ would be perfectly collinear with $\alpha_{i}$, as the sum of all the entity-specific effects (i.e., $\alpha_{i}$'s) is one. In R, we can extract these entity-specific intercepts (i.e., fixed effects) from a plm object using the fixef() function.
I should also note that a within_intercept() function is also available in the plm package. I always found it a bit artificial but it does return an "overall intercept" for within models and its accompanying standard error. Under the hood, it's simply a weighted mean of the fixed effects. Review my response here or this answer here for other R applications.
In sum, I wouldn't go looking for consistency across statistical software packages. In my opinion, the intercept is a trivial parameter in fixed effects applications. It's generally safe to omit.
results. Tryresults.params['const']. In Stata, and most other software packages, the intercept is the average value of the fixed effects. In R, try thewithin_intercept()function in theplmpackage (see my answer here for more on this). – Thomas Bilach Nov 24 '21 at 18:35results.params[‘const’]Could you explain more detail? – Chocolate_coffee Nov 25 '21 at 06:00results.estimated_effectsisn’t it? – Chocolate_coffee Nov 25 '21 at 06:45results.estimated_effectscode. – Chocolate_coffee Nov 25 '21 at 07:01