DynamicFactorModel implements Cloneable, IProcResults { public IMSsf ssfRepresentation() { return new Ssf(); } DynamicFactorModel(int c, int nf); static IMeasurement measurement(final MeasurementType type); static MeasurementType getMeasurementType(final IMeasurement m); static IMeasurement measurement(final int len, final MeasurementType type); void rescaleVariances(double cvar); void normalize(); void lnormalize(); @Override DynamicFactorModel clone(); boolean copy(DynamicFactorModel m); DynamicFactorModel compactFactors(int from, int to); int getBlockLength(); int getFactorsCount(); void setBlockLength(int c); void setTransition(TransitionDescriptor desc); TransitionDescriptor getTransition(); List<MeasurementDescriptor> getMeasurements(); void addMeasurement(MeasurementDescriptor desc); void clearMeasurements(); IMSsf ssfRepresentation(); int getMeasurementsCount(); void setInitialization(VarSpec.Initialization init); VarSpec.Initialization getInitialization(); void setInitialCovariance(Matrix v0); boolean isValid(); void setDefault(); @Override String toString(); @Override Map<String, Class> getDictionary(); @Override T getData(String id, Class<T> tclass); @Override boolean contains(String id); @Override List<ProcessingInformation> getProcessingInformation(); static void fillDictionary(String prefix, Map<String, Class> map); static Map<String, Class> dictionary(); static void addMapping(String name, InformationMapper.Mapper<DynamicFactorModel, T> mapping); static final double AR_DEF; static final String NLAGS; }
@Test public void testDavidModel() { IMSsf ssf = dmodel.ssfRepresentation(); Matrix t = new Matrix(ssf.getStateDim(), ssf.getStateDim()); ssf.T(0, t.subMatrix()); assertTrue(t.minus(T).nrm2() < 1e-9); Matrix tvar = new Matrix(ssf.getStateDim(), ssf.getStateDim()); ssf.V(0, tvar.subMatrix()); assertTrue(tvar.minus(TVar).nrm2() < 1e-9); Matrix z = new Matrix(ssf.getVarsCount(), ssf.getStateDim()); ssf.Z(0, z.subMatrix()); assertTrue(z.minus(Z).nrm2() < 1e-6); }