R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(0.635439214 + ,0.735439214 + ,0.003836396 + ,-0.447766422 + ,-0.14936924 + ,0.25063076 + ,0.533836396 + ,0.420247668 + ,-0.506546695 + ,-0.816546695 + ,-0.186546695 + ,-0.214943877 + ,-0.673341059 + ,-0.693341059 + ,-0.284943877 + ,-0.224943877 + ,-0.224943877 + ,-0.396546695 + ,-0.310135423 + ,-0.63372415 + ,-0.342121332 + ,-0.460518514 + ,-0.390518514 + ,-0.137312877 + ,0.385892759 + ,0.357495577 + ,0.517495577 + ,0.455892759 + ,0.235892759 + ,-0.032504423 + ,0.33390685 + ,1.193523758 + ,0.948332213 + ,0.848332213 + ,0.699935031 + ,0.911537849 + ,0.714743485 + ,0.794743485 + ,0.563140667 + ,0.621537849 + ,0.729935031 + ,0.846729395 + ,0.921537849 + ,0.817949122 + ,0.837949122 + ,0.456346304 + ,0.284743485 + ,0.113140667 + ,0.174743485 + ,0.073140667 + ,-0.090064969 + ,-0.203270605 + ,-0.616476242 + ,-0.76807906 + ,-0.723270605 + ,-0.425256515 + ,-0.473653696 + ,-0.443653696 + ,-0.235256515 + ,-0.245256515 + ,0.296346304 + ,0.174743485 + ,0.241537849 + ,0.168332213 + ,-0.054873423 + ,-0.279681878 + ,-0.076476242 + ,0.089935031 + ,0.181537849 + ,0.588332213 + ,0.446729395 + ,0.575126577 + ,0.396729395 + ,0.025126577 + ,-0.536476242 + ,-0.77807906 + ,-0.499681878 + ,-0.381284696 + ,-0.064873423 + ,0.061537849 + ,-0.126859333 + ,-0.488462151 + ,-0.410064969 + ,-0.680064969 + ,-1.368462151 + ,-1.048462151 + ,-0.768462151 + ,-0.320064969 + ,-0.053270605 + ,-0.364873423 + ,-0.841667787 + ,-1.182050878 + ,-0.718845242 + ,-0.762050878 + ,-1.166859333 + ,-1.156859333 + ,-0.755256515 + ,-0.725256515 + ,-0.516859333 + ,-0.660064969 + ,-1.073270605 + ,-1.256476242 + ,-1.346476242 + ,-1.044873423 + ,-0.931284696 + ,-0.904490332 + ,-0.757695969 + ,-0.347695969 + ,-0.45609315 + ,-0.379298787 + ,-0.235710059 + ,-0.622121332 + ,-0.626929786 + ,-0.161738241 + ,0.08627585 + ,0.342687123 + ,0.781084304 + ,0.349481486 + ,0.437878668 + ,-0.21372415 + ,-0.50372415 + ,-0.45372415 + ,-0.572121332 + ,0.252687123 + ,0.561084304 + ,0.22627585 + ,0.029481486 + ,0.132687123 + ,-0.110901605 + ,0.228715304 + ,-0.032887514 + ,0.017112486 + ,0.612304031 + ,0.300701213 + ,0.340701213 + ,-0.477695969 + ,-0.999298787 + ,-1.574107241 + ,-1.049298787 + ,-1.069298787 + ,-0.944490332 + ,-0.540064969 + ,-0.605256515 + ,-0.293653696 + ,-0.495256515 + ,-0.048462151 + ,-0.070064969 + ,-0.308462151 + ,-0.790064969 + ,-0.293270605 + ,-0.298462151 + ,-0.040064969 + ,0.011537849 + ,-0.083653696 + ,0.196346304 + ,0.15955194 + ,0.051154758 + ,-0.362050878 + ,-0.700064969 + ,-0.201284696 + ,0.36390685 + ,0.055509668 + ,0.621537849 + ,0.637949122 + ,0.44955194 + ,1.113140667 + ,0.719935031 + ,0.481537849 + ,0.554743485 + ,0.864743485 + ,1.364743485 + ,0.929935031 + ,0.679935031 + ,0.873523758 + ,1.309935031 + ,1.279935031 + ,1.371537849 + ,0.723140667 + ,0.823140667 + ,1.226346304 + ,1.04955194 + ,0.841154758 + ,0.151154758 + ,0.421154758 + ,0.526346304 + ,-0.043270605 + ,-0.479681878 + ,-0.574490332 + ,-0.942887514 + ,-0.869681878 + ,-0.54807906 + ,-0.356476242 + ,-0.294873423 + ,-0.226476242 + ,-0.259681878 + ,-0.25807906 + ,-0.841284696 + ,-0.997695969 + ,-0.792887514 + ,-1.084490332 + ,-0.777695969 + ,-0.089298787 + ,0.569098395 + ,0.84390685 + ,1.338715304 + ,1.518715304 + ,2.102304031 + ,1.737495577 + ,2.672687123 + ,3.387495577 + ,3.955126577 + ,3.476729395 + ,3.380318122 + ,2.307495577 + ,0.602687123 + ,0.259098395 + ,0.323523758 + ,0.183140667 + ,-1.043653696 + ,-1.146859333 + ,-2.241667787 + ,-2.930064969 + ,-3.302050878 + ,-2.36044806) > x <- c(-22.55812594 + ,-21.35812594 + ,-19.86358022 + ,-17.3690345 + ,-16.47448878 + ,-16.07448878 + ,-17.86358022 + ,-20.74176309 + ,-21.83085453 + ,-21.33085453 + ,-20.83085453 + ,-21.32540024 + ,-21.41994596 + ,-20.61994596 + ,-18.72540024 + ,-18.12540024 + ,-17.92540024 + ,-17.03085453 + ,-20.1090374 + ,-23.18722027 + ,-22.98176599 + ,-23.0763117 + ,-22.9763117 + ,-24.46540314 + ,-25.95449458 + ,-25.94904029 + ,-25.64904029 + ,-23.75449458 + ,-23.25449458 + ,-23.44904029 + ,-26.32722316 + ,-30.79449747 + ,-32.97813462 + ,-32.57813462 + ,-33.27268034 + ,-33.96722606 + ,-35.4563175 + ,-34.8563175 + ,-33.56177178 + ,-31.76722606 + ,-30.97268034 + ,-29.28358891 + ,-31.66722606 + ,-34.44540893 + ,-33.84540893 + ,-32.35086321 + ,-31.4563175 + ,-30.66177178 + ,-31.3563175 + ,-29.86177178 + ,-27.87268034 + ,-25.38358891 + ,-23.69449747 + ,-23.79995175 + ,-25.68358891 + ,-29.3563175 + ,-29.35086321 + ,-29.95086321 + ,-29.1563175 + ,-29.0563175 + ,-29.75086321 + ,-27.4563175 + ,-25.16722606 + ,-22.67813462 + ,-20.98904319 + ,-18.50540604 + ,-19.99449747 + ,-23.17268034 + ,-23.86722606 + ,-22.17813462 + ,-21.08358891 + ,-20.08904319 + ,-20.88358891 + ,-19.18904319 + ,-17.79449747 + ,-16.39995175 + ,-15.40540604 + ,-14.21086032 + ,-16.88904319 + ,-19.96722606 + ,-20.66177178 + ,-19.76722606 + ,-18.77268034 + ,-18.47268034 + ,-19.16722606 + ,-17.76722606 + ,-17.06722606 + ,-15.27268034 + ,-13.48358891 + ,-12.58904319 + ,-14.07813462 + ,-18.54540893 + ,-20.03450037 + ,-18.34540893 + ,-15.96177178 + ,-15.86177178 + ,-16.6563175 + ,-15.8563175 + ,-14.46177178 + ,-10.97268034 + ,-8.783588907 + ,-6.694497471 + ,-6.194497471 + ,-6.589043189 + ,-3.110860318 + ,-0.821768882 + ,0.767322553 + ,0.767322553 + ,-0.027223164 + ,2.161868271 + ,5.840051143 + ,9.218234014 + ,11.60187117 + ,13.98550832 + ,10.01277973 + ,7.63459686 + ,9.129142578 + ,10.2236883 + ,11.21823401 + ,12.31277973 + ,12.41277973 + ,13.31277973 + ,13.01823401 + ,11.93459686 + ,13.62914258 + ,16.71277973 + ,15.7236883 + ,14.13459686 + ,11.45641399 + ,6.789139682 + ,7.7836854 + ,7.9836854 + ,10.66732255 + ,11.76186827 + ,12.36186827 + ,12.36732255 + ,13.56186827 + ,16.14550542 + ,14.46186827 + ,14.66186827 + ,12.77823112 + ,5.727319657 + ,3.743682504 + ,3.049136786 + ,4.443682504 + ,6.132773939 + ,7.027319657 + ,6.332773939 + ,7.927319657 + ,10.11641109 + ,8.032773939 + ,9.127319657 + ,8.532773939 + ,6.349136786 + ,6.849136786 + ,5.76004535 + ,5.265499632 + ,7.154591068 + ,11.42731966 + ,17.48913968 + ,20.07277684 + ,20.17823112 + ,12.73277394 + ,10.05459107 + ,9.56004535 + ,13.03822822 + ,15.02731966 + ,14.43277394 + ,13.3436825 + ,13.6436825 + ,14.0436825 + ,17.52731966 + ,18.02731966 + ,21.30550253 + ,18.92731966 + ,19.12731966 + ,18.53277394 + ,18.03822822 + ,18.43822822 + ,17.04913679 + ,15.76004535 + ,15.56549963 + ,16.66549963 + ,17.06549963 + ,19.84913679 + ,25.01641109 + ,28.39459396 + ,31.27823112 + ,30.7836854 + ,29.69459396 + ,29.20004825 + ,28.70550253 + ,28.01095681 + ,29.10550253 + ,30.89459396 + ,30.20004825 + ,31.98913968 + ,35.46732255 + ,33.3836854 + ,34.27823112 + ,36.06732255 + ,37.46186827 + ,38.45641399 + ,36.77277684 + ,34.58913968 + ,35.68913968 + ,40.96732255 + ,44.25095971 + ,47.53459686 + ,45.35095971 + ,37.01095681 + ,36.91641109 + ,40.79459396 + ,47.35095971 + ,50.63459686 + ,47.65641399 + ,40.80550253 + ,36.23822822 + ,35.04913679 + ,36.93822822 + ,40.12186538 + ,40.02731966 + ,36.35459107 + ,36.26004535) > par2 = '36' > par1 = '0' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > y <- as.ts(y) > mylm <- lm(y~x) > cbind(mylm$resid) [,1] 1 0.74262152 2 0.83691986 3 0.09821588 4 -0.36523948 5 -0.07109262 6 0.32700682 7 0.61871312 8 0.51879974 9 -0.40281993 10 -0.71519562 11 -0.08757131 12 -0.11361872 13 -0.57156668 14 -0.59536779 15 -0.19597232 16 -0.13882315 17 -0.13977342 18 -0.31562657 19 -0.21458967 20 -0.52355277 21 -0.23292615 22 -0.35087411 23 -0.28134924 24 -0.02106836 25 0.50921252 26 0.48078942 27 0.63936401 28 0.56875947 29 0.34638378 30 0.07891096 31 0.45899759 32 1.33984023 33 1.10502398 34 1.00312343 35 0.85802630 36 1.07292917 37 0.88321005 38 0.96035922 39 0.72260552 40 0.77247613 41 0.87709812 42 0.98586696 43 1.07200099 44 0.98161247 45 0.99876164 46 0.61005766 47 0.43420452 48 0.25882651 49 0.32372938 50 0.21502540 51 0.04236883 52 -0.08266344 53 -0.50389460 54 -0.65499636 55 -0.60123802 56 -0.28577339 57 -0.33419649 58 -0.30134566 59 -0.09672367 60 -0.10719881 61 0.43770407 62 0.30519898 63 0.36111699 64 0.27608473 65 0.04485357 66 -0.19175560 67 0.01852528 68 0.20003732 69 0.29494019 70 0.69370904 71 0.54690561 72 0.67057733 73 0.49595534 74 0.11630108 75 -0.45192776 76 -0.70015660 77 -0.42648488 78 -0.31376345 79 0.01537290 80 0.15640980 81 -0.02868733 82 -0.39454048 83 -0.32086876 84 -0.59229418 85 -1.27739131 86 -0.96404324 87 -0.68736921 88 -0.24749861 89 0.01079510 90 -0.30505805 91 -0.77477717 92 -1.09393453 93 -0.62365365 94 -0.67488480 95 -1.09101883 96 -1.08149397 97 -0.67611596 98 -0.64991707 99 -0.44814591 100 -0.60792956 101 -1.03153640 102 -1.22466812 103 -1.31704381 104 -1.01356635 105 -0.91650381 106 -0.90058579 107 -0.76134181 108 -0.35134181 109 -0.45596380 110 -0.38957065 111 -0.26345838 112 -0.66592070 113 -0.68205473 114 -0.22818876 115 0.03870129 116 0.30641222 117 0.73770825 118 0.30090482 119 0.38457654 120 -0.27222689 121 -0.56270203 122 -0.51697827 123 -0.63397596 124 0.19598128 125 0.49632702 126 0.14686702 127 -0.04522779 128 0.06552823 129 -0.16533542 130 0.19645750 131 -0.06987079 132 -0.02082107 133 0.56161949 134 0.24481607 135 0.28196524 136 -0.53645786 137 -1.06373643 138 -1.65082073 139 -1.11801267 140 -1.13896295 141 -1.00520461 142 -0.56727766 143 -0.62304419 144 -0.30814131 145 -0.51637016 146 -0.07760131 147 -0.10345446 148 -0.33855159 149 -0.82773071 150 -0.34133755 151 -0.33662894 152 -0.08343237 153 -0.02900463 154 -0.11382088 155 0.16380343 156 0.13218376 157 0.02613635 158 -0.39604508 159 -0.75436055 160 -0.28438231 161 0.26853339 162 -0.04036485 163 0.56103956 164 0.59017590 165 0.40412850 166 1.05119104 167 0.64853447 168 0.41296220 169 0.49134253 170 0.79991712 171 1.29801656 172 0.84665601 173 0.59428032 174 0.77229314 175 1.22000408 176 1.18905380 177 1.28348153 178 0.63743413 179 0.73553357 180 1.14533932 181 0.97466992 182 0.76719710 183 0.07197058 184 0.34007002 185 0.43203544 186 -0.16213317 187 -0.61459549 188 -0.72310521 189 -1.08915261 190 -1.01077228 191 -0.68681969 192 -0.49286710 193 -0.42796422 194 -0.36476765 195 -0.40647394 196 -0.40157107 197 -0.99327737 198 -1.16621482 199 -0.95150621 200 -1.24735936 201 -0.94906565 202 -0.26729449 203 0.38637722 204 0.66918528 205 1.17436903 206 1.34914251 207 1.90765257 208 1.52724229 209 2.44683202 210 3.17201577 211 3.77927332 212 3.30132537 213 3.18648736 214 2.08251300 215 0.36210273 216 0.03266449 217 0.12964116 218 0.01095894 219 -1.21018559 220 -1.32236702 221 -2.43230216 222 -3.12025012 223 -3.47478548 224 -2.53273344 > library(lattice) > postscript(file="/var/www/html/rcomp/tmp/1mjbm1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(y,type='l',main='Run Sequence Plot of Y[t]',xlab='time or index',ylab='value') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2ux7m1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x,type='l',main='Run Sequence Plot of X[t]',xlab='time or index',ylab='value') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3erkd1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x,y,main='Scatter Plot',xlab='X[t]',ylab='Y[t]') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4d2lu1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mylm$resid,type='l',main='Run Sequence Plot of e[t]',xlab='time or index',ylab='value') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5lotn1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mylm$resid,main='Histogram of e[t]') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6o4981258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if (par1 > 0) + { + densityplot(~mylm$resid,col='black',main=paste('Density Plot of e[t] bw = ',par1),bw=par1) + } else { + densityplot(~mylm$resid,col='black',main='Density Plot of e[t]') + } > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7rrka1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mylm$resid,main='QQ plot of e[t]') > qqline(mylm$resid) > grid() > dev.off() null device 1 > if (par2 > 0) + { + postscript(file="/var/www/html/rcomp/tmp/8qqhr1258878811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + acf(mylm$resid,lag.max=par2,main='Residual Autocorrelation Function') + grid() + dev.off() + } null device 1 > summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max. -3.546e+01 -2.091e+01 4.094e+00 -8.036e-11 1.586e+01 5.063e+01 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Model: Y[t] = c + b X[t] + e[t]',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'c',1,TRUE) > a<-table.element(a,mylm$coeff[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'b',1,TRUE) > a<-table.element(a,mylm$coeff[[2]]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/9mzwn1258878811.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Descriptive Statistics about e[t]',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'# observations',header=TRUE) > a<-table.element(a,length(mylm$resid)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'minimum',header=TRUE) > a<-table.element(a,min(mylm$resid)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Q1',header=TRUE) > a<-table.element(a,quantile(mylm$resid,0.25)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'median',header=TRUE) > a<-table.element(a,median(mylm$resid)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'mean',header=TRUE) > a<-table.element(a,mean(mylm$resid)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Q3',header=TRUE) > a<-table.element(a,quantile(mylm$resid,0.75)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'maximum',header=TRUE) > a<-table.element(a,max(mylm$resid)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/10q7gs1258878811.tab") > > system("convert tmp/1mjbm1258878811.ps tmp/1mjbm1258878811.png") > system("convert tmp/2ux7m1258878811.ps tmp/2ux7m1258878811.png") > system("convert tmp/3erkd1258878811.ps tmp/3erkd1258878811.png") > system("convert tmp/4d2lu1258878811.ps tmp/4d2lu1258878811.png") > system("convert tmp/5lotn1258878811.ps tmp/5lotn1258878811.png") > system("convert tmp/6o4981258878811.ps tmp/6o4981258878811.png") > system("convert tmp/7rrka1258878811.ps tmp/7rrka1258878811.png") > system("convert tmp/8qqhr1258878811.ps tmp/8qqhr1258878811.png") > > > proc.time() user system elapsed 1.701 1.229 6.165