{smcl} {* *! xtbfkbreak version 1.0.0 11jul2026}{...} {vieweralsosee "xtbfkbreak methods" "help xtbfkbreak_methods"}{...} {vieweralsosee "" "--"}{...} {vieweralsosee "xtbreak" "help xtbreak"}{...} {vieweralsosee "xtdcce2" "help xtdcce2"}{...} {vieweralsosee "xtmg" "help xtmg"}{...} {vieweralsosee "xtreg" "help xtreg"}{...} {viewerjumpto "Syntax" "xtbfkbreak##syntax"}{...} {viewerjumpto "Description" "xtbfkbreak##description"}{...} {viewerjumpto "The model" "xtbfkbreak##model"}{...} {viewerjumpto "Options" "xtbfkbreak##options"}{...} {viewerjumpto "How it works" "xtbfkbreak##method"}{...} {viewerjumpto "Interpreting the output" "xtbfkbreak##interpret"}{...} {viewerjumpto "Remarks and practical guidance" "xtbfkbreak##remarks"}{...} {viewerjumpto "Graphs" "xtbfkbreak##graphs"}{...} {viewerjumpto "Stored results" "xtbfkbreak##results"}{...} {viewerjumpto "Examples" "xtbfkbreak##examples"}{...} {viewerjumpto "References" "xtbfkbreak##references"}{...} {viewerjumpto "Author" "xtbfkbreak##author"}{...} {title:Title} {phang} {bf:xtbfkbreak} {hline 2} Common structural breaks in heterogeneous panels with correlated common effects and (optionally) endogenous regressors {p_end} {marker syntax}{...} {title:Syntax} {p 8 17 2} {cmd:xtbfkbreak} {it:depvar} [{it:indepvars}] [{cmd:(}{it:endog} {cmd:=} {it:instruments}{cmd:)}] {ifin} [{cmd:,} {it:options}] {pstd} {it:depvar} is the dependent variable. {it:indepvars} are exogenous regressors whose slopes may break. The optional parenthetical list adds one or more {it:endog}enous regressors together with the {it:instruments} that identify their slopes (as in {helpb ivregress}). The data must be {helpb xtset} as a {bf:balanced} panel. All variables are continuous and numeric. {synoptset 26 tabbed}{...} {synopthdr} {synoptline} {syntab:Breaks} {synopt:{opt br:eaks(#)}}number of common breaks to estimate; default {cmd:breaks(1)}.{p_end} {synopt:{opt tr:im(#)}}minimum regime length as a fraction of T; default {cmd:trim(0.15)}; must be in (0,0.5).{p_end} {synopt:{opt ivb:reak}}locate the break(s) by IV instead of OLS (BFK 2019, Fig. 2); OLS is the default and is theory-preferred.{p_end} {syntab:Factor structure (CCE)} {synopt:{opt noc:ce}}do {it:not} partial out common factors (Model 1: no cross-sectional dependence in the errors).{p_end} {synopt:{opt csa(varlist)}}extra variables whose cross-section averages augment the factor proxies.{p_end} {synopt:{opt lag:s(#)}}number of lags of the cross-section averages added to the factor proxies (Chudik & Pesaran 2015); default {cmd:lags(0)}.{p_end} {syntab:Reporting} {synopt:{opt nocons:tant}}suppress the regime intercepts.{p_end} {synopt:{opt l:evel(#)}}confidence level; default {cmd:level(95)}.{p_end} {synopt:{opt graph}}draw the break-identification and regime-coefficient plots.{p_end} {synopt:{opt ssrname(name)}}name of the SSR plot; default {cmd:xtbfk_ssr}.{p_end} {synopt:{opt coefname(name)}}name of the coefficient plot; default {cmd:xtbfk_coef}.{p_end} {synoptline} {pstd} {cmd:xtbfkbreak} is {helpb estcom:e()}-class. It stores the mean-group coefficient vector and variance (see {help xtbfkbreak##results:Stored results}) and can be {help xtbfkbreak##interpret:replayed} by typing {cmd:xtbfkbreak} without arguments. {marker description}{...} {title:Description} {pstd} {cmd:xtbfkbreak} estimates a heterogeneous panel-data model whose slope coefficients undergo one or more {bf:common structural breaks} at unknown dates, while cross-sectional dependence is generated by an unobserved multifactor error structure. It brings the two papers of Baltagi, Feng and Kao into a single command: {phang2} {bf:(2016)} {browse "https://doi.org/10.1016/j.jeconom.2015.03.048":Baltagi, Feng & Kao} marry Pesaran's (2006) Common Correlated Effects (CCE) estimator to Bai's (1997, 2010) least-squares change-point estimation. Unobserved factors are partialled out with the cross-section averages of {it:depvar} and the regressors; the common break date(s) are then estimated consistently by least squares, and the regime slopes by CCE mean group. A key result is that the panel pins down the break {it:date itself} (super-consistency), not merely the break fraction.{p_end} {phang2} {bf:(2019)} Baltagi, Feng & Kao extend this to {bf:endogenous regressors}. A second endogeneity channel, {cmd:Cov(}{it:eps},{it:v}{cmd:)}{cmd:!=}0, is allowed on top of the factor-induced correlation, and a break in the error-factor loadings is permitted. The break date is still estimated by OLS (which stays consistent under endogeneity, Perron & Yamamoto 2015), and the regime slopes by CCE-IV / 2SLS mean group. Because CCE {it:wipes out} the factors instead of estimating them, a break in the factor loadings needs no special treatment.{p_end} {pstd} Give instruments in the {cmd:(}{it:endog} {cmd:=} {it:instruments}{cmd:)} list to obtain the endogenous-regressor (2019) estimator; omit it for the exogenous (2016) estimator. Use {opt nocce} to drop the factor structure entirely (the papers' "Model 1"). For the algebra, see {help xtbfkbreak_methods:xtbfkbreak methods}. {marker model}{...} {title:The model} {pstd} For panel {it:i}=1,...,N and time {it:t}=1,...,T with a common (unknown) break at {it:k0}: {p 8 8 2}{it:y(it)} = {it:x(it)}'{it:b1(i)} + {it:e(it)}{space 5}for t {c 264} k0,{p_end} {p 8 8 2}{it:y(it)} = {it:x(it)}'{it:b2(i)} + {it:e(it)}{space 5}for t > k0,{p_end} {p 8 8 2}{it:e(it)} = {it:g(i)}(k1)'{it:f(t)} + {it:eps(it)},{space 5}{it:x(it)} = {it:G(i)}'{it:f(t)} + {it:v(it)},{p_end} {pstd} where {it:f(t)} is a vector of {it:m} unobserved common factors with heterogeneous loadings {it:g(i)}. Regressors are endogenous through the factors and, in the 2019 model, also through {cmd:Cov(}{it:eps(it)},{it:v(it)}{cmd:)}{cmd:!=}0. The factor loadings themselves may break at a possibly different date {it:k1}. The parameters of interest are the {bf:cross-sectional means of the regime slopes} and the {bf:break date(s)}. With {it:B} breaks there are {it:R}={it:B}+1 regimes. {marker options}{...} {title:Options} {dlgtab:Breaks} {phang} {opt breaks(#)} sets the number of common breaks. With {it:#}>1 the breaks are located one at a time (the sequential procedure of Bai 2010; BFK 2016 Sec. 5): each new break is the candidate date that most reduces the pooled sum of squared residuals, holding the breaks already found fixed. The regime slopes are then re-estimated jointly given all dates. See {help xtbfkbreak##remarks:choosing the number of breaks}. {phang} {opt trim(#)} forces every regime to contain at least {it:#}{c 215}T periods (and at least as many periods as there are parameters per regime). Larger values stabilise the search near the ends of the sample at the cost of ruling out breaks there. {it:#} must be strictly inside (0,0.5); the default 0.15 is standard. {phang} {opt ivbreak} performs the break {it:search} itself by IV (2SLS). This reproduces the comparison in BFK (2019, Fig. 2). OLS is the default and the theory-preferred choice: it is consistent under endogeneity and avoids weak-instrument problems in the search step, and in the paper's simulations it locates the break more accurately than IV. Use {opt ivbreak} only for comparison. {dlgtab:Factor structure} {phang} {opt nocce} skips the CCE transformation, i.e. estimates the model {it:without} partialling out common factors (BFK 2016 "Model 1"). Use it only when the errors are cross-sectionally independent. Applying {opt nocce} to data that actually contain a common factor leaves that factor in the errors and biases the slopes; conversely, the default (CCE on) is harmless if there is no factor. {phang} {opt csa(varlist)} adds the cross-section averages of {it:varlist} to the factor proxies. Instruments are added to the proxy set automatically (BFK 2019: instruments that load on {it:f(t)} enter the proxy vector). Adding informative extra averages helps when the number of factors is large; see the {help xtbfkbreak##remarks:rank condition}. {phang} {opt lags(#)} augments the factor proxies with {it:#} lags of the cross-section averages, following Chudik & Pesaran (2015) for models with weakly exogenous or dynamic regressors. The first {it:#} periods are dropped from the estimation sample; the reported break dates remain in the original time metric. {dlgtab:Reporting} {phang} {opt noconstant} drops the regime intercepts. By default a separate intercept is fitted for each regime (a "pure" structural change), which also absorbs any regime-specific level shift induced by a fixed effect that enters the regressors. Keep the default unless you are certain no intercept is needed. {phang} {opt level(#)} sets the confidence level for the reported intervals; default is {cmd:c(level)} (usually 95). {phang} {opt graph} draws two graphs (see {help xtbfkbreak##graphs:Graphs}), named by {opt ssrname(name)} and {opt coefname(name)}. {marker method}{...} {title:How it works (three steps)} {pstd} {bf:Step 1 - remove the factors (CCE).} The cross-section averages {it:w(t)}=({it:ybar(t)},{it:xbar(t)}',{it:zbar(t)}') together with a constant proxy the unobserved factors; the annihilator {it:Mw} = {it:I} - {it:W}({it:W}'{it:W}){c 94}(-1){it:W}' removes them (BFK 2016 eq. 20; BFK 2019 eq. 19). Because the averaged idiosyncratic errors vanish as {it:N} grows, {it:w(t)} is a valid proxy even under endogeneity and even when the loadings break. {pstd} {bf:Step 2 - find the break(s).} On the transformed data the pooled objective {it:{&Sigma}(i) SSR(i)(k)} is minimised over candidate dates {it:k} (BFK 2016 eq. 24; BFK 2019 eq. 21). OLS is used (Perron & Yamamoto 2015), or 2SLS under {opt ivbreak}. {pstd} {bf:Step 3 - estimate the regime slopes.} Given the dates, each regime is fitted by CCE (exogenous) or CCE-IV / 2SLS (endogenous; BFK 2019 eq. 23-24) for every panel, and averaged into the {bf:mean-group} estimator with Pesaran's (2006) non-parametric MG variance. The full derivation is in {help xtbfkbreak_methods:xtbfkbreak methods}. {marker interpret}{...} {title:Interpreting the output} {pstd} The header block reports the estimator actually run ({cmd:CCE-MG} vs {cmd:CCE-MG-IV}), whether factors were partialled out, whether the break search used OLS or IV, the panel dimensions, the trimming fraction, the number of breaks and regimes, and the {bf:estimated break date(s)}. A break date is reported as the {it:last period of the pre-break regime}: "Break date = 20" means regime 1 is {it:t}=1,...,20 and regime 2 starts at {it:t}=21. {pstd} {bf:Mean-group regime slopes.} For each regime the table gives, per regressor, the cross-sectional mean of the individual CCE (or CCE-IV) slopes, its mean-group standard error, the {it:z} statistic, {it:p}-value, and confidence interval. Read a coefficient as the {it:average marginal effect of the regressor within that regime} across the {it:N} panels. The {cmd:_cons} line in each regime is the regime intercept; it is a nuisance level term (it also soaks up any fixed-effect level shift) and is rarely of substantive interest. {pstd} {bf:Structural change in slopes.} The second table reports, for each consecutive pair of regimes, {&delta} = (regime {it:r} slope) - (regime {it:r}-1 slope), with a standard error built from the mean-group variance (Var({&delta}) = V(r,r)+V(r-1,r-1)-2V(r,r-1)). This is the quantity of primary interest: {bf:a significant {&delta} is direct evidence that the slope changed at the estimated break}. A {&delta} indistinguishable from zero means the regressor's effect did not move across that break, even though a break in {it:some} coefficient was imposed. {pstd} {bf:Significance stars} mark {it:p}<.10 (*), {it:p}<.05 (**), {it:p}<.01 (***). Standard errors are the non-parametric mean-group standard errors across panels (Pesaran 2006); they capture slope {it:heterogeneity} across units and require a reasonably large {it:N} to be reliable. {pstd} {bf:What the break date does and does not tell you.} Consistency of the break date (Theorem 1) means that, as {it:N} and {it:T} grow, the estimated date concentrates on the true date. The command does {it:not} currently test the null of "no break" nor report a confidence interval for the date; decide on the presence and number of breaks from theory, from the shape of the {help xtbfkbreak##graphs:SSR profile}, and from whether the {&delta} contrasts are significant. Re-running with {opt breaks()} increased and checking whether the extra {&delta} is significant is a practical guide. {pstd} {bf:Replay.} Type {cmd:xtbfkbreak} with no arguments (optionally with {opt level()}) to redisplay the last results without re-estimating. {marker remarks}{...} {title:Remarks and practical guidance} {pstd} {bf:Sample size.} The theory is a joint ({it:N},{it:T}){&rarr}{&infin} asymptotic with {it:sqrt(T)/N}{&rarr}0. Both dimensions should be moderately large; the mean-group standard errors in particular need a sizeable {it:N} (say {it:N}{c 264}20). With a small {it:N} the point estimates can still be informative but the reported SEs are noisy. {pstd} {bf:The rank condition.} CCE requires the number of factors {it:m} to be no larger than {it:p}+1 (regressors plus the dependent variable) {it:in each regime}, and the mean factor loadings to be non-zero. Under a break this is more demanding than in Pesaran (2006), because the averaging matrix must span the factor {it:and} its regime-split copy. If you suspect many factors, add informative variables through {opt csa()} to enrich the proxy set. {pstd} {bf:Choosing the number of breaks.} There is no built-in test for the number of breaks; {opt breaks()} must be supplied. A workable strategy: start from {cmd:breaks(1)}, inspect the {help xtbfkbreak##graphs:SSR profile} for one clear trough, and increase {opt breaks()} only while each additional {&delta} contrast remains significant and each new regime respects {opt trim()}. {pstd} {bf:Endogeneity and instruments.} Supply instruments only for genuinely endogenous regressors. After the CCE transformation and the regime intercepts, an instrument is only useful through the part of it that is {it:orthogonal to the factors and to the fixed effect} - it must move the regressor's idiosyncratic component. An instrument that correlates with the regressor {it:only} through the common factor or a unit fixed effect is weak once those are partialled out, and the IV slopes will be imprecise. The break {it:date} is unaffected: it is found by OLS by default, which is why OLS-search is recommended even in endogenous models. {pstd} {bf:When to use} {opt nocce}{bf:.} Only when the errors are cross-sectionally independent (no common factors, no spatial dependence). If in doubt, leave CCE on: it is asymptotically harmless when there is no factor but essential when there is. {pstd} {bf:Balanced panels only.} The command requires a balanced panel on the estimation sample and errors out otherwise; fill gaps or restrict the sample first. {marker graphs}{...} {title:Graphs} {pstd} With {opt graph}, {cmd:xtbfkbreak} draws: {phang2} {bf:(a) Break-point identification} ({cmd:xtbfk_ssr}) - the concentrated pooled SSR against the candidate date. The estimated break(s) sit at the trough(s), marked by dashed vertical lines. A sharp, deep, well-separated trough indicates a clearly identified break; a flat profile warns that the date is weakly identified. {phang2} {bf:(b) Mean-group slope by regime} ({cmd:xtbfk_coef}) - each regressor's mean-group slope in each regime with its confidence interval, one panel per regressor. A visible level shift between regimes with non-overlapping intervals is the graphical counterpart of a significant {&delta}. {pstd} The SSR profile is also stored in {cmd:e(ssrprofile)} for custom plotting. {marker results}{...} {title:Stored results} {pstd}{cmd:xtbfkbreak} stores the following in {cmd:e()}: {synoptset 24 tabbed}{...} {p2col 5 24 28 2: Scalars}{p_end} {synopt:{cmd:e(N)}}number of panels{p_end} {synopt:{cmd:e(T)}}time periods{p_end} {synopt:{cmd:e(T_eff)}}effective periods used (after {opt lags()}){p_end} {synopt:{cmd:e(k_breaks)}}number of breaks{p_end} {synopt:{cmd:e(N_regime)}}number of regimes (= breaks+1){p_end} {synopt:{cmd:e(trim)}}trimming fraction{p_end} {synopt:{cmd:e(lags)}}number of CSA lags{p_end} {synopt:{cmd:e(ssr)}}pooled sum of squared residuals at the solution{p_end} {synopt:{cmd:e(df_m)}}model degrees of freedom{p_end} {p2col 5 24 28 2: Macros}{p_end} {synopt:{cmd:e(cmd)}}{cmd:xtbfkbreak}{p_end} {synopt:{cmd:e(depvar)}}dependent variable{p_end} {synopt:{cmd:e(indepvars)}}exogenous regressors{p_end} {synopt:{cmd:e(endog)}}endogenous regressors{p_end} {synopt:{cmd:e(insts)}}instruments{p_end} {synopt:{cmd:e(breaks)}}estimated break date(s), calendar time{p_end} {synopt:{cmd:e(estimator)}}CCE-MG or CCE-MG-IV{p_end} {synopt:{cmd:e(transform)}}factor control used{p_end} {synopt:{cmd:e(breaksrch)}}OLS or IV break search{p_end} {synopt:{cmd:e(panelvar)}}, {cmd:e(timevar)}panel and time variables{p_end} {p2col 5 24 28 2: Matrices}{p_end} {synopt:{cmd:e(b)}}mean-group coefficient vector (equation = regime){p_end} {synopt:{cmd:e(V)}}mean-group variance matrix{p_end} {synopt:{cmd:e(bi)}}panel-by-panel coefficients (N {c 215} k){p_end} {synopt:{cmd:e(breakdates)}}estimated break date(s){p_end} {synopt:{cmd:e(ssrprofile)}}candidate date and pooled SSR (single-break profile){p_end} {p2col 5 24 28 2: Functions}{p_end} {synopt:{cmd:e(sample)}}estimation sample{p_end} {marker examples}{...} {title:Examples} {pstd}{bf:Exogenous model, one break (BFK 2016)} - recover regime slopes and the break date, with graphs:{p_end} {phang2}{cmd:. webuse grunfeld, clear}{p_end} {phang2}{cmd:. xtset company year}{p_end} {phang2}{cmd:. xtbfkbreak invest mvalue kstock, breaks(1) graph}{p_end} {pstd}Read the second table's {&delta} row: a significant {&delta} on {cmd:mvalue} means the investment-{cmd:mvalue} elasticity changed at the estimated year.{p_end} {pstd}{bf:Endogenous regressor (BFK 2019)} - instrument {cmd:mvalue} with its lag:{p_end} {phang2}{cmd:. xtbfkbreak invest kstock (mvalue = L.mvalue), breaks(1)}{p_end} {pstd}{bf:Two breaks, tighter trimming:}{p_end} {phang2}{cmd:. xtbfkbreak invest mvalue kstock, breaks(2) trim(0.10)}{p_end} {pstd}{bf:Compare OLS and IV break search (BFK 2019, Fig. 2):}{p_end} {phang2}{cmd:. xtbfkbreak y (x = z), breaks(1)}{p_end} {phang2}{cmd:. xtbfkbreak y (x = z), breaks(1) ivbreak}{p_end} {pstd}{bf:No factor structure (Model 1):}{p_end} {phang2}{cmd:. xtbfkbreak y x, breaks(1) nocce}{p_end} {pstd}A complete simulated demonstration of every option, with the true break and slopes known, ships as {cmd:xtbfkbreak_example.do} ({stata "doedit xtbfkbreak_example.do":open it}). {marker references}{...} {title:References} {phang}Bai, J. 1997. Estimation of a change point in multiple regression models. {it:Review of Economics and Statistics} 79: 551-563.{p_end} {phang}Bai, J. 2010. Common breaks in means and variances for panel data. {it:Journal of Econometrics} 157: 78-92.{p_end} {phang}Baltagi, B. H., Q. Feng, and C. Kao. 2016. Estimation of heterogeneous panels with structural breaks. {it:Journal of Econometrics} 191: 176-195. {browse "https://doi.org/10.1016/j.jeconom.2015.03.048":doi:10.1016/j.jeconom.2015.03.048}.{p_end} {phang}Baltagi, B. H., Q. Feng, and C. Kao. 2019. Structural changes in heterogeneous panels with endogenous regressors. Center for Policy Research Working Paper 214, Syracuse University.{p_end} {phang}Chudik, A., and M. H. Pesaran. 2015. Common correlated effects estimation of heterogeneous dynamic panel data models with weakly exogenous regressors. {it:Journal of Econometrics} 188: 393-420.{p_end} {phang}Perron, P., and Y. Yamamoto. 2015. Using OLS to estimate and test for structural changes in models with endogenous regressors. {it:Journal of Applied Econometrics} 30: 119-144.{p_end} {phang}Pesaran, M. H. 2006. Estimation and inference in large heterogeneous panels with a multifactor error structure. {it:Econometrica} 74: 967-1012.{p_end} {marker author}{...} {title:Author} {pstd}Dr Merwan Roudane{p_end} {pstd}merwanroudane920@gmail.com{p_end} {pstd}{browse "https://github.com/merwanroudane":github.com/merwanroudane}{p_end} {pstd}See also {help xtbfkbreak_methods:xtbfkbreak methods} for the estimation mathematics.{p_end}