Skip to content
Snippets Groups Projects
  1. Sep 06, 2022
  2. Apr 15, 2022
  3. Apr 13, 2022
  4. Mar 24, 2022
  5. Jan 03, 2022
  6. Dec 20, 2021
  7. Dec 13, 2021
  8. Dec 10, 2021
  9. Nov 09, 2021
  10. Sep 24, 2021
  11. Sep 09, 2021
  12. Sep 08, 2021
  13. Aug 17, 2021
  14. Jul 30, 2021
  15. Jul 21, 2021
  16. Jun 09, 2021
  17. May 26, 2021
    • Stéphane Adjemian's avatar
      Add new comparison methods. · 507ec822
      Stéphane Adjemian authored
      Closes #4.
      
      *Example*
      
      >> a = dseries(randn(4,5),'2000Q1')
      
      a is a dseries object:
      
             | Variable_1 | Variable_2 | Variable_3 | Variable_4 | Variable_5
      2000Q1 | 2.4245     | -1.036     | -0.87587   | -0.57001   | -1.6989
      2000Q2 | 0.9594     | 1.8779     | 0.31995    | -1.0257    | 0.6076
      2000Q3 | -0.31577   | 0.9407     | -0.55829   | -0.90875   | -0.1178
      2000Q4 | 0.42862    | 0.78735    | -0.31143   | -0.2099    | 0.69916
      
      >> a.Variable_3>0
      
      ans =
      
        4x1 logical array
      
         0
         1
         0
         0
      
      >> a(a.Variable_3>0)
      
      ans is a dseries object:
      
             | Variable_1 | Variable_2 | Variable_3 | Variable_4 | Variable_5
      2000Q2 | 0.9594     | 1.8779     | 0.31995    | -1.0257    | 0.6076
      507ec822
    • Stéphane Adjemian's avatar
      Allow selections of periods or variables with vector of logicals. · 5f829d00
      Stéphane Adjemian authored
      Ref #4.
      
      If ts is a dseries object with T periods and N variables, then we can
      instantiate a new dseries object from ts by extracting periods or
      variables. Periods are selected by passing a vector of logicals with T
      elements. Variables are selected by passing a vector of logicals with
      N elements. If T==N, the convention is to pass a row vector to select
      variables and a colum vector to select periods.
      
      *Example*
      
      >> ts = dseries(randn(10,5), '2000Q1')
      
      ts is a dseries object:
      
             | Variable_1 | Variable_2 | Variable_3 | Variable_4 | Variable_5
      2000Q1 | -0.53201   | -1.0642    | 0.39189    | -1.0667    | -0.73417
      2000Q2 | 1.6821     | 1.6035     | -1.2507    | 0.93373    | -0.030814
      2000Q3 | -0.87573   | 1.2347     | -0.94796   | 0.35032    | 0.23235
      2000Q4 | -0.48382   | -0.22963   | -0.74111   | -0.029006  | 0.42639
      2001Q1 | -0.712     | -1.5062    | -0.50782   | 0.18245    | -0.37281
      2001Q2 | -1.1742    | -0.44463   | -0.32058   | -1.5651    | -0.23645
      2001Q3 | -0.19224   | -0.15594   | 0.012469   | -0.084539  | 2.0237
      2001Q4 | -0.27407   | 0.27607    | -3.0292    | 1.6039     | -2.2584
      2002Q1 | 1.5301     | -0.26116   | -0.45701   | 0.098348   | 2.2294
      2002Q2 | -0.24902   | 0.44342    | 1.2424     | 0.041374   | 0.33756
      
      >> ts(mean(ts)>0)
      
      ans is a dseries object:
      
             | Variable_4 | Variable_5
      2000Q1 | -1.0667    | -0.73417
      2000Q2 | 0.93373    | -0.030814
      2000Q3 | 0.35032    | 0.23235
      2000Q4 | -0.029006  | 0.42639
      2001Q1 | 0.18245    | -0.37281
      2001Q2 | -1.5651    | -0.23645
      2001Q3 | -0.084539  | 2.0237
      2001Q4 | 1.6039     | -2.2584
      2002Q1 | 0.098348   | 2.2294
      2002Q2 | 0.041374   | 0.33756
      
      >> ts(ts.dates>=dates('2001Q3'))
      
      ans is a dseries object:
      
             | Variable_1 | Variable_2 | Variable_3 | Variable_4 | Variable_5
      2001Q3 | -0.19224   | -0.15594   | 0.012469   | -0.084539  | 2.0237
      2001Q4 | -0.27407   | 0.27607    | -3.0292    | 1.6039     | -2.2584
      2002Q1 | 1.5301     | -0.26116   | -0.45701   | 0.098348   | 2.2294
      2002Q2 | -0.24902   | 0.44342    | 1.2424     | 0.041374   | 0.33756
      5f829d00
    • Stéphane Adjemian's avatar
    • Stéphane Adjemian's avatar
      Remove unused output argument. · 2ba2997d
      Stéphane Adjemian authored
      2ba2997d
  18. May 13, 2021
  19. May 03, 2021
  20. Mar 17, 2021
  21. Mar 12, 2021
  22. Mar 08, 2021
  23. Feb 26, 2021
  24. Feb 25, 2021
  25. Feb 24, 2021
Loading