2017年4月26日水曜日

Data - GDP, PAYEMS and UNDCONTSA for 2017Q3 and Q4.


> last(GDP)
               GDP
2016-10-01 18869.4
last(GDP) *  1.024^(3/4)
                GDP
2017-07-01 19208.04
> last(GDP) *  1.024^(4/4)
                GDP
2017-10-01 19322.27
> as.xts(forecast(auto.arima(PA),h=10)$mean[1:10],as.Date(as.yearmon(seq(mondate(index(last(PA)))+1,by=1,length.out=10))))[(3-month(index(last(PA))) %% 3) + c(1,4,7)]
               [,1]
2017-07-01 146452.6
2017-10-01 146868.5
2018-01-01 147271.4
> as.xts(forecast(auto.arima(UC),h=10)$mean[1:10],as.Date(as.yearmon(seq(mondate(index(last(UC)))+1,by=1,length.out=10))))[(3-month(index(last(PA))) %% 3) + c(1,4,7)]
               [,1]
2017-07-01 1102.529
2017-10-01 1110.716
2018-01-01 1117.029

> my_sp5(19208.04,146452.6,1102.529)
[1] "m_m params! to.quarter w/ GDPC96"
[1] 1928.808
[1] "m_m params! apply.quarter w/ GDPC96"
[1] 1892.213
[1] "m_m params! apply.quarter - UC w/ GDPC96"
[1] 2067.087
[1] "m_m params! apply.quarter - UC w/ nominal GDP"
[1] 2406.39

> my_sp5(19322.27,146868.5,1110.716)
[1] "m_m params! to.quarter w/ GDPC96"
[1] 1955.476
[1] "m_m params! apply.quarter w/ GDPC96"
[1] 1915.963
[1] "m_m params! apply.quarter - UC w/ GDPC96"
[1] 2104.267
[1] "m_m params! apply.quarter - UC w/ nominal GDP"
[1] 2465.982

the list of library for R 3.3


パッケージ ライブラリ ‘/Users/<User_Name>/Library/R/3.3/library’ 中): 

assertthat                                               Easy pre and post assertions.
car                                                      Companion to Applied Regression
caret                                                    Classification and Regression Training
colorspace                                               Color Space Manipulation
DBI                                                      R Database Interface
dichromat                                                Color Schemes for Dichromats
digest                                                   Create Compact Hash Digests of R Objects
foreach                                                  Provides Foreach Looping Construct for R
forecast                                                 Forecasting Functions for Time Series and Linear Models
fracdiff                                                 Fractionally differenced ARIMA aka ARFIMA(p,d,q) models
ggplot2                                                  Create Elegant Data Visualisations Using the Grammar of Graphics
gtable                                                   Arrange 'Grobs' in Tables
iterators                                                Provides Iterator Construct for R
labeling                                                 Axis Labeling
lazyeval                                                 Lazy (Non-Standard) Evaluation
lme4                                                     Linear Mixed-Effects Models using 'Eigen' and S4
lmtest                                                   Testing Linear Regression Models
magrittr                                                 A Forward-Pipe Operator for R
MatrixModels                                             Modelling with Sparse And Dense Matrices
minqa                                                    Derivative-free optimization algorithms by quadratic approximation
ModelMetrics                                             Rapid Calculation of Model Metrics
mondate                                                  Keep track of dates in terms of months
munsell                                                  Utilities for Using Munsell Colours
nloptr                                                   R interface to NLopt
pbkrtest                                                 Parametric Bootstrap and Kenward Roger Based Methods for Mixed Model Comparison
plyr                                                     Tools for Splitting, Applying and Combining Data
quadprog                                                 Functions to solve Quadratic Programming Problems.
quantmod                                                 Quantitative Financial Modelling Framework
quantreg                                                 Quantile Regression
RColorBrewer                                             ColorBrewer Palettes
Rcpp                                                     Seamless R and C++ Integration
RcppArmadillo                                            'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
RcppEigen                                                'Rcpp' Integration for the 'Eigen' Templated Linear Algebra Library
reshape2                                                 Flexibly Reshape Data: A Reboot of the Reshape Package
RMySQL                                                   Database Interface and 'MySQL' Driver for R
sandwich                                                 Robust Covariance Matrix Estimators
scales                                                   Scale Functions for Visualization
SparseM                                                  Sparse Linear Algebra
stringi                                                  Character String Processing Facilities
stringr                                                  Simple, Consistent Wrappers for Common String Operations
strucchange                                              Testing, Monitoring, and Dating Structural Changes
tibble                                                   Simple Data Frames
timeDate                                                 Rmetrics - Chronological and Calendar Objects
tseries                                                  Time Series Analysis and Computational Finance
TTR                                                      Technical Trading Rules
urca                                                     Unit Root and Cointegration Tests for Time Series Data
vars                                                     VAR Modelling
xts                                                      eXtensible Time Series
zoo                                                      S3 Infrastructure for Regular and Irregular Time Series (Z's Ordered Observations)
 
 パッケージ (ライブラリ ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’ 中): 

base                                                     The R Base Package
boot                                                     Bootstrap Functions (Originally by Angelo Canty for S)
class                                                    Functions for Classification
cluster                                                  "Finding Groups in Data": Cluster Analysis Extended Rousseeuw et al.
codetools                                                Code Analysis Tools for R
compiler                                                 The R Compiler Package
datasets                                                 The R Datasets Package
foreign                                                  Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat, Weka, dBase, ...
graphics                                                 The R Graphics Package
grDevices                                                The R Graphics Devices and Support for Colours and Fonts
grid                                                     The Grid Graphics Package
KernSmooth                                               Functions for Kernel Smoothing Supporting Wand & Jones (1995)
lattice                                                  Trellis Graphics for R
MASS                                                     Support Functions and Datasets for Venables and Ripley's MASS
Matrix                                                   Sparse and Dense Matrix Classes and Methods
methods                                                  Formal Methods and Classes
mgcv                                                     Mixed GAM Computation Vehicle with GCV/AIC/REML Smoothness Estimation
nlme                                                     Linear and Nonlinear Mixed Effects Models
nnet                                                     Feed-Forward Neural Networks and Multinomial Log-Linear Models
parallel                                                 Support for Parallel computation in R
rpart                                                    Recursive Partitioning and Regression Trees
spatial                                                  Functions for Kriging and Point Pattern Analysis
splines                                                  Regression Spline Functions and Classes
stats                                                    The R Stats Package
stats4                                                   Statistical Functions using S4 Classes
survival                                                 Survival Analysis
tcltk                                                    Tcl/Tk Interface
tools                                                    Tools for Package Development
utils                                                    The R Utils Package