Variable Star Data

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: ucmex02.sas
 Description: Example program from SAS/ETS User's Guide,
              The UCM Procedure
       Title: Variable Star Data
     Product: SAS/ETS Software
        Keys: equally spaced univariate time series data
        PROC: UCM
       Notes:

--------------------------------------------------------------*/

ods graphics on;

data star;
   input magnitude @@;
   day = _n_;
datalines;
  25  28  31  32  33  33  32  31  28   25   22   18
  14  10   7   4   2   0   0   0   2    4    8   11
  15  19  23  26  29  32  33  34  33   32   30   27
  24  20  17  13  10   7   5   3   3    3    4    5
   7  10  13  16  19  22  24  26  27   28   29   28
  27  25  24  21  19  17  15  13  12   11   11   10
  10  11  12  12  13  14  15  16  17   18   19   19
  19  19  20  20  20  20  20  20  20   20   21   20
  20  20  20  19  18  17  16  15  13   12   11   10
   9   9  10  10  11  12  14  16  19   21   24   25
  27  28  29  29  28  27  25  23  20   17   14   11
   8   5   4   2   2   2   4   6   9   12   16   19
  23  27  30  32  33  34  33  32  30   27   24   20
  16  12   9   5   3   1   0   0   1    3    6    9
  13  17  21  24  27  30  32  33  33   32   31   28
  25  22  19  15  12   9   7   5   4    4    5    5
   7   9  12  14  17  20  22  24  25   26   27   27
  26  25  24  22  20  18  17  15  14   13   13   12
  12  12  13  13  13  14  14  15  15   16   17   17
  17  17  18  18  19  19  20  20  21   21   22   22
  22  22  22  21  20  19  17  16  14   12   11    9
   8   7   8   8   9  10  12  14  17   20   23   25
  27  29  30  30  30  29  27  25  22   19   16   12
   9   6   4   2   1   1   2   4   7   10   14   17
  21  25  29  31  33  34  34  33  31   29   26   22
  19  14  11   7   4   2   1   0   1    2    5    7
  11  15  19  22  25  28  30  32  32   32   31   29
  26  23  21  17  14  11   9   7   6    5    6    6
   7   9  11  13  15  18  20  22  23   24   25   25
  25  24  24  22  21  19  18  17  16   15   15   14
  14  14  14  14  14  14  14  14  14   14   15   15
  15  15  16  16  17  18  19  20  21   22   23   23
  24  24  24  23  22  21  19  17  15   13   11    9
   7   6   6   6   7   8  10  12  15   18   22   24
  27  29  31  31  31  31  29  27  24   21   18   14
  10   7   5   2   1   0   1   2   5    8   12   15
  19  23  27  30  32  34  34  34  32   30   28   24
  20  16  13   9   6   3   2   1   1    2    4    6
   9  13  17  20  23  26  28  30  31   31   31   29
  27  24  22  19  16  13  11   9   8    7    7    7
   8   9  11  12  14  16  18  20  21   22   23   23
  23  23  23  22  21  20  19  18  18   17   17   16
  16  16  16  15  15  15  14  14  13   13   13   13
  13  13  14  14  15  16  18  19  21   22   24   24
  25  26  26  25  24  23  21  19  16   14   12    9
   7   5   5   4   5   6   8  10  13   16   20   23
  26  29  31  32  32  32  31  29  26   23   20   16
  12   8   6   3   1   0   0   1   3    6   10   13
  17  21  25  28  31  33  34  34  33   31   29   26
  22  18  15  11   8   5   3   2   2    2    4    5
;

proc timeseries data=star plot=series;
   var magnitude;
run;

ods output CycleDescription = cycledesc;
proc ucm data=star;
   model magnitude;
   irregular;
   level var=0 noest;
   cycle;
   cycle;
   estimate;
run;

proc print data=cycledesc noobs;
   var name type period rho  ErrorVar;
run;