Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_structuraltimeseries.wasp
Title produced by softwareStructural Time Series Models
Date of computationTue, 29 Nov 2011 17:30:32 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Nov/29/t1322605844uyz3kzgwdn80a4t.htm/, Retrieved Fri, 19 Apr 2024 09:35:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=148758, Retrieved Fri, 19 Apr 2024 09:35:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact53
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [HPC Retail Sales] [2008-03-02 15:42:48] [74be16979710d4c4e7c6647856088456]
- RMPD    [Structural Time Series Models] [test] [2011-11-29 22:30:32] [8aedcf735e397266388b06f47fe45218] [Current]
Feedback Forum

Post a new message
Dataseries X:
-130.910.987.314.406
131.766.722.476.436
0.311902089432624
158.143.730.597.924
0.0192400144346201
-0.9368753688608
0.243932484300078
-218.563.592.223.445
0.935635745770661
0.839892795267538
579.778.367.605.613
170.441.393.629.028
-0.329020925034685
-101.366.959.341.428
-0.0721891698409563
-0.352185041020035
-149.386.935.956.607
-0.119895993686133
-0.550705443241956
0.707319366690019
0.293174810691929
0.655220572744206
134.613.443.388.521
12.638.272.219.042
-0.0318833228854187
-0.535995463130649
-0.529671431821257
-0.789148635231205
-0.0425744109948981
0.272498055255342
-0.0800450106434503
0.816983228463799
0.846801025205687
-0.222074056938455
195.349.653.329.495
-0.172023120296064
-0.69027654889302
0.287592534260633
-0.859207133715227
-201.772.610.889.065
-0.414444629012988
-105.580.413.901.964
-0.581262797215352
-0.286538973559151
-0.773355922423026
147.741.619.719.803
0.521645126539635
0.649524975249249
0.947300946458225
0.691871214114913
-0.670858760026571
0.0993984226509969
-0.568791387950251
-0.955697417689572
0.410503257643818
0.521762645926369
0.21801433183982
0.464905022439139
0.749746330627607
0.728431943221657
0.0388556155016051
0.354112674721681
-0.520666561813183
110.276.754.576.813
0.739079360099292
-0.356430025460785
0.012218479821687
-0.423458979992071
0.690942640935863
0.683055919648925
-0.332602274669517
0.895246552676766
-0.0822976200815086
-0.384204531591252
0.279966494676576
-0.253563763880968
-0.817066547023874
0.328939924260027
0.093990912489306
-140.517.485.842.956
0.119314824608429
-0.510745602335118
-0.260161606926564




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ yule.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=148758&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=148758&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=148758&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ yule.wessa.net



Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
Parameters (R input):
par1 = 12 ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
nx <- length(x)
x <- ts(x,frequency=par1)
m <- StructTS(x,type='BSM')
m$coef
m$fitted
m$resid
mylevel <- as.numeric(m$fitted[,'level'])
myslope <- as.numeric(m$fitted[,'slope'])
myseas <- as.numeric(m$fitted[,'sea'])
myresid <- as.numeric(m$resid)
myfit <- mylevel+myseas
mylagmax <- nx/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(mylevel,na.action=na.pass,lag.max = mylagmax,main='Level')
acf(myseas,na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(myresid,na.action=na.pass,lag.max = mylagmax,main='Standardized Residals')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(mylevel,main='Level')
spectrum(myseas,main='Seasonal')
spectrum(myresid,main='Standardized Residals')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(mylevel,main='Level')
cpgram(myseas,main='Seasonal')
cpgram(myresid,main='Standardized Residals')
par(op)
dev.off()
bitmap(file='test1.png')
plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time',type='b')
grid()
dev.off()
bitmap(file='test5.png')
op <- par(mfrow = c(2,2))
hist(m$resid,main='Residual Histogram')
plot(density(m$resid),main='Residual Kernel Density')
qqnorm(m$resid,main='Residual Normal QQ Plot')
qqline(m$resid)
plot(m$resid^2, myfit^2,main='Sq.Resid vs. Sq.Fit',xlab='Squared residuals',ylab='Squared Fit')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Structural Time Series Model',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Level',header=TRUE)
a<-table.element(a,'Slope',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Stand. Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,mylevel[i])
a<-table.element(a,myslope[i])
a<-table.element(a,myseas[i])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')