sandbox.tsa.movstat.movmean()

statsmodels.sandbox.tsa.movstat.movmean statsmodels.sandbox.tsa.movstat.movmean(x, windowsize=3, lag='lagged') [source] moving window mean Parameters: x : array time series data windsize : int window size lag : ?lagged?, ?centered?, or ?leading? location of window relative to current position Returns: mk : array moving mean, with same shape as x Notes for leading and lagging the data array x is extended by the closest value of the array

sandbox.tsa.fftarma.ArmaFft()

statsmodels.sandbox.tsa.fftarma.ArmaFft class statsmodels.sandbox.tsa.fftarma.ArmaFft(ar, ma, n) [source] fft tools for arma processes This class contains several methods that are providing the same or similar returns to try out and test different implementations. Notes TODO: check whether we don?t want to fix maxlags, and create new instance if maxlag changes. usage for different lengths of timeseries ? or fix frequency and length for fft check default frequencies w, terminology norw n_or_w

sandbox.tools.tools_pca.pcasvd()

statsmodels.sandbox.tools.tools_pca.pcasvd statsmodels.sandbox.tools.tools_pca.pcasvd(data, keepdim=0, demean=True) [source] principal components with svd Parameters: data : ndarray, 2d data with observations by rows and variables in columns keepdim : integer number of eigenvectors to keep if keepdim is zero, then all eigenvectors are included demean : boolean if true, then the column mean is subtracted from the data Returns: xreduced : ndarray, 2d, (nobs, nvars) projection of the

sandbox.sysreg.SUR()

statsmodels.sandbox.sysreg.SUR class statsmodels.sandbox.sysreg.SUR(sys, sigma=None, dfk=None) [source] Seemingly Unrelated Regression Parameters: sys : list [endog1, exog1, endog2, exog2,...] It will be of length 2 x M, where M is the number of equations endog = exog. sigma : array-like M x M array where sigma[i,j] is the covariance between equation i and j dfk : None, ?dfk1?, or ?dfk2? Default is None. Correction for the degrees of freedom should be specified for small samples. See t

sandbox.tools.tools_pca.pca()

statsmodels.sandbox.tools.tools_pca.pca statsmodels.sandbox.tools.tools_pca.pca(data, keepdim=0, normalize=0, demean=True) [source] principal components with eigenvector decomposition similar to princomp in matlab Parameters: data : ndarray, 2d data with observations by rows and variables in columns keepdim : integer number of eigenvectors to keep if keepdim is zero, then all eigenvectors are included normalize : boolean if true, then eigenvectors are normalized by sqrt of eigenvalues

sandbox.sysreg.Sem2SLS()

statsmodels.sandbox.sysreg.Sem2SLS class statsmodels.sandbox.sysreg.Sem2SLS(sys, indep_endog=None, instruments=None) [source] Two-Stage Least Squares for Simultaneous equations Parameters: sys : list [endog1, exog1, endog2, exog2,...] It will be of length 2 x M, where M is the number of equations endog = exog. indep_endog : dict A dictionary mapping the equation to the column numbers of the the independent endogenous regressors in each equation. It is assumed that the system is inputed a

sandbox.stats.runs.runstest_2samp()

statsmodels.sandbox.stats.runs.runstest_2samp statsmodels.sandbox.stats.runs.runstest_2samp(x, y=None, groups=None, correction=True) [source] Wald-Wolfowitz runstest for two samples This tests whether two samples come from the same distribution. Parameters: x : array_like data, numeric, contains either one group, if y is also given, or both groups, if additionally a group indicator is provided y : array_like (optional) data, numeric groups : array_like group labels or indicator the dat

sandbox.stats.runs.runstest_1samp()

statsmodels.sandbox.stats.runs.runstest_1samp statsmodels.sandbox.stats.runs.runstest_1samp(x, cutoff='mean', correction=True) [source] use runs test on binary discretized data above/below cutoff Parameters: x : array_like data, numeric cutoff : {?mean?, ?median?} or number This specifies the cutoff to split the data into large and small values. correction: bool : Following the SAS manual, for samplesize below 50, the test statistic is corrected by 0.5. This can be turned off with corr

sandbox.stats.runs.symmetry_bowker()

statsmodels.sandbox.stats.runs.symmetry_bowker statsmodels.sandbox.stats.runs.symmetry_bowker(table) [source] Test for symmetry of a (k, k) square contingency table This is an extension of the McNemar test to test the Null hypothesis that the contingency table is symmetric around the main diagonal, that is n_{i, j} = n_{j, i} for all i, j Parameters: table : array_like, 2d, (k, k) a square contingency table that contains the count for k categories in rows and columns. Returns: statistic

sandbox.stats.runs.median_test_ksample()

statsmodels.sandbox.stats.runs.median_test_ksample statsmodels.sandbox.stats.runs.median_test_ksample(x, groups) [source] chisquare test for equality of median/location This tests whether all groups have the same fraction of observations above the median. Parameters: x : array_like data values stacked for all groups groups : array_like group labels or indicator Returns: stat : float test statistic pvalue : float pvalue from the chisquare distribution others ???? : currently some