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(15.0544 + ,15.8404 + ,10.8241 + ,8.2944 + ,10.3684 + ,13.1044 + ,14.5924 + ,12.5316 + ,6.4009 + ,4.9284 + ,8.1225 + ,7.7284 + ,5.1984 + ,5.1076 + ,7.3441 + ,7.6729 + ,7.6729 + ,6.9696 + ,6.5536 + ,4.2849 + ,5.3824 + ,4.6656 + ,4.9729 + ,5.76 + ,8.0656 + ,7.6729 + ,8.5849 + ,8.4681 + ,7.2361 + ,5.6644 + ,6.6564 + ,10.1761 + ,7.9524 + ,7.3984 + ,6.4009 + ,7.29 + ,5.8564 + ,6.25 + ,5.3361 + ,5.8081 + ,6.5536 + ,7.6176 + ,7.3441 + ,5.9536 + ,6.0516 + ,4.4944 + ,3.9601 + ,3.4596 + ,3.5344 + ,3.3124 + ,3.0276 + ,2.9241 + ,1.9044 + ,1.6129 + ,1.4161 + ,1.6384 + ,1.4161 + ,1.4884 + ,2.1609 + ,2.1316 + ,3.8416 + ,3.5344 + ,4.1209 + ,4.1616 + ,3.61 + ,3.24 + ,3.6864 + ,3.6864 + ,3.8809 + ,6.0516 + ,5.5696 + ,6.4009 + ,5.3361 + ,3.9204 + ,2.1316 + ,1.5876 + ,2.4964 + ,3.0276 + ,3.5721 + ,3.4225 + ,2.6244 + ,1.69 + ,2.0164 + ,1.3225 + ,0.1764 + ,0.5476 + ,1.0404 + ,2.2801 + ,3.4596 + ,2.5281 + ,1.0609 + ,0.1936 + ,0.6724 + ,0.7396 + ,0.3364 + ,0.3481 + ,0.9025 + ,0.9604 + ,1.5129 + ,1.3689 + ,0.7056 + ,0.5476 + ,0.4225 + ,0.8281 + ,1.4161 + ,1.69 + ,2.3409 + ,3.7636 + ,3.2041 + ,3.8025 + ,5.1076 + ,4.1616 + ,4.6656 + ,7.5625 + ,7.7841 + ,8.2944 + ,11.2896 + ,8.8209 + ,9.61 + ,6.2001 + ,4.84 + ,5.0625 + ,4.3681 + ,7.7841 + ,9.8596 + ,8.5849 + ,7.0225 + ,7.1289 + ,5.1076 + ,5.5225 + ,4.5369 + ,4.7524 + ,8.41 + ,6.9169 + ,7.1289 + ,3.2761 + ,1.7689 + ,0.7744 + ,1.6384 + ,1.5876 + ,1.5876 + ,1.6641 + ,1.21 + ,1.8769 + ,1.4641 + ,3.0276 + ,3.0976 + ,2.1904 + ,1.0816 + ,2.6244 + ,2.2201 + ,3.2041 + ,3.24 + ,2.4964 + ,3.4596 + ,3.0276 + ,2.5281 + ,1.5876 + ,1.2769 + ,3.6864 + ,6.8121 + ,5.1076 + ,5.8081 + ,5.1076 + ,4.1209 + ,8.1796 + ,6.5025 + ,5.1529 + ,5.1076 + ,6.6049 + ,9.4249 + ,7.6176 + ,6.3001 + ,8.2369 + ,9.8596 + ,9.6721 + ,9.9856 + ,6.1009 + ,6.6049 + ,8.3521 + ,6.9169 + ,5.6644 + ,2.8561 + ,3.8416 + ,4.7961 + ,3.4969 + ,2.56 + ,2.6569 + ,1.4884 + ,1.4641 + ,2.2201 + ,2.6896 + ,2.7556 + ,3.1329 + ,3.3124 + ,3.1684 + ,1.6384 + ,1.6641 + ,1.8769 + ,1.2544 + ,2.2801 + ,5.0176 + ,8.6436 + ,9.5481 + ,11.9716 + ,13.2496 + ,19.2721 + ,17.2225 + ,27.1441 + ,33.64 + ,34.9281 + ,29.0521 + ,29.8116 + ,22.2784 + ,9.8596 + ,6.9169 + ,5.3824 + ,3.7249 + ,0.3844 + ,0.36 + ,0.1369 + ,1.21 + ,2.8224 + ,0.6084) > x <- c(23500.89 + ,23870.25 + ,24087.04 + ,24617.61 + ,24649 + ,24774.76 + ,24711.84 + ,24806.25 + ,24964 + ,25122.25 + ,25281 + ,25376.49 + ,25600 + ,25856.64 + ,26211.61 + ,26406.25 + ,26471.29 + ,26503.84 + ,26536.41 + ,26569 + ,26896 + ,27126.09 + ,27159.04 + ,27192.01 + ,27225 + ,27489.64 + ,27589.21 + ,27955.84 + ,28123.29 + ,28324.89 + ,28425.96 + ,28527.21 + ,28594.81 + ,28730.25 + ,28764.16 + ,28798.09 + ,28832.04 + ,29036.16 + ,29206.81 + ,29549.61 + ,29549.61 + ,29584 + ,29584 + ,29721.76 + ,29929 + ,30171.69 + ,30206.44 + ,30206.44 + ,30241.21 + ,30485.16 + ,30625 + ,30940.81 + ,30976 + ,30660.01 + ,30835.36 + ,30940.81 + ,31222.89 + ,31011.21 + ,31011.21 + ,31046.44 + ,31081.69 + ,31612.84 + ,31862.25 + ,32184.36 + ,32220.25 + ,32256.16 + ,32292.09 + ,32292.09 + ,32328.04 + ,32364.01 + ,32472.04 + ,32544.16 + ,32544.16 + ,32869.69 + ,33087.61 + ,33306.25 + ,33379.29 + ,33525.61 + ,33708.96 + ,33745.69 + ,33782.44 + ,33819.21 + ,33892.81 + ,34003.36 + ,34040.25 + ,34558.81 + ,34819.56 + ,35193.76 + ,35268.84 + ,35306.41 + ,35344 + ,35456.89 + ,35494.56 + ,35532.25 + ,35532.25 + ,35569.96 + ,35569.96 + ,35872.36 + ,36100 + ,36825.61 + ,37056.25 + ,37249 + ,37442.25 + ,37597.21 + ,37713.64 + ,37986.01 + ,37986.01 + ,37986.01 + ,37986.01 + ,38220.25 + ,38416 + ,38494.44 + ,38494.44 + ,38494.44 + ,38494.44 + ,38809 + ,39085.29 + ,39204 + ,39283.24 + ,39402.25 + ,39441.96 + ,39800.25 + ,40000 + ,40521.69 + ,40884.84 + ,41168.41 + ,41412.25 + ,41412.25 + ,41616 + ,41656.81 + ,41738.49 + ,41820.25 + ,41943.04 + ,42066.01 + ,42312.49 + ,42642.25 + ,42807.61 + ,42890.41 + ,43180.84 + ,43264 + ,43472.25 + ,43513.96 + ,43681 + ,43722.81 + ,43974.09 + ,44016.04 + ,44058.01 + ,44100 + ,44436.64 + ,44689.96 + ,44816.89 + ,44944 + ,45028.84 + ,45113.76 + ,45326.41 + ,45539.56 + ,45667.69 + ,45796 + ,45924.49 + ,46139.04 + ,46225 + ,46612.81 + ,46828.96 + ,47045.61 + ,47175.84 + ,47306.25 + ,47480.41 + ,47567.61 + ,47785.96 + ,47917.21 + ,48092.49 + ,48576.16 + ,48796.81 + ,48841 + ,49195.24 + ,49284 + ,49372.84 + ,49506.25 + ,49684.41 + ,49773.61 + ,49907.56 + ,50176 + ,50670.01 + ,50850.25 + ,51030.81 + ,51211.69 + ,51302.25 + ,51529 + ,51665.29 + ,51892.84 + ,52029.61 + ,52166.56 + ,52212.25 + ,52349.44 + ,52441 + ,52486.81 + ,52578.49 + ,52716.16 + ,52854.01 + ,52900 + ,52992.04 + ,53268.64 + ,53361 + ,53684.89 + ,53777.61 + ,54289 + ,55272.01 + ,55696 + ,56121.61 + ,56216.41 + ,56406.25 + ,56739.24 + ,57073.21 + ,57168.81 + ,57600 + ,57696.04 + ,57840.25 + ,57936.49 + ,58129.21 + ,58273.96 + ,58660.84 + ,59000.41 + ,59146.24 + ,59487.21) > 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 10.75385678 2 11.51263281 3 6.48035414 4 3.91154807 5 5.98323444 6 8.70996520 7 10.20260277 8 8.13484421 9 1.99251712 10 0.50835319 11 3.69075239 12 3.28961423 13 0.74314025 14 0.63342440 15 2.84376107 16 3.15821497 17 3.15342115 18 2.44772203 19 2.02932143 20 -0.24178064 21 0.83161757 22 0.09785861 23 0.40273001 24 1.18739993 25 3.49056837 26 3.07836288 27 3.98302399 28 3.83920125 29 2.59485922 30 1.00830013 31 1.99285069 32 5.50508798 33 3.27640547 34 2.71242276 35 1.71242340 36 2.59902256 37 1.16292025 38 1.54147543 39 0.61499754 40 1.06173120 41 1.80723120 42 2.86869646 43 2.59519646 44 1.19454275 45 1.27726797 46 -0.29781969 47 -0.83468096 48 -1.33518096 49 -1.26294371 50 -1.50292424 51 -1.79803125 52 -1.92480827 53 -2.94710198 54 -3.21531169 55 -3.42503600 56 -3.21050827 57 -3.45359920 58 -3.36569716 59 -2.69319716 60 -2.72509381 61 -1.01769194 62 -1.36404076 63 -0.79592372 64 -0.77896508 65 -1.33321038 66 -1.70585716 67 -1.26210541 68 -1.26210541 69 -1.07025513 70 1.09779367 71 0.60783124 72 1.43381558 73 0.36901558 74 -1.07067786 75 -2.87553982 76 -3.43565485 77 -2.53223832 78 -2.01182295 79 -1.48083690 80 -1.63314412 81 -2.43395280 82 -3.37106297 83 -3.05008771 84 -3.75213588 85 -4.90095489 86 -4.56797575 87 -4.09439453 88 -2.88227523 89 -1.70830906 90 -2.64257819 91 -4.11254879 92 -4.98816943 93 -4.51214593 94 -4.44772390 95 -4.85092390 96 -4.84200335 97 -4.28760335 98 -4.25199197 99 -3.71627035 100 -3.91375200 101 -4.59405150 102 -4.76625829 103 -4.90560193 104 -4.51142337 105 -3.93200493 106 -3.67818018 107 -3.02728018 108 -1.60458018 109 -2.16408018 110 -1.58294502 111 -0.29227292 112 -1.24405440 113 -0.74005440 114 2.15684560 115 2.37844560 116 2.86556071 117 5.84039654 118 3.36294693 119 4.14620649 120 0.72753476 121 -0.63549209 122 -0.43940014 123 -1.14852286 124 2.22902557 125 4.27775932 126 2.98215858 127 1.40178616 128 1.50818616 129 -0.52813139 130 -0.11623932 131 -1.10785961 132 -0.89838580 133 2.75016387 134 1.24800027 135 1.44183328 136 -2.43527194 137 -3.95465993 138 -4.95526276 139 -4.11266913 140 -4.16959850 141 -4.18494773 142 -4.11152200 143 -4.57793381 144 -3.91411545 145 -4.34543624 146 -2.78502819 147 -2.71812162 148 -3.62841653 149 -4.76202884 150 -3.23789999 151 -3.65155546 152 -2.67692420 153 -2.64727740 154 -3.39713649 155 -2.44961002 156 -2.89732041 157 -3.40626433 158 -4.35622152 159 -4.67639197 160 -2.28270555 161 0.83665871 162 -0.89642513 163 -0.21185663 164 -0.92832499 165 -1.92462369 166 2.12446434 167 0.43452774 168 -0.92149940 169 -0.98289306 170 0.50473306 171 3.31181391 172 1.46886464 173 0.13510146 174 2.06864441 175 3.66523487 176 3.47119275 177 3.77814473 178 -0.11638836 179 0.37448022 180 2.11510567 181 0.67003278 182 -0.60225280 183 -3.44696419 184 -2.47474892 185 -1.53355723 186 -2.84608913 187 -3.78966392 188 -3.70947671 189 -4.88802207 190 -4.92909382 191 -4.18317456 192 -3.72376856 193 -3.66113618 194 -3.29394787 195 -3.12119637 196 -3.26857283 197 -4.80533018 198 -4.78977725 199 -4.58713759 200 -5.21302732 201 -4.19411120 202 -1.47699822 203 2.14219432 204 3.02282175 205 5.43948776 206 6.67979536 207 12.62984185 208 10.54899134 209 20.43922143 210 26.92813412 211 28.20224181 212 22.30169853 213 23.03658301 214 15.49633674 215 3.04575555 216 0.09597685 217 -1.44915226 218 -3.11374571 219 -6.46845028 220 -6.50351919 221 -6.75513448 222 -5.70706275 223 -4.10541126 224 -6.34454272 > library(lattice) > postscript(file="/var/www/html/rcomp/tmp/174wl1259190566.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/2w6ng1259190566.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/3p4271259190566.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/4pcs61259190566.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/5bvw31259190566.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/607re1259190566.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/7dl831259190566.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/8eh271259190566.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. 23500 31000 38490 39630 47620 59490 > > #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/9tiqi1259190566.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/10rhsf1259190566.tab") > > system("convert tmp/174wl1259190566.ps tmp/174wl1259190566.png") > system("convert tmp/2w6ng1259190566.ps tmp/2w6ng1259190566.png") > system("convert tmp/3p4271259190566.ps tmp/3p4271259190566.png") > system("convert tmp/4pcs61259190566.ps tmp/4pcs61259190566.png") > system("convert tmp/5bvw31259190566.ps tmp/5bvw31259190566.png") > system("convert tmp/607re1259190566.ps tmp/607re1259190566.png") > system("convert tmp/7dl831259190566.ps tmp/7dl831259190566.png") > system("convert tmp/8eh271259190566.ps tmp/8eh271259190566.png") > > > proc.time() user system elapsed 1.739 1.287 2.103