@Test @Ignore public void testMeanNonStationary() { SarimaSpecification spec = new SarimaSpecification(12); spec.airline(); SarimaModel arima = new SarimaModel(spec); arima.setBTheta(1, -.9); arima.setTheta(1, -.6); ArimaModelBuilder builder = new ArimaModelBuilder(); double[] x = builder.generate(arima, 0.05, 300); GlsSarimaMonitor monitor = new GlsSarimaMonitor(null); RegArimaModel reg = new RegArimaModel(arima, new DataBlock(x)); reg.setMeanCorrection(true); RegArimaEstimation rslt = monitor.optimize(reg); System.out.println(rslt.model.getArima().getMA()); System.out.println(rslt.likelihood.getB()[0]); for (int i = 0; i < x.length; ++i) { System.out.println(x[i]); } }
public double[] generate(final IArimaModel arima, final int n) { return generate(arima, 0, n); }
ArimaModelBuilder { public double[] generate(final IArimaModel arima, final int n) { return generate(arima, 0, n); } }
ArimaModelBuilder { public double[] generate(final IArimaModel arima, final int n) { return generate(arima, 0, n); } ArimaModelBuilder(); }
ArimaModelBuilder { public double[] generate(final IArimaModel arima, final int n) { return generate(arima, 0, n); } ArimaModelBuilder(); void setStartMean(double m); void setStartStdev(double e); void setDropCount(int n); double getStartMean(); double getStartStdev(); int getDropCount(); void setRandomNumberGenerator(IRandomNumberGenerator rng); IRandomNumberGenerator getRandomNumberGenerator(); IDistribution getDistribution(); void setDistribution(IDistribution dist); ArimaModel createModel(final Polynomial AR, final Polynomial MA,
            final double var); double[] generate(final IArimaModel arima, final int n); double[] generate(final IArimaModel arima, final double mean, final int n); double[] generateStationary(final IArimaModel starima, final int n); double[] generateStationary(final IArimaModel starima, final double mean, final int n); }
ArimaModelBuilder { public double[] generate(final IArimaModel arima, final int n) { return generate(arima, 0, n); } ArimaModelBuilder(); void setStartMean(double m); void setStartStdev(double e); void setDropCount(int n); double getStartMean(); double getStartStdev(); int getDropCount(); void setRandomNumberGenerator(IRandomNumberGenerator rng); IRandomNumberGenerator getRandomNumberGenerator(); IDistribution getDistribution(); void setDistribution(IDistribution dist); ArimaModel createModel(final Polynomial AR, final Polynomial MA,
            final double var); double[] generate(final IArimaModel arima, final int n); double[] generate(final IArimaModel arima, final double mean, final int n); double[] generateStationary(final IArimaModel starima, final int n); double[] generateStationary(final IArimaModel starima, final double mean, final int n);  }