ivxj.xj ======= .. py:module:: ivxj.xj Functions --------- .. autoapisummary:: ivxj.xj.xj ivxj.xj.xjackk_for_odd_time_len Module Contents --------------- .. py:function:: xj(xlong, Tlens) Compute the XJ estimate for unbalanced panel data with a single regressor. This function applies the X-jackknife method to panel data following an AR(1) process, allowing for unbalanced panels where individuals may have different time lengths. :param xlong: Stacked column vector of the regressor for all individuals: (x_1, ..., x_n)'. :type xlong: array-like of shape (n_total,), dtype=float64 :param Tlens: Vector of individual time lengths: (T_1, ..., T_n). :type Tlens: array-like of shape (n,), dtype=int :returns: **rho_hat** -- The XJ estimate of the AR(1) coefficient rho. :rtype: float .. py:function:: xjackk_for_odd_time_len(x, xx_for_correction, x0_for_correction) Auxiliary function to handle time series with odd lengths. This function adjusts calculations when the time series length is odd, using correction terms to ensure accurate estimation of the AR(1) coefficient. :param x: The time series data. :type x: array-like, dtype=float64 :param xx_for_correction: Correction term applied to adjust for odd-length series in the calculation. :type xx_for_correction: float :param x0_for_correction: Additional correction term for adjustment in the calculation. :type x0_for_correction: float :returns: * **numer** (*float*) -- Numerator used in the calculation of rho_hat. * **denom** (*float*) -- Denominator used in the calculation of rho_hat.