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(1.355835154 + ,1.381281819 + ,1.190887565 + ,1.057790294 + ,1.16938136 + ,1.286474026 + ,1.340250423 + ,1.264126727 + ,0.928219303 + ,0.797507196 + ,1.047318994 + ,1.022450928 + ,0.824175443 + ,0.815364813 + ,0.996948635 + ,1.01884732 + ,1.01884732 + ,0.970778917 + ,0.940007258 + ,0.727548607 + ,0.841567186 + ,0.770108222 + ,0.802001585 + ,0.875468737 + ,1.043804052 + ,1.01884732 + ,1.075002423 + ,1.068153081 + ,0.989541194 + ,0.867100488 + ,0.947789399 + ,1.160020917 + ,1.036736885 + ,1.00063188 + ,0.928219303 + ,0.993251773 + ,0.88376754 + ,0.916290732 + ,0.837247525 + ,0.879626748 + ,0.940007258 + ,1.01523068 + ,0.996948635 + ,0.891998039 + ,0.90016135 + ,0.751416089 + ,0.688134639 + ,0.620576488 + ,0.631271777 + ,0.598836501 + ,0.553885113 + ,0.536493371 + ,0.322083499 + ,0.2390169 + ,0.173953307 + ,0.246860078 + ,0.173953307 + ,0.198850859 + ,0.385262401 + ,0.378436436 + ,0.672944473 + ,0.631271777 + ,0.708035793 + ,0.712949808 + ,0.641853886 + ,0.587786665 + ,0.652325186 + ,0.652325186 + ,0.678033543 + ,0.90016135 + ,0.858661619 + ,0.928219303 + ,0.837247525 + ,0.683096845 + ,0.378436436 + ,0.231111721 + ,0.457424847 + ,0.553885113 + ,0.636576829 + ,0.615185639 + ,0.482426149 + ,0.262364264 + ,0.350656872 + ,0.139761942 + ,-0.867500568 + ,-0.301105093 + ,0.019802627 + ,0.412109651 + ,0.620576488 + ,0.463734016 + ,0.029558802 + ,-0.820980552 + ,-0.198450939 + ,-0.15082289 + ,-0.544727175 + ,-0.527632742 + ,-0.051293294 + ,-0.020202707 + ,0.207014169 + ,0.157003749 + ,-0.174353387 + ,-0.301105093 + ,-0.430782916 + ,-0.094310679 + ,0.173953307 + ,0.262364264 + ,0.425267735 + ,0.662687973 + ,0.58221562 + ,0.667829373 + ,0.815364813 + ,0.712949808 + ,0.770108222 + ,1.011600912 + ,1.026041596 + ,1.057790294 + ,1.211940974 + ,1.088561953 + ,1.131402111 + ,0.91228271 + ,0.78845736 + ,0.810930216 + ,0.737164066 + ,1.026041596 + ,1.1442228 + ,1.075002423 + ,0.97455964 + ,0.982078472 + ,0.815364813 + ,0.854415328 + ,0.75612198 + ,0.779324877 + ,1.064710737 + ,0.966983846 + ,0.982078472 + ,0.593326845 + ,0.285178942 + ,-0.127833372 + ,0.246860078 + ,0.231111721 + ,0.231111721 + ,0.254642218 + ,0.09531018 + ,0.31481074 + ,0.19062036 + ,0.553885113 + ,0.565313809 + ,0.392042088 + ,0.039220713 + ,0.482426149 + ,0.39877612 + ,0.58221562 + ,0.587786665 + ,0.457424847 + ,0.620576488 + ,0.553885113 + ,0.463734016 + ,0.231111721 + ,0.122217633 + ,0.652325186 + ,0.959350221 + ,0.815364813 + ,0.879626748 + ,0.815364813 + ,0.708035793 + ,1.050821625 + ,0.936093359 + ,0.819779831 + ,0.815364813 + ,0.943905899 + ,1.121677562 + ,1.01523068 + ,0.920282753 + ,1.05431203 + ,1.1442228 + ,1.134622726 + ,1.150572028 + ,0.904218151 + ,0.943905899 + ,1.061256502 + ,0.966983846 + ,0.867100488 + ,0.524728529 + ,0.672944473 + ,0.783901544 + ,0.625938431 + ,0.470003629 + ,0.488580015 + ,0.198850859 + ,0.19062036 + ,0.39877612 + ,0.494696242 + ,0.506817602 + ,0.570979547 + ,0.598836501 + ,0.576613364 + ,0.246860078 + ,0.254642218 + ,0.31481074 + ,0.113328685 + ,0.412109651 + ,0.806475866 + ,1.078409581 + ,1.128171091 + ,1.241268589 + ,1.291983682 + ,1.479329227 + ,1.423108334 + ,1.650579856 + ,1.757857918 + ,1.776645831 + ,1.684545385 + ,1.69744879 + ,1.5518088 + ,1.1442228 + ,0.966983846 + ,0.841567186 + ,0.657520003 + ,-0.478035801 + ,-0.510825624) > x <- c(5.032396786 + ,5.040194096 + ,5.044714608 + ,5.05560866 + ,5.056245805 + ,5.058790336 + ,5.05751888 + ,5.059425458 + ,5.062595033 + ,5.065754593 + ,5.068904202 + ,5.070789217 + ,5.075173815 + ,5.080161357 + ,5.086978861 + ,5.090678002 + ,5.091908014 + ,5.092522454 + ,5.093136516 + ,5.093750201 + ,5.099866428 + ,5.104125637 + ,5.104732617 + ,5.10533923 + ,5.105945474 + ,5.110782243 + ,5.112590017 + ,5.119190701 + ,5.122176669 + ,5.125748101 + ,5.127529046 + ,5.129306824 + ,5.130490256 + ,5.132852927 + ,5.133442723 + ,5.134032172 + ,5.134621274 + ,5.138148614 + ,5.14107859 + ,5.146912912 + ,5.146912912 + ,5.147494477 + ,5.147494477 + ,5.149817358 + ,5.153291594 + ,5.157329673 + ,5.157905213 + ,5.157905213 + ,5.158480421 + ,5.162497643 + ,5.164785974 + ,5.169915652 + ,5.170483995 + ,5.165357239 + ,5.168208681 + ,5.169915652 + ,5.174453379 + ,5.171052016 + ,5.171052016 + ,5.171619714 + ,5.172187089 + ,5.180659323 + ,5.184588601 + ,5.18961795 + ,5.190175208 + ,5.190732156 + ,5.191288794 + ,5.191288794 + ,5.191845122 + ,5.192401141 + ,5.194067345 + ,5.195176608 + ,5.195176608 + ,5.200153118 + ,5.203457086 + ,5.206750173 + ,5.207845463 + ,5.210032452 + ,5.212759478 + ,5.213303992 + ,5.21384821 + ,5.214392132 + ,5.215479088 + ,5.217107311 + ,5.217649463 + ,5.225208895 + ,5.228967288 + ,5.234312037 + ,5.235377567 + ,5.235909906 + ,5.236441963 + ,5.238036436 + ,5.238567362 + ,5.239098007 + ,5.239098007 + ,5.23962837 + ,5.23962837 + ,5.243861181 + ,5.247024072 + ,5.256974403 + ,5.260096154 + ,5.262690189 + ,5.265277512 + ,5.267342562 + ,5.268888556 + ,5.272486607 + ,5.272486607 + ,5.272486607 + ,5.272486607 + ,5.275560379 + ,5.278114659 + ,5.279134547 + ,5.279134547 + ,5.279134547 + ,5.279134547 + ,5.283203729 + ,5.28675073 + ,5.288267031 + ,5.289276622 + ,5.2907891 + ,5.291292752 + ,5.295814236 + ,5.298317367 + ,5.304796333 + ,5.309257307 + ,5.312713247 + ,5.315666005 + ,5.315666005 + ,5.318119994 + ,5.31861007 + ,5.319589502 + ,5.320567975 + ,5.322033893 + ,5.323497665 + ,5.326418797 + ,5.330300412 + ,5.332235585 + ,5.333201768 + ,5.336576079 + ,5.33753808 + ,5.339939041 + ,5.340418543 + ,5.342334252 + ,5.342812606 + ,5.345677938 + ,5.346154696 + ,5.346631227 + ,5.347107531 + ,5.350909817 + ,5.353752073 + ,5.355170178 + ,5.356586275 + ,5.357529226 + ,5.358471289 + ,5.360822572 + ,5.363168339 + ,5.364573162 + ,5.365976015 + ,5.367376902 + ,5.369707363 + ,5.370638028 + ,5.374815338 + ,5.377128547 + ,5.379436418 + ,5.380818588 + ,5.382198851 + ,5.384036242 + ,5.384953673 + ,5.387243576 + ,5.388615005 + ,5.390440655 + ,5.395444077 + ,5.39771011 + ,5.398162702 + ,5.401776075 + ,5.402677382 + ,5.403577877 + ,5.404927102 + ,5.40672324 + ,5.407620101 + ,5.408963887 + ,5.411646052 + ,5.416544748 + ,5.418320159 + ,5.420092423 + ,5.421861553 + ,5.422744945 + ,5.424950017 + ,5.426270731 + ,5.428468051 + ,5.429784129 + ,5.431098478 + ,5.43153621 + ,5.43284826 + ,5.433722004 + ,5.434158589 + ,5.43503119 + ,5.436338664 + ,5.437644432 + ,5.438079309 + ,5.438948496 + ,5.441551535 + ,5.442417711 + ,5.445443431 + ,5.446306244 + ,5.451038454 + ,5.460010956 + ,5.463831805 + ,5.467638111 + ,5.468481993 + ,5.470167623 + ,5.473110657 + ,5.476045054 + ,5.476881874 + ,5.480638923 + ,5.48147191 + ,5.48272009 + ,5.483551345 + ,5.485211785 + ,5.486455309) > 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.651124187 2 0.677462043 3 0.487584459 4 0.355732320 5 0.467396208 6 0.584779700 7 0.638410777 8 0.562504992 9 0.226959834 10 0.096608848 11 0.346780629 12 0.322128010 13 0.124353661 14 0.116113081 15 0.298476107 16 0.320797584 17 0.320938168 18 0.272939992 19 0.242238517 20 0.029850007 21 0.144567638 22 0.073595479 23 0.105558216 24 0.179094701 25 0.347499306 26 0.323095391 27 0.379457113 28 0.373362194 29 0.295091587 30 0.173059077 31 0.253951540 32 0.466386249 33 0.343237476 34 0.307402512 35 0.235057346 36 0.300157186 37 0.190740285 38 0.223666633 39 0.144958306 40 0.188004361 41 0.248384871 42 0.323674763 43 0.305392718 44 0.200707615 45 0.209268012 46 0.060984282 47 -0.002231387 48 -0.069789538 49 -0.059028506 50 -0.091004635 51 -0.135694479 52 -0.152499926 53 -0.366844839 54 -0.450497399 55 -0.515235087 56 -0.442133219 57 -0.514521352 58 -0.490012558 59 -0.303601016 60 -0.310362096 61 -0.015789211 62 -0.056493576 63 0.020719536 64 0.026208378 65 -0.044823852 66 -0.098827417 67 -0.034225275 68 -0.034225275 69 -0.008453333 70 0.213738024 71 0.172428731 72 0.242113198 73 0.151141420 74 -0.002440471 75 -0.306723254 76 -0.453671587 77 -0.227233275 78 -0.130523048 79 -0.047519648 80 -0.068848603 81 -0.201545892 82 -0.421545609 83 -0.333128768 84 -0.543837601 85 -1.551038146 86 -0.983778668 87 -0.662441384 88 -0.269523484 89 -0.060934862 90 -0.217716491 91 -0.651830894 92 -1.502188008 93 -0.879597713 94 -0.831909014 95 -1.225813299 96 -1.208658248 97 -0.732318800 98 -0.700744426 99 -0.473166048 100 -0.522039199 101 -0.853039535 102 -0.979494757 103 -1.108876863 104 -0.772168602 105 -0.503727917 106 -0.414905722 107 -0.252002251 108 -0.014582013 109 -0.095054366 110 -0.009089297 111 0.138738083 112 0.036439646 113 0.093598060 114 0.335090750 115 0.349531434 116 0.381745218 117 0.536301301 118 0.413095585 119 0.456051134 120 0.237104601 121 0.113336816 122 0.136326453 123 0.062846398 124 0.352464439 125 0.471155508 126 0.402330127 127 0.302224828 128 0.309743660 129 0.143310479 130 0.182417007 131 0.084235603 132 0.107550334 133 0.393103741 134 0.295544151 135 0.310972647 136 -0.077335332 137 -0.385262055 138 -0.798163940 139 -0.423084824 140 -0.438723230 141 -0.438448813 142 -0.414863511 143 -0.573976594 144 -0.354421361 145 -0.478284248 146 -0.114965005 147 -0.103481844 148 -0.276699126 149 -0.629085920 150 -0.185555629 151 -0.269043576 152 -0.085442224 153 -0.079763405 154 -0.210017550 155 -0.046597170 156 -0.113020436 157 -0.203010969 158 -0.435472926 159 -0.544206900 160 -0.013832988 161 0.293298417 162 0.149790453 163 0.214316776 164 0.150318618 165 0.043147573 166 0.386091161 167 0.271572899 168 0.155364229 169 0.151210935 170 0.279908768 171 0.457889093 172 0.352014075 173 0.257325143 174 0.391406149 175 0.481729908 176 0.472232849 177 0.488285073 178 0.242085405 179 0.281978442 180 0.399431551 181 0.305312483 182 0.205735682 183 -0.136076382 184 0.012342482 185 0.123502113 186 -0.034258798 187 -0.190092633 188 -0.171264219 189 -0.460842425 190 -0.468821782 191 -0.260515601 192 -0.164445256 193 -0.152273866 194 -0.087961960 195 -0.060005142 196 -0.082178380 197 -0.411831932 198 -0.403900355 199 -0.343582590 200 -0.545014941 201 -0.246134632 202 0.148529097 203 0.420561811 204 0.470669144 205 0.583865257 206 0.635121217 207 0.823492271 208 0.767708080 209 0.995614643 210 1.102989156 211 1.121969727 212 1.030205654 213 1.043444445 214 0.897900099 215 0.490743510 216 0.313599762 217 0.188325762 218 0.004373587 219 -1.130992438 220 -1.163640132 > library(lattice) > postscript(file="/var/www/html/rcomp/tmp/16b1n1256475663.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/2zbtr1256475663.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/3vx091256475663.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/46iik1256475663.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/5z8mh1256475663.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/686n11256475663.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/7s8v01256475663.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/85up31256475663.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. 5.032 5.170 5.277 5.274 5.381 5.486 > > #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/9ayho1256475663.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/10yw051256475664.tab") > > system("convert tmp/16b1n1256475663.ps tmp/16b1n1256475663.png") > system("convert tmp/2zbtr1256475663.ps tmp/2zbtr1256475663.png") > system("convert tmp/3vx091256475663.ps tmp/3vx091256475663.png") > system("convert tmp/46iik1256475663.ps tmp/46iik1256475663.png") > system("convert tmp/5z8mh1256475663.ps tmp/5z8mh1256475663.png") > system("convert tmp/686n11256475663.ps tmp/686n11256475663.png") > system("convert tmp/7s8v01256475663.ps tmp/7s8v01256475663.png") > system("convert tmp/85up31256475663.ps tmp/85up31256475663.png") > > > proc.time() user system elapsed 1.714 1.244 2.111