Changeset 0afebdc in tol


Ignore:
Timestamp:
Sep 17, 2009, 11:27:56 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
cd15fee
Parents:
8107325
Message:

Fixes #746

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1389 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bmodel/estim.cpp

    r8107325 r0afebdc  
    10171017{
    10181018  BUserTimeSerie* z      = Tsr(Arg(1));
    1019   BSerieTable   zTable; zTable.AddSerie(z);
    1020 
     1019  if(!z->IsStochastic())
     1020  {
     1021    Error(I2
     1022    (
     1023     "Cannot apply BoxCoxTrans to an infinite time series.",
     1024     "No se puede aplicar BoxCoxTrans a una serie infinita"
     1025    ));
     1026    return;
     1027  }
     1028  BSerieTable   zTable;
     1029  zTable.AddSerie(z);
     1030  zTable.Fill(z->FirstDate(), z->LastDate());
    10211031  BInt period = 10;
    10221032  if(Arg(3)) { period = (BInt)Real(Arg(3)); }
    … …  
    10351045    ));
    10361046  }
    1037 
     1047  if(zTable.NumDates()<=3*period)
     1048  {
     1049    Error(I2
     1050    (
     1051     "Cannot apply BoxCoxTrans to a time series with length ",
     1052     "No se puede aplicar BoxCoxTrans a una serie temporal de longitud "
     1053    )+
     1054    zTable.NumDates()+" <= 3*intervalLength = "+(3*period));
     1055  }
    10381056  if(Arg(2))
    10391057  {
    … …  
    10521070      Warning(I2
    10531071      (
    1054        "Empty options parameter in BoxCoxTransfunction. "
     1072       "Empty options parameter in BoxCoxTrans function. "
    10551073       "It is assumed the defect value :",
    10561074       "Parámetro de opciones vacío en función BoxCoxTrans. "
Note: See TracChangeset for help on using the changeset viewer.