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. > x <- array(list(110.3672031 + ,0 + ,102.1880309 + ,114.0150276 + ,108.1560276 + ,100 + ,0 + ,0 + ,0 + ,96.8602511 + ,0 + ,110.3672031 + ,102.1880309 + ,114.0150276 + ,108.1560276 + ,0 + ,0 + ,0 + ,94.1944583 + ,0 + ,96.8602511 + ,110.3672031 + ,102.1880309 + ,114.0150276 + ,0 + ,0 + ,0 + ,99.51621961 + ,0 + ,94.1944583 + ,96.8602511 + ,110.3672031 + ,102.1880309 + ,0 + ,0 + ,0 + ,94.06333487 + ,0 + ,99.51621961 + ,94.1944583 + ,96.8602511 + ,110.3672031 + ,0 + ,0 + ,0 + ,97.5541476 + ,0 + ,94.06333487 + ,99.51621961 + ,94.1944583 + ,96.8602511 + ,0 + ,0 + ,0 + ,78.15062422 + ,0 + ,97.5541476 + ,94.06333487 + ,99.51621961 + ,94.1944583 + ,0 + ,0 + ,0 + ,81.2434643 + ,0 + ,78.15062422 + ,97.5541476 + ,94.06333487 + ,99.51621961 + ,0 + ,0 + ,0 + ,92.36262465 + ,0 + ,81.2434643 + ,78.15062422 + ,97.5541476 + ,94.06333487 + ,0 + ,0 + ,0 + ,96.06324371 + ,0 + ,92.36262465 + ,81.2434643 + ,78.15062422 + ,97.5541476 + ,0 + ,0 + ,0 + ,114.0523777 + ,0 + ,96.06324371 + ,92.36262465 + ,81.2434643 + ,78.15062422 + ,0 + ,0 + ,0 + ,110.6616666 + ,0 + ,114.0523777 + ,96.06324371 + ,92.36262465 + ,81.2434643 + ,0 + ,0 + ,0 + ,104.9171949 + ,0 + ,110.6616666 + ,114.0523777 + ,96.06324371 + ,92.36262465 + ,0 + ,0 + ,0 + ,90.00187193 + ,0 + ,104.9171949 + ,110.6616666 + ,114.0523777 + ,96.06324371 + ,0 + ,0 + ,0 + ,95.7008067 + ,0 + ,90.00187193 + ,104.9171949 + ,110.6616666 + ,114.0523777 + ,0 + ,0 + ,0 + ,86.02741157 + ,0 + ,95.7008067 + ,90.00187193 + ,104.9171949 + ,110.6616666 + ,0 + ,0 + ,0 + ,84.85287668 + ,0 + ,86.02741157 + ,95.7008067 + ,90.00187193 + ,104.9171949 + ,0 + ,0 + ,0 + ,100.04328 + ,0 + ,84.85287668 + ,86.02741157 + ,95.7008067 + ,90.00187193 + ,0 + ,0 + ,0 + ,80.91713823 + ,0 + ,100.04328 + ,84.85287668 + ,86.02741157 + ,95.7008067 + ,0 + ,0 + ,0 + ,74.06539709 + ,0 + ,80.91713823 + ,100.04328 + ,84.85287668 + ,86.02741157 + ,0 + ,0 + ,0 + ,77.30281369 + ,0 + ,74.06539709 + ,80.91713823 + ,100.04328 + ,84.85287668 + ,0 + ,0 + ,0 + ,97.23043249 + ,0 + ,77.30281369 + ,74.06539709 + ,80.91713823 + ,100.04328 + ,0 + ,0 + ,0 + ,90.75515676 + ,0 + ,97.23043249 + ,77.30281369 + ,74.06539709 + ,80.91713823 + ,0 + ,0 + ,0 + ,100.5614455 + ,0 + ,90.75515676 + ,97.23043249 + ,77.30281369 + ,74.06539709 + ,0 + ,0 + ,0 + ,92.01293267 + ,0 + ,100.5614455 + ,90.75515676 + ,97.23043249 + ,77.30281369 + ,0 + ,0 + ,0 + ,99.24012138 + ,0 + ,92.01293267 + ,100.5614455 + ,90.75515676 + ,97.23043249 + ,0 + ,0 + ,0 + ,105.8672755 + ,0 + ,99.24012138 + ,92.01293267 + ,100.5614455 + ,90.75515676 + ,0 + ,0 + ,0 + ,90.9920463 + ,0 + ,105.8672755 + ,99.24012138 + ,92.01293267 + ,100.5614455 + ,0 + ,0 + ,0 + ,93.30624423 + ,0 + ,90.9920463 + ,105.8672755 + ,99.24012138 + ,92.01293267 + ,0 + ,0 + ,0 + ,91.17419413 + ,0 + ,93.30624423 + ,90.9920463 + ,105.8672755 + ,99.24012138 + ,0 + ,0 + ,0 + ,77.33295039 + ,0 + ,91.17419413 + ,93.30624423 + ,90.9920463 + ,105.8672755 + ,0 + ,0 + ,0 + ,91.1277721 + ,0 + ,77.33295039 + ,91.17419413 + ,93.30624423 + ,90.9920463 + ,0 + ,0 + ,0 + ,85.01249943 + ,0 + ,91.1277721 + ,77.33295039 + ,91.17419413 + ,93.30624423 + ,0 + ,0 + ,0 + ,83.90390242 + ,0 + ,85.01249943 + ,91.1277721 + ,77.33295039 + ,91.17419413 + ,0 + ,0 + ,0 + ,104.8626302 + ,0 + ,83.90390242 + ,85.01249943 + ,91.1277721 + ,77.33295039 + ,0 + ,0 + ,0 + ,110.9039108 + ,0 + ,104.8626302 + ,83.90390242 + ,85.01249943 + ,91.1277721 + ,0 + ,0 + ,0 + ,95.43714373 + ,0 + ,110.9039108 + ,104.8626302 + ,83.90390242 + ,85.01249943 + ,0 + ,0 + ,0 + ,111.6238727 + ,0 + ,95.43714373 + ,110.9039108 + ,104.8626302 + ,83.90390242 + ,0 + ,0 + ,0 + ,108.8925403 + ,0 + ,111.6238727 + ,95.43714373 + ,110.9039108 + ,104.8626302 + ,0 + ,0 + ,0 + ,96.17511682 + ,0 + ,108.8925403 + ,111.6238727 + ,95.43714373 + ,110.9039108 + ,0 + ,0 + ,0 + ,101.9740205 + ,0 + ,96.17511682 + ,108.8925403 + ,111.6238727 + ,95.43714373 + ,0 + ,0 + ,0 + ,99.11953031 + ,0 + ,101.9740205 + ,96.17511682 + ,108.8925403 + ,111.6238727 + ,0 + ,0 + ,0 + ,86.78158147 + ,0 + ,99.11953031 + ,101.9740205 + ,96.17511682 + ,108.8925403 + ,0 + ,0 + ,0 + ,118.4195003 + ,0 + ,86.78158147 + ,99.11953031 + ,101.9740205 + ,96.17511682 + ,0 + ,0 + ,0 + ,118.7441447 + ,0 + ,118.4195003 + ,86.78158147 + ,99.11953031 + ,101.9740205 + ,0 + ,0 + ,0 + ,106.5296192 + ,0 + ,118.7441447 + ,118.4195003 + ,86.78158147 + ,99.11953031 + ,0 + ,0 + ,0 + ,134.7772694 + ,0 + ,106.5296192 + ,118.7441447 + ,118.4195003 + ,86.78158147 + ,0 + ,0 + ,0 + ,104.6778714 + ,0 + ,134.7772694 + ,106.5296192 + ,118.7441447 + ,118.4195003 + ,0 + ,0 + ,0 + ,105.2954304 + ,0 + ,104.6778714 + ,134.7772694 + ,106.5296192 + ,118.7441447 + ,0 + ,0 + ,0 + ,139.4139849 + ,0 + ,105.2954304 + ,104.6778714 + ,134.7772694 + ,106.5296192 + ,0 + ,0 + ,0 + ,103.6060491 + ,0 + ,139.4139849 + ,105.2954304 + ,104.6778714 + ,134.7772694 + ,0 + ,0 + ,0 + ,99.78182974 + ,0 + ,103.6060491 + ,139.4139849 + ,105.2954304 + ,104.6778714 + ,0 + ,0 + ,0 + ,103.4610301 + ,0 + ,99.78182974 + ,103.6060491 + ,139.4139849 + ,105.2954304 + ,0 + ,0 + ,0 + ,120.0594945 + ,0 + ,103.4610301 + ,99.78182974 + ,103.6060491 + ,139.4139849 + ,0 + ,0 + ,0 + ,96.71377168 + ,0 + ,120.0594945 + ,103.4610301 + ,99.78182974 + ,103.6060491 + ,0 + ,0 + ,0 + ,107.1308929 + ,0 + ,96.71377168 + ,120.0594945 + ,103.4610301 + ,99.78182974 + ,0 + ,0 + ,0 + ,105.3608372 + ,0 + ,107.1308929 + ,96.71377168 + ,120.0594945 + ,103.4610301 + ,0 + ,0 + ,0 + ,111.6942359 + ,0 + ,105.3608372 + ,107.1308929 + ,96.71377168 + ,120.0594945 + ,0 + ,0 + ,0 + ,132.0519998 + ,0 + ,111.6942359 + ,105.3608372 + ,107.1308929 + ,96.71377168 + ,0 + ,0 + ,0 + ,126.8037879 + ,0 + ,132.0519998 + ,111.6942359 + ,105.3608372 + ,107.1308929 + ,0 + ,0 + ,0 + ,154.4824253 + ,0 + ,126.8037879 + ,132.0519998 + ,111.6942359 + ,105.3608372 + ,1 + ,0 + ,0 + ,141.5570984 + ,0 + ,154.4824253 + ,126.8037879 + ,132.0519998 + ,111.6942359 + ,0 + ,0 + ,0 + ,109.9506882 + ,0 + ,141.5570984 + ,154.4824253 + ,126.8037879 + ,132.0519998 + ,0 + ,0 + ,0 + ,127.904198 + ,0 + ,109.9506882 + ,141.5570984 + ,154.4824253 + ,126.8037879 + ,0 + ,0 + ,0 + ,133.0888617 + ,0 + ,127.904198 + ,109.9506882 + ,141.5570984 + ,154.4824253 + ,0 + ,0 + ,0 + ,120.0796299 + ,0 + ,133.0888617 + ,127.904198 + ,109.9506882 + ,141.5570984 + ,0 + ,0 + ,0 + ,117.5557142 + ,0 + ,120.0796299 + ,133.0888617 + ,127.904198 + ,109.9506882 + ,0 + ,0 + ,0 + ,143.0362309 + ,0 + ,117.5557142 + ,120.0796299 + ,133.0888617 + ,127.904198 + ,0 + ,0 + ,0 + ,159.982927 + ,1 + ,143.0362309 + ,117.5557142 + ,120.0796299 + ,133.0888617 + ,0 + ,1 + ,0 + ,128.5991124 + ,1 + ,159.982927 + ,143.0362309 + ,117.5557142 + ,120.0796299 + ,0 + ,0 + ,0 + ,149.7373327 + ,1 + ,128.5991124 + ,159.982927 + ,143.0362309 + ,117.5557142 + ,0 + ,0 + ,0 + ,126.8169313 + ,1 + ,149.7373327 + ,128.5991124 + ,159.982927 + ,143.0362309 + ,0 + ,0 + ,0 + ,140.9639674 + ,1 + ,126.8169313 + ,149.7373327 + ,128.5991124 + ,159.982927 + ,0 + ,0 + ,0 + ,137.6691981 + ,1 + ,140.9639674 + ,126.8169313 + ,149.7373327 + ,128.5991124 + ,0 + ,0 + ,0 + ,117.9402337 + ,1 + ,137.6691981 + ,140.9639674 + ,126.8169313 + ,149.7373327 + ,0 + ,0 + ,0 + ,122.3095247 + ,1 + ,117.9402337 + ,137.6691981 + ,140.9639674 + ,126.8169313 + ,0 + ,0 + ,0 + ,127.7804207 + ,1 + ,122.3095247 + ,117.9402337 + ,137.6691981 + ,140.9639674 + ,0 + ,0 + ,0 + ,136.1677176 + ,1 + ,127.7804207 + ,122.3095247 + ,117.9402337 + ,137.6691981 + ,0 + ,0 + ,0 + ,116.2405856 + ,1 + ,136.1677176 + ,127.7804207 + ,122.3095247 + ,117.9402337 + ,0 + ,0 + ,0 + ,123.1576893 + ,1 + ,116.2405856 + ,136.1677176 + ,127.7804207 + ,122.3095247 + ,0 + ,0 + ,0 + ,116.3400234 + ,1 + ,123.1576893 + ,116.2405856 + ,136.1677176 + ,127.7804207 + ,0 + ,0 + ,0 + ,108.6119282 + ,1 + ,116.3400234 + ,123.1576893 + ,116.2405856 + ,136.1677176 + ,0 + ,0 + ,0 + ,125.8982264 + ,1 + ,108.6119282 + ,116.3400234 + ,123.1576893 + ,116.2405856 + ,0 + ,0 + ,0 + ,112.8003105 + ,1 + ,125.8982264 + ,108.6119282 + ,116.3400234 + ,123.1576893 + ,0 + ,0 + ,0 + ,107.5182447 + ,1 + ,112.8003105 + ,125.8982264 + ,108.6119282 + ,116.3400234 + ,0 + ,0 + ,0 + ,135.0955413 + ,1 + ,107.5182447 + ,112.8003105 + ,125.8982264 + ,108.6119282 + ,0 + ,0 + ,0 + ,115.5096488 + ,1 + ,135.0955413 + ,107.5182447 + ,112.8003105 + ,125.8982264 + ,0 + ,0 + ,0 + ,115.8640759 + ,1 + ,115.5096488 + ,135.0955413 + ,107.5182447 + ,112.8003105 + ,0 + ,0 + ,0 + ,104.5883906 + ,1 + ,115.8640759 + ,115.5096488 + ,135.0955413 + ,107.5182447 + ,0 + ,0 + ,0 + ,163.7213386 + ,1 + ,104.5883906 + ,115.8640759 + ,115.5096488 + ,135.0955413 + ,0 + ,0 + ,1 + ,113.4482275 + ,1 + ,163.7213386 + ,104.5883906 + ,115.8640759 + ,115.5096488 + ,0 + ,0 + ,0 + ,98.0428844 + ,1 + ,113.4482275 + ,163.7213386 + ,104.5883906 + ,115.8640759 + ,0 + ,0 + ,0 + ,116.7868521 + ,1 + ,98.0428844 + ,113.4482275 + ,163.7213386 + ,104.5883906 + ,0 + ,0 + ,0 + ,126.5330444 + ,1 + ,116.7868521 + ,98.0428844 + ,113.4482275 + ,163.7213386 + ,0 + ,0 + ,0 + ,113.0336597 + ,1 + ,126.5330444 + ,116.7868521 + ,98.0428844 + ,113.4482275 + ,0 + ,0 + ,0 + ,124.3392163 + ,1 + ,113.0336597 + ,126.5330444 + ,116.7868521 + ,98.0428844 + ,0 + ,0 + ,0 + ,109.8298759 + ,1 + ,124.3392163 + ,113.0336597 + ,126.5330444 + ,116.7868521 + ,0 + ,0 + ,0 + ,124.4434777 + ,1 + ,109.8298759 + ,124.3392163 + ,113.0336597 + ,126.5330444 + ,0 + ,0 + ,0 + ,111.5039454 + ,1 + ,124.4434777 + ,109.8298759 + ,124.3392163 + ,113.0336597 + ,0 + ,0 + ,0 + ,102.0350019 + ,1 + ,111.5039454 + ,124.4434777 + ,109.8298759 + ,124.3392163 + ,0 + ,0 + ,0 + ,116.8726598 + ,1 + ,102.0350019 + ,111.5039454 + ,124.4434777 + ,109.8298759 + ,0 + ,0 + ,0 + ,112.2073122 + ,1 + ,116.8726598 + ,102.0350019 + ,111.5039454 + ,124.4434777 + ,0 + ,0 + ,0 + ,101.1513902 + ,1 + ,112.2073122 + ,116.8726598 + ,102.0350019 + ,111.5039454 + ,0 + ,0 + ,0 + ,124.4255108 + ,1 + ,101.1513902 + ,112.2073122 + ,116.8726598 + ,102.0350019 + ,0 + ,0 + ,0) + ,dim=c(9 + ,104) + ,dimnames=list(c('Y' + ,'X' + ,'Y1' + ,'Y2' + ,'Y3' + ,'Y4' + ,'O1' + ,'O2' + ,'O3') + ,1:104)) > y <- array(NA,dim=c(9,104),dimnames=list(c('Y','X','Y1','Y2','Y3','Y4','O1','O2','O3'),1:104)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'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: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Y X Y1 Y2 Y3 Y4 O1 O2 O3 M1 M2 M3 M4 M5 1 110.36720 0 102.18803 114.01503 108.15603 100.00000 0 0 0 1 0 0 0 0 2 96.86025 0 110.36720 102.18803 114.01503 108.15603 0 0 0 0 1 0 0 0 3 94.19446 0 96.86025 110.36720 102.18803 114.01503 0 0 0 0 0 1 0 0 4 99.51622 0 94.19446 96.86025 110.36720 102.18803 0 0 0 0 0 0 1 0 5 94.06333 0 99.51622 94.19446 96.86025 110.36720 0 0 0 0 0 0 0 1 6 97.55415 0 94.06333 99.51622 94.19446 96.86025 0 0 0 0 0 0 0 0 7 78.15062 0 97.55415 94.06333 99.51622 94.19446 0 0 0 0 0 0 0 0 8 81.24346 0 78.15062 97.55415 94.06333 99.51622 0 0 0 0 0 0 0 0 9 92.36262 0 81.24346 78.15062 97.55415 94.06333 0 0 0 0 0 0 0 0 10 96.06324 0 92.36262 81.24346 78.15062 97.55415 0 0 0 0 0 0 0 0 11 114.05238 0 96.06324 92.36262 81.24346 78.15062 0 0 0 0 0 0 0 0 12 110.66167 0 114.05238 96.06324 92.36262 81.24346 0 0 0 0 0 0 0 0 13 104.91719 0 110.66167 114.05238 96.06324 92.36262 0 0 0 1 0 0 0 0 14 90.00187 0 104.91719 110.66167 114.05238 96.06324 0 0 0 0 1 0 0 0 15 95.70081 0 90.00187 104.91719 110.66167 114.05238 0 0 0 0 0 1 0 0 16 86.02741 0 95.70081 90.00187 104.91719 110.66167 0 0 0 0 0 0 1 0 17 84.85288 0 86.02741 95.70081 90.00187 104.91719 0 0 0 0 0 0 0 1 18 100.04328 0 84.85288 86.02741 95.70081 90.00187 0 0 0 0 0 0 0 0 19 80.91714 0 100.04328 84.85288 86.02741 95.70081 0 0 0 0 0 0 0 0 20 74.06540 0 80.91714 100.04328 84.85288 86.02741 0 0 0 0 0 0 0 0 21 77.30281 0 74.06540 80.91714 100.04328 84.85288 0 0 0 0 0 0 0 0 22 97.23043 0 77.30281 74.06540 80.91714 100.04328 0 0 0 0 0 0 0 0 23 90.75516 0 97.23043 77.30281 74.06540 80.91714 0 0 0 0 0 0 0 0 24 100.56145 0 90.75516 97.23043 77.30281 74.06540 0 0 0 0 0 0 0 0 25 92.01293 0 100.56145 90.75516 97.23043 77.30281 0 0 0 1 0 0 0 0 26 99.24012 0 92.01293 100.56145 90.75516 97.23043 0 0 0 0 1 0 0 0 27 105.86728 0 99.24012 92.01293 100.56145 90.75516 0 0 0 0 0 1 0 0 28 90.99205 0 105.86728 99.24012 92.01293 100.56145 0 0 0 0 0 0 1 0 29 93.30624 0 90.99205 105.86728 99.24012 92.01293 0 0 0 0 0 0 0 1 30 91.17419 0 93.30624 90.99205 105.86728 99.24012 0 0 0 0 0 0 0 0 31 77.33295 0 91.17419 93.30624 90.99205 105.86728 0 0 0 0 0 0 0 0 32 91.12777 0 77.33295 91.17419 93.30624 90.99205 0 0 0 0 0 0 0 0 33 85.01250 0 91.12777 77.33295 91.17419 93.30624 0 0 0 0 0 0 0 0 34 83.90390 0 85.01250 91.12777 77.33295 91.17419 0 0 0 0 0 0 0 0 35 104.86263 0 83.90390 85.01250 91.12777 77.33295 0 0 0 0 0 0 0 0 36 110.90391 0 104.86263 83.90390 85.01250 91.12777 0 0 0 0 0 0 0 0 37 95.43714 0 110.90391 104.86263 83.90390 85.01250 0 0 0 1 0 0 0 0 38 111.62387 0 95.43714 110.90391 104.86263 83.90390 0 0 0 0 1 0 0 0 39 108.89254 0 111.62387 95.43714 110.90391 104.86263 0 0 0 0 0 1 0 0 40 96.17512 0 108.89254 111.62387 95.43714 110.90391 0 0 0 0 0 0 1 0 41 101.97402 0 96.17512 108.89254 111.62387 95.43714 0 0 0 0 0 0 0 1 42 99.11953 0 101.97402 96.17512 108.89254 111.62387 0 0 0 0 0 0 0 0 43 86.78158 0 99.11953 101.97402 96.17512 108.89254 0 0 0 0 0 0 0 0 44 118.41950 0 86.78158 99.11953 101.97402 96.17512 0 0 0 0 0 0 0 0 45 118.74414 0 118.41950 86.78158 99.11953 101.97402 0 0 0 0 0 0 0 0 46 106.52962 0 118.74414 118.41950 86.78158 99.11953 0 0 0 0 0 0 0 0 47 134.77727 0 106.52962 118.74414 118.41950 86.78158 0 0 0 0 0 0 0 0 48 104.67787 0 134.77727 106.52962 118.74414 118.41950 0 0 0 0 0 0 0 0 49 105.29543 0 104.67787 134.77727 106.52962 118.74414 0 0 0 1 0 0 0 0 50 139.41398 0 105.29543 104.67787 134.77727 106.52962 0 0 0 0 1 0 0 0 51 103.60605 0 139.41398 105.29543 104.67787 134.77727 0 0 0 0 0 1 0 0 52 99.78183 0 103.60605 139.41398 105.29543 104.67787 0 0 0 0 0 0 1 0 53 103.46103 0 99.78183 103.60605 139.41398 105.29543 0 0 0 0 0 0 0 1 54 120.05949 0 103.46103 99.78183 103.60605 139.41398 0 0 0 0 0 0 0 0 55 96.71377 0 120.05949 103.46103 99.78183 103.60605 0 0 0 0 0 0 0 0 56 107.13089 0 96.71377 120.05949 103.46103 99.78183 0 0 0 0 0 0 0 0 57 105.36084 0 107.13089 96.71377 120.05949 103.46103 0 0 0 0 0 0 0 0 58 111.69424 0 105.36084 107.13089 96.71377 120.05949 0 0 0 0 0 0 0 0 59 132.05200 0 111.69424 105.36084 107.13089 96.71377 0 0 0 0 0 0 0 0 60 126.80379 0 132.05200 111.69424 105.36084 107.13089 0 0 0 0 0 0 0 0 61 154.48243 0 126.80379 132.05200 111.69424 105.36084 1 0 0 1 0 0 0 0 62 141.55710 0 154.48243 126.80379 132.05200 111.69424 0 0 0 0 1 0 0 0 63 109.95069 0 141.55710 154.48243 126.80379 132.05200 0 0 0 0 0 1 0 0 64 127.90420 0 109.95069 141.55710 154.48243 126.80379 0 0 0 0 0 0 1 0 65 133.08886 0 127.90420 109.95069 141.55710 154.48243 0 0 0 0 0 0 0 1 66 120.07963 0 133.08886 127.90420 109.95069 141.55710 0 0 0 0 0 0 0 0 67 117.55571 0 120.07963 133.08886 127.90420 109.95069 0 0 0 0 0 0 0 0 68 143.03623 0 117.55571 120.07963 133.08886 127.90420 0 0 0 0 0 0 0 0 69 159.98293 1 143.03623 117.55571 120.07963 133.08886 0 1 0 0 0 0 0 0 70 128.59911 1 159.98293 143.03623 117.55571 120.07963 0 0 0 0 0 0 0 0 71 149.73733 1 128.59911 159.98293 143.03623 117.55571 0 0 0 0 0 0 0 0 72 126.81693 1 149.73733 128.59911 159.98293 143.03623 0 0 0 0 0 0 0 0 73 140.96397 1 126.81693 149.73733 128.59911 159.98293 0 0 0 1 0 0 0 0 74 137.66920 1 140.96397 126.81693 149.73733 128.59911 0 0 0 0 1 0 0 0 75 117.94023 1 137.66920 140.96397 126.81693 149.73733 0 0 0 0 0 1 0 0 76 122.30952 1 117.94023 137.66920 140.96397 126.81693 0 0 0 0 0 0 1 0 77 127.78042 1 122.30952 117.94023 137.66920 140.96397 0 0 0 0 0 0 0 1 78 136.16772 1 127.78042 122.30952 117.94023 137.66920 0 0 0 0 0 0 0 0 79 116.24059 1 136.16772 127.78042 122.30952 117.94023 0 0 0 0 0 0 0 0 80 123.15769 1 116.24059 136.16772 127.78042 122.30952 0 0 0 0 0 0 0 0 81 116.34002 1 123.15769 116.24059 136.16772 127.78042 0 0 0 0 0 0 0 0 82 108.61193 1 116.34002 123.15769 116.24059 136.16772 0 0 0 0 0 0 0 0 83 125.89823 1 108.61193 116.34002 123.15769 116.24059 0 0 0 0 0 0 0 0 84 112.80031 1 125.89823 108.61193 116.34002 123.15769 0 0 0 0 0 0 0 0 85 107.51824 1 112.80031 125.89823 108.61193 116.34002 0 0 0 1 0 0 0 0 86 135.09554 1 107.51824 112.80031 125.89823 108.61193 0 0 0 0 1 0 0 0 87 115.50965 1 135.09554 107.51824 112.80031 125.89823 0 0 0 0 0 1 0 0 88 115.86408 1 115.50965 135.09554 107.51824 112.80031 0 0 0 0 0 0 1 0 89 104.58839 1 115.86408 115.50965 135.09554 107.51824 0 0 0 0 0 0 0 1 90 163.72134 1 104.58839 115.86408 115.50965 135.09554 0 0 1 0 0 0 0 0 91 113.44823 1 163.72134 104.58839 115.86408 115.50965 0 0 0 0 0 0 0 0 92 98.04288 1 113.44823 163.72134 104.58839 115.86408 0 0 0 0 0 0 0 0 93 116.78685 1 98.04288 113.44823 163.72134 104.58839 0 0 0 0 0 0 0 0 94 126.53304 1 116.78685 98.04288 113.44823 163.72134 0 0 0 0 0 0 0 0 95 113.03366 1 126.53304 116.78685 98.04288 113.44823 0 0 0 0 0 0 0 0 96 124.33922 1 113.03366 126.53304 116.78685 98.04288 0 0 0 0 0 0 0 0 97 109.82988 1 124.33922 113.03366 126.53304 116.78685 0 0 0 1 0 0 0 0 98 124.44348 1 109.82988 124.33922 113.03366 126.53304 0 0 0 0 1 0 0 0 99 111.50395 1 124.44348 109.82988 124.33922 113.03366 0 0 0 0 0 1 0 0 100 102.03500 1 111.50395 124.44348 109.82988 124.33922 0 0 0 0 0 0 1 0 101 116.87266 1 102.03500 111.50395 124.44348 109.82988 0 0 0 0 0 0 0 1 102 112.20731 1 116.87266 102.03500 111.50395 124.44348 0 0 0 0 0 0 0 0 103 101.15139 1 112.20731 116.87266 102.03500 111.50395 0 0 0 0 0 0 0 0 104 124.42551 1 101.15139 112.20731 116.87266 102.03500 0 0 0 0 0 0 0 0 M6 M7 M8 M9 M10 M11 t 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 2 3 0 0 0 0 0 0 3 4 0 0 0 0 0 0 4 5 0 0 0 0 0 0 5 6 1 0 0 0 0 0 6 7 0 1 0 0 0 0 7 8 0 0 1 0 0 0 8 9 0 0 0 1 0 0 9 10 0 0 0 0 1 0 10 11 0 0 0 0 0 1 11 12 0 0 0 0 0 0 12 13 0 0 0 0 0 0 13 14 0 0 0 0 0 0 14 15 0 0 0 0 0 0 15 16 0 0 0 0 0 0 16 17 0 0 0 0 0 0 17 18 1 0 0 0 0 0 18 19 0 1 0 0 0 0 19 20 0 0 1 0 0 0 20 21 0 0 0 1 0 0 21 22 0 0 0 0 1 0 22 23 0 0 0 0 0 1 23 24 0 0 0 0 0 0 24 25 0 0 0 0 0 0 25 26 0 0 0 0 0 0 26 27 0 0 0 0 0 0 27 28 0 0 0 0 0 0 28 29 0 0 0 0 0 0 29 30 1 0 0 0 0 0 30 31 0 1 0 0 0 0 31 32 0 0 1 0 0 0 32 33 0 0 0 1 0 0 33 34 0 0 0 0 1 0 34 35 0 0 0 0 0 1 35 36 0 0 0 0 0 0 36 37 0 0 0 0 0 0 37 38 0 0 0 0 0 0 38 39 0 0 0 0 0 0 39 40 0 0 0 0 0 0 40 41 0 0 0 0 0 0 41 42 1 0 0 0 0 0 42 43 0 1 0 0 0 0 43 44 0 0 1 0 0 0 44 45 0 0 0 1 0 0 45 46 0 0 0 0 1 0 46 47 0 0 0 0 0 1 47 48 0 0 0 0 0 0 48 49 0 0 0 0 0 0 49 50 0 0 0 0 0 0 50 51 0 0 0 0 0 0 51 52 0 0 0 0 0 0 52 53 0 0 0 0 0 0 53 54 1 0 0 0 0 0 54 55 0 1 0 0 0 0 55 56 0 0 1 0 0 0 56 57 0 0 0 1 0 0 57 58 0 0 0 0 1 0 58 59 0 0 0 0 0 1 59 60 0 0 0 0 0 0 60 61 0 0 0 0 0 0 61 62 0 0 0 0 0 0 62 63 0 0 0 0 0 0 63 64 0 0 0 0 0 0 64 65 0 0 0 0 0 0 65 66 1 0 0 0 0 0 66 67 0 1 0 0 0 0 67 68 0 0 1 0 0 0 68 69 0 0 0 1 0 0 69 70 0 0 0 0 1 0 70 71 0 0 0 0 0 1 71 72 0 0 0 0 0 0 72 73 0 0 0 0 0 0 73 74 0 0 0 0 0 0 74 75 0 0 0 0 0 0 75 76 0 0 0 0 0 0 76 77 0 0 0 0 0 0 77 78 1 0 0 0 0 0 78 79 0 1 0 0 0 0 79 80 0 0 1 0 0 0 80 81 0 0 0 1 0 0 81 82 0 0 0 0 1 0 82 83 0 0 0 0 0 1 83 84 0 0 0 0 0 0 84 85 0 0 0 0 0 0 85 86 0 0 0 0 0 0 86 87 0 0 0 0 0 0 87 88 0 0 0 0 0 0 88 89 0 0 0 0 0 0 89 90 1 0 0 0 0 0 90 91 0 1 0 0 0 0 91 92 0 0 1 0 0 0 92 93 0 0 0 1 0 0 93 94 0 0 0 0 1 0 94 95 0 0 0 0 0 1 95 96 0 0 0 0 0 0 96 97 0 0 0 0 0 0 97 98 0 0 0 0 0 0 98 99 0 0 0 0 0 0 99 100 0 0 0 0 0 0 100 101 0 0 0 0 0 0 101 102 1 0 0 0 0 0 102 103 0 1 0 0 0 0 103 104 0 0 1 0 0 0 104 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X Y1 Y2 Y3 Y4 30.13519 -7.37173 0.21293 0.02160 0.37722 0.08139 O1 O2 O3 M1 M2 M3 35.92493 45.60778 47.62163 -3.09242 2.30992 -10.22268 M4 M5 M6 M7 M8 M9 -9.88127 -9.42118 -2.16497 -16.12343 -2.77630 -9.90267 M10 M11 t -0.38975 11.30177 0.17956 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -20.5290 -5.6621 0.0591 5.7635 17.6521 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 30.13519 9.56874 3.149 0.002275 ** X -7.37173 3.61450 -2.039 0.044582 * Y1 0.21293 0.08786 2.424 0.017539 * Y2 0.02160 0.08429 0.256 0.798374 Y3 0.37722 0.08549 4.412 3.05e-05 *** Y4 0.08139 0.08646 0.941 0.349239 O1 35.92493 10.27851 3.495 0.000763 *** O2 45.60778 10.71864 4.255 5.46e-05 *** O3 47.62163 10.22929 4.655 1.21e-05 *** M1 -3.09242 4.96345 -0.623 0.534967 M2 2.30992 4.75841 0.485 0.628643 M3 -10.22268 4.78626 -2.136 0.035639 * M4 -9.88127 5.01152 -1.972 0.051974 . M5 -9.42118 5.00029 -1.884 0.063049 . M6 -2.16497 5.10067 -0.424 0.672338 M7 -16.12343 4.63788 -3.476 0.000811 *** M8 -2.77630 5.20366 -0.534 0.595094 M9 -9.90267 5.30200 -1.868 0.065330 . M10 -0.38975 5.13066 -0.076 0.939630 M11 11.30177 4.85707 2.327 0.022409 * t 0.17956 0.06378 2.815 0.006083 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.431 on 83 degrees of freedom Multiple R-squared: 0.7922, Adjusted R-squared: 0.7421 F-statistic: 15.82 on 20 and 83 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.7089186 0.5821628 0.2910814 [2,] 0.5918129 0.8163742 0.4081871 [3,] 0.6332499 0.7335002 0.3667501 [4,] 0.7776645 0.4446711 0.2223355 [5,] 0.6903005 0.6193991 0.3096995 [6,] 0.6195048 0.7609904 0.3804952 [7,] 0.5329617 0.9340765 0.4670383 [8,] 0.4666500 0.9332999 0.5333500 [9,] 0.5794637 0.8410725 0.4205363 [10,] 0.5023089 0.9953822 0.4976911 [11,] 0.4930000 0.9860001 0.5070000 [12,] 0.4308281 0.8616561 0.5691719 [13,] 0.3997922 0.7995843 0.6002078 [14,] 0.3231622 0.6463245 0.6768378 [15,] 0.4302044 0.8604088 0.5697956 [16,] 0.3922825 0.7845650 0.6077175 [17,] 0.3343105 0.6686210 0.6656895 [18,] 0.2727369 0.5454738 0.7272631 [19,] 0.2595195 0.5190389 0.7404805 [20,] 0.2456527 0.4913055 0.7543473 [21,] 0.5214141 0.9571717 0.4785859 [22,] 0.6450097 0.7099806 0.3549903 [23,] 0.5964185 0.8071630 0.4035815 [24,] 0.5553467 0.8893066 0.4446533 [25,] 0.7689233 0.4621533 0.2310767 [26,] 0.7197745 0.5604510 0.2802255 [27,] 0.7984162 0.4031677 0.2015838 [28,] 0.7643609 0.4712781 0.2356391 [29,] 0.7180180 0.5639640 0.2819820 [30,] 0.7764197 0.4471605 0.2235803 [31,] 0.7860545 0.4278911 0.2139455 [32,] 0.7750618 0.4498764 0.2249382 [33,] 0.7756620 0.4486759 0.2243380 [34,] 0.7477765 0.5044469 0.2522235 [35,] 0.7225281 0.5549438 0.2774719 [36,] 0.6702694 0.6594612 0.3297306 [37,] 0.6143248 0.7713504 0.3856752 [38,] 0.5399237 0.9201525 0.4600763 [39,] 0.4859806 0.9719611 0.5140194 [40,] 0.4818223 0.9636446 0.5181777 [41,] 0.4170489 0.8340979 0.5829511 [42,] 0.3617538 0.7235076 0.6382462 [43,] 0.3334255 0.6668510 0.6665745 [44,] 0.3327155 0.6654310 0.6672845 [45,] 0.3061523 0.6123046 0.6938477 [46,] 0.2360133 0.4720267 0.7639867 [47,] 0.2239462 0.4478925 0.7760538 [48,] 0.3301372 0.6602744 0.6698628 [49,] 0.3500232 0.7000465 0.6499768 [50,] 0.5267165 0.9465669 0.4732835 [51,] 0.4272748 0.8545497 0.5727252 [52,] 0.3290285 0.6580569 0.6709715 [53,] 0.2369734 0.4739467 0.7630266 [54,] 0.1784633 0.3569265 0.8215367 [55,] 0.2666009 0.5332017 0.7333991 [56,] 0.2071791 0.4143582 0.7928209 [57,] 0.1425810 0.2851620 0.8574190 > postscript(file="/var/www/html/rcomp/tmp/12u5z1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2xfrs1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/31k6o1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4pjgk1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50zdi1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 104 Frequency = 1 1 2 3 4 5 9.985498e+00 -1.346342e+01 2.907736e+00 6.445165e+00 3.706427e+00 6 7 8 9 10 2.912495e+00 -5.128146e+00 -9.881951e+00 7.071597e+00 5.680543e+00 11 12 13 14 15 1.118296e+01 1.055796e+01 5.758843e+00 -2.052898e+01 6.380024e-01 16 17 18 19 20 -8.004783e+00 -1.788418e+00 5.489451e+00 1.182068e-01 -1.528542e+01 21 22 23 24 25 -8.863588e+00 6.808623e+00 -1.170967e+01 9.503589e+00 -5.860823e+00 26 27 28 29 30 -1.786384e+00 1.266746e+01 -1.869459e+00 7.988785e-01 -1.202848e+01 31 32 33 34 35 -6.614979e+00 -3.015832e+00 -4.206775e+00 -8.609006e+00 -3.230354e+00 36 37 38 39 40 1.067834e+01 -2.698804e+00 3.253107e+00 5.777566e+00 -1.886238e+00 41 42 43 44 45 1.192852e+00 -1.034457e+01 -3.401516e+00 1.624612e+01 1.765214e+01 46 47 48 49 50 -1.210075e-01 7.919176e+00 -1.950642e+01 -5.595914e+00 1.379800e+01 51 52 53 54 55 -7.880161e+00 -3.120907e+00 -1.141396e+01 7.778502e+00 -1.045258e+00 56 57 58 59 60 -6.189238e-01 -3.716707e+00 5.316110e-01 5.678469e+00 6.900682e+00 61 62 63 64 65 -8.881784e-16 3.442571e+00 -1.333362e+01 1.094417e+00 5.122254e+00 66 67 68 69 70 -3.840073e+00 5.872996e+00 1.522832e+01 -4.662937e-15 2.383408e+00 71 72 73 74 75 8.560819e+00 -1.552687e+01 1.641622e+01 -3.971787e-01 -4.515235e-01 76 77 78 79 80 4.197829e+00 8.616340e+00 1.601883e+01 7.924010e+00 2.957056e+00 81 82 83 84 85 -1.565332e+00 -1.084936e+01 -4.628738e+00 -8.109549e+00 -4.593127e+00 86 87 88 89 90 1.291818e+01 3.461200e+00 9.927926e+00 -1.161256e+01 -1.554312e-15 91 92 93 94 95 2.399872e-01 -1.504005e+01 -6.371332e+00 4.175192e+00 -1.377265e+01 96 97 98 99 100 5.502278e+00 -1.341190e+01 2.764097e+00 -3.786665e+00 -6.783951e+00 101 102 103 104 5.378188e+00 -5.986157e+00 2.034699e+00 9.410693e+00 > postscript(file="/var/www/html/rcomp/tmp/6oo6a1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 104 Frequency = 1 lag(myerror, k = 1) myerror 0 9.985498e+00 NA 1 -1.346342e+01 9.985498e+00 2 2.907736e+00 -1.346342e+01 3 6.445165e+00 2.907736e+00 4 3.706427e+00 6.445165e+00 5 2.912495e+00 3.706427e+00 6 -5.128146e+00 2.912495e+00 7 -9.881951e+00 -5.128146e+00 8 7.071597e+00 -9.881951e+00 9 5.680543e+00 7.071597e+00 10 1.118296e+01 5.680543e+00 11 1.055796e+01 1.118296e+01 12 5.758843e+00 1.055796e+01 13 -2.052898e+01 5.758843e+00 14 6.380024e-01 -2.052898e+01 15 -8.004783e+00 6.380024e-01 16 -1.788418e+00 -8.004783e+00 17 5.489451e+00 -1.788418e+00 18 1.182068e-01 5.489451e+00 19 -1.528542e+01 1.182068e-01 20 -8.863588e+00 -1.528542e+01 21 6.808623e+00 -8.863588e+00 22 -1.170967e+01 6.808623e+00 23 9.503589e+00 -1.170967e+01 24 -5.860823e+00 9.503589e+00 25 -1.786384e+00 -5.860823e+00 26 1.266746e+01 -1.786384e+00 27 -1.869459e+00 1.266746e+01 28 7.988785e-01 -1.869459e+00 29 -1.202848e+01 7.988785e-01 30 -6.614979e+00 -1.202848e+01 31 -3.015832e+00 -6.614979e+00 32 -4.206775e+00 -3.015832e+00 33 -8.609006e+00 -4.206775e+00 34 -3.230354e+00 -8.609006e+00 35 1.067834e+01 -3.230354e+00 36 -2.698804e+00 1.067834e+01 37 3.253107e+00 -2.698804e+00 38 5.777566e+00 3.253107e+00 39 -1.886238e+00 5.777566e+00 40 1.192852e+00 -1.886238e+00 41 -1.034457e+01 1.192852e+00 42 -3.401516e+00 -1.034457e+01 43 1.624612e+01 -3.401516e+00 44 1.765214e+01 1.624612e+01 45 -1.210075e-01 1.765214e+01 46 7.919176e+00 -1.210075e-01 47 -1.950642e+01 7.919176e+00 48 -5.595914e+00 -1.950642e+01 49 1.379800e+01 -5.595914e+00 50 -7.880161e+00 1.379800e+01 51 -3.120907e+00 -7.880161e+00 52 -1.141396e+01 -3.120907e+00 53 7.778502e+00 -1.141396e+01 54 -1.045258e+00 7.778502e+00 55 -6.189238e-01 -1.045258e+00 56 -3.716707e+00 -6.189238e-01 57 5.316110e-01 -3.716707e+00 58 5.678469e+00 5.316110e-01 59 6.900682e+00 5.678469e+00 60 -8.881784e-16 6.900682e+00 61 3.442571e+00 -8.881784e-16 62 -1.333362e+01 3.442571e+00 63 1.094417e+00 -1.333362e+01 64 5.122254e+00 1.094417e+00 65 -3.840073e+00 5.122254e+00 66 5.872996e+00 -3.840073e+00 67 1.522832e+01 5.872996e+00 68 -4.662937e-15 1.522832e+01 69 2.383408e+00 -4.662937e-15 70 8.560819e+00 2.383408e+00 71 -1.552687e+01 8.560819e+00 72 1.641622e+01 -1.552687e+01 73 -3.971787e-01 1.641622e+01 74 -4.515235e-01 -3.971787e-01 75 4.197829e+00 -4.515235e-01 76 8.616340e+00 4.197829e+00 77 1.601883e+01 8.616340e+00 78 7.924010e+00 1.601883e+01 79 2.957056e+00 7.924010e+00 80 -1.565332e+00 2.957056e+00 81 -1.084936e+01 -1.565332e+00 82 -4.628738e+00 -1.084936e+01 83 -8.109549e+00 -4.628738e+00 84 -4.593127e+00 -8.109549e+00 85 1.291818e+01 -4.593127e+00 86 3.461200e+00 1.291818e+01 87 9.927926e+00 3.461200e+00 88 -1.161256e+01 9.927926e+00 89 -1.554312e-15 -1.161256e+01 90 2.399872e-01 -1.554312e-15 91 -1.504005e+01 2.399872e-01 92 -6.371332e+00 -1.504005e+01 93 4.175192e+00 -6.371332e+00 94 -1.377265e+01 4.175192e+00 95 5.502278e+00 -1.377265e+01 96 -1.341190e+01 5.502278e+00 97 2.764097e+00 -1.341190e+01 98 -3.786665e+00 2.764097e+00 99 -6.783951e+00 -3.786665e+00 100 5.378188e+00 -6.783951e+00 101 -5.986157e+00 5.378188e+00 102 2.034699e+00 -5.986157e+00 103 9.410693e+00 2.034699e+00 104 NA 9.410693e+00 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.346342e+01 9.985498e+00 [2,] 2.907736e+00 -1.346342e+01 [3,] 6.445165e+00 2.907736e+00 [4,] 3.706427e+00 6.445165e+00 [5,] 2.912495e+00 3.706427e+00 [6,] -5.128146e+00 2.912495e+00 [7,] -9.881951e+00 -5.128146e+00 [8,] 7.071597e+00 -9.881951e+00 [9,] 5.680543e+00 7.071597e+00 [10,] 1.118296e+01 5.680543e+00 [11,] 1.055796e+01 1.118296e+01 [12,] 5.758843e+00 1.055796e+01 [13,] -2.052898e+01 5.758843e+00 [14,] 6.380024e-01 -2.052898e+01 [15,] -8.004783e+00 6.380024e-01 [16,] -1.788418e+00 -8.004783e+00 [17,] 5.489451e+00 -1.788418e+00 [18,] 1.182068e-01 5.489451e+00 [19,] -1.528542e+01 1.182068e-01 [20,] -8.863588e+00 -1.528542e+01 [21,] 6.808623e+00 -8.863588e+00 [22,] -1.170967e+01 6.808623e+00 [23,] 9.503589e+00 -1.170967e+01 [24,] -5.860823e+00 9.503589e+00 [25,] -1.786384e+00 -5.860823e+00 [26,] 1.266746e+01 -1.786384e+00 [27,] -1.869459e+00 1.266746e+01 [28,] 7.988785e-01 -1.869459e+00 [29,] -1.202848e+01 7.988785e-01 [30,] -6.614979e+00 -1.202848e+01 [31,] -3.015832e+00 -6.614979e+00 [32,] -4.206775e+00 -3.015832e+00 [33,] -8.609006e+00 -4.206775e+00 [34,] -3.230354e+00 -8.609006e+00 [35,] 1.067834e+01 -3.230354e+00 [36,] -2.698804e+00 1.067834e+01 [37,] 3.253107e+00 -2.698804e+00 [38,] 5.777566e+00 3.253107e+00 [39,] -1.886238e+00 5.777566e+00 [40,] 1.192852e+00 -1.886238e+00 [41,] -1.034457e+01 1.192852e+00 [42,] -3.401516e+00 -1.034457e+01 [43,] 1.624612e+01 -3.401516e+00 [44,] 1.765214e+01 1.624612e+01 [45,] -1.210075e-01 1.765214e+01 [46,] 7.919176e+00 -1.210075e-01 [47,] -1.950642e+01 7.919176e+00 [48,] -5.595914e+00 -1.950642e+01 [49,] 1.379800e+01 -5.595914e+00 [50,] -7.880161e+00 1.379800e+01 [51,] -3.120907e+00 -7.880161e+00 [52,] -1.141396e+01 -3.120907e+00 [53,] 7.778502e+00 -1.141396e+01 [54,] -1.045258e+00 7.778502e+00 [55,] -6.189238e-01 -1.045258e+00 [56,] -3.716707e+00 -6.189238e-01 [57,] 5.316110e-01 -3.716707e+00 [58,] 5.678469e+00 5.316110e-01 [59,] 6.900682e+00 5.678469e+00 [60,] -8.881784e-16 6.900682e+00 [61,] 3.442571e+00 -8.881784e-16 [62,] -1.333362e+01 3.442571e+00 [63,] 1.094417e+00 -1.333362e+01 [64,] 5.122254e+00 1.094417e+00 [65,] -3.840073e+00 5.122254e+00 [66,] 5.872996e+00 -3.840073e+00 [67,] 1.522832e+01 5.872996e+00 [68,] -4.662937e-15 1.522832e+01 [69,] 2.383408e+00 -4.662937e-15 [70,] 8.560819e+00 2.383408e+00 [71,] -1.552687e+01 8.560819e+00 [72,] 1.641622e+01 -1.552687e+01 [73,] -3.971787e-01 1.641622e+01 [74,] -4.515235e-01 -3.971787e-01 [75,] 4.197829e+00 -4.515235e-01 [76,] 8.616340e+00 4.197829e+00 [77,] 1.601883e+01 8.616340e+00 [78,] 7.924010e+00 1.601883e+01 [79,] 2.957056e+00 7.924010e+00 [80,] -1.565332e+00 2.957056e+00 [81,] -1.084936e+01 -1.565332e+00 [82,] -4.628738e+00 -1.084936e+01 [83,] -8.109549e+00 -4.628738e+00 [84,] -4.593127e+00 -8.109549e+00 [85,] 1.291818e+01 -4.593127e+00 [86,] 3.461200e+00 1.291818e+01 [87,] 9.927926e+00 3.461200e+00 [88,] -1.161256e+01 9.927926e+00 [89,] -1.554312e-15 -1.161256e+01 [90,] 2.399872e-01 -1.554312e-15 [91,] -1.504005e+01 2.399872e-01 [92,] -6.371332e+00 -1.504005e+01 [93,] 4.175192e+00 -6.371332e+00 [94,] -1.377265e+01 4.175192e+00 [95,] 5.502278e+00 -1.377265e+01 [96,] -1.341190e+01 5.502278e+00 [97,] 2.764097e+00 -1.341190e+01 [98,] -3.786665e+00 2.764097e+00 [99,] -6.783951e+00 -3.786665e+00 [100,] 5.378188e+00 -6.783951e+00 [101,] -5.986157e+00 5.378188e+00 [102,] 2.034699e+00 -5.986157e+00 [103,] 9.410693e+00 2.034699e+00 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.346342e+01 9.985498e+00 2 2.907736e+00 -1.346342e+01 3 6.445165e+00 2.907736e+00 4 3.706427e+00 6.445165e+00 5 2.912495e+00 3.706427e+00 6 -5.128146e+00 2.912495e+00 7 -9.881951e+00 -5.128146e+00 8 7.071597e+00 -9.881951e+00 9 5.680543e+00 7.071597e+00 10 1.118296e+01 5.680543e+00 11 1.055796e+01 1.118296e+01 12 5.758843e+00 1.055796e+01 13 -2.052898e+01 5.758843e+00 14 6.380024e-01 -2.052898e+01 15 -8.004783e+00 6.380024e-01 16 -1.788418e+00 -8.004783e+00 17 5.489451e+00 -1.788418e+00 18 1.182068e-01 5.489451e+00 19 -1.528542e+01 1.182068e-01 20 -8.863588e+00 -1.528542e+01 21 6.808623e+00 -8.863588e+00 22 -1.170967e+01 6.808623e+00 23 9.503589e+00 -1.170967e+01 24 -5.860823e+00 9.503589e+00 25 -1.786384e+00 -5.860823e+00 26 1.266746e+01 -1.786384e+00 27 -1.869459e+00 1.266746e+01 28 7.988785e-01 -1.869459e+00 29 -1.202848e+01 7.988785e-01 30 -6.614979e+00 -1.202848e+01 31 -3.015832e+00 -6.614979e+00 32 -4.206775e+00 -3.015832e+00 33 -8.609006e+00 -4.206775e+00 34 -3.230354e+00 -8.609006e+00 35 1.067834e+01 -3.230354e+00 36 -2.698804e+00 1.067834e+01 37 3.253107e+00 -2.698804e+00 38 5.777566e+00 3.253107e+00 39 -1.886238e+00 5.777566e+00 40 1.192852e+00 -1.886238e+00 41 -1.034457e+01 1.192852e+00 42 -3.401516e+00 -1.034457e+01 43 1.624612e+01 -3.401516e+00 44 1.765214e+01 1.624612e+01 45 -1.210075e-01 1.765214e+01 46 7.919176e+00 -1.210075e-01 47 -1.950642e+01 7.919176e+00 48 -5.595914e+00 -1.950642e+01 49 1.379800e+01 -5.595914e+00 50 -7.880161e+00 1.379800e+01 51 -3.120907e+00 -7.880161e+00 52 -1.141396e+01 -3.120907e+00 53 7.778502e+00 -1.141396e+01 54 -1.045258e+00 7.778502e+00 55 -6.189238e-01 -1.045258e+00 56 -3.716707e+00 -6.189238e-01 57 5.316110e-01 -3.716707e+00 58 5.678469e+00 5.316110e-01 59 6.900682e+00 5.678469e+00 60 -8.881784e-16 6.900682e+00 61 3.442571e+00 -8.881784e-16 62 -1.333362e+01 3.442571e+00 63 1.094417e+00 -1.333362e+01 64 5.122254e+00 1.094417e+00 65 -3.840073e+00 5.122254e+00 66 5.872996e+00 -3.840073e+00 67 1.522832e+01 5.872996e+00 68 -4.662937e-15 1.522832e+01 69 2.383408e+00 -4.662937e-15 70 8.560819e+00 2.383408e+00 71 -1.552687e+01 8.560819e+00 72 1.641622e+01 -1.552687e+01 73 -3.971787e-01 1.641622e+01 74 -4.515235e-01 -3.971787e-01 75 4.197829e+00 -4.515235e-01 76 8.616340e+00 4.197829e+00 77 1.601883e+01 8.616340e+00 78 7.924010e+00 1.601883e+01 79 2.957056e+00 7.924010e+00 80 -1.565332e+00 2.957056e+00 81 -1.084936e+01 -1.565332e+00 82 -4.628738e+00 -1.084936e+01 83 -8.109549e+00 -4.628738e+00 84 -4.593127e+00 -8.109549e+00 85 1.291818e+01 -4.593127e+00 86 3.461200e+00 1.291818e+01 87 9.927926e+00 3.461200e+00 88 -1.161256e+01 9.927926e+00 89 -1.554312e-15 -1.161256e+01 90 2.399872e-01 -1.554312e-15 91 -1.504005e+01 2.399872e-01 92 -6.371332e+00 -1.504005e+01 93 4.175192e+00 -6.371332e+00 94 -1.377265e+01 4.175192e+00 95 5.502278e+00 -1.377265e+01 96 -1.341190e+01 5.502278e+00 97 2.764097e+00 -1.341190e+01 98 -3.786665e+00 2.764097e+00 99 -6.783951e+00 -3.786665e+00 100 5.378188e+00 -6.783951e+00 101 -5.986157e+00 5.378188e+00 102 2.034699e+00 -5.986157e+00 103 9.410693e+00 2.034699e+00 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/76w4g1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8pwlf1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9lwb61258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') Warning messages: 1: Not plotting observations with leverage one: 61, 69, 90 2: Not plotting observations with leverage one: 61, 69, 90 > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10xozo1258619210.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #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, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/118j6s1258619210.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/1209v01258619210.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/134ap61258619210.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/148dof1258619210.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15e90v1258619210.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16z3qn1258619210.tab") + } > system("convert tmp/12u5z1258619210.ps tmp/12u5z1258619210.png") > system("convert tmp/2xfrs1258619210.ps tmp/2xfrs1258619210.png") > system("convert tmp/31k6o1258619210.ps tmp/31k6o1258619210.png") > system("convert tmp/4pjgk1258619210.ps tmp/4pjgk1258619210.png") > system("convert tmp/50zdi1258619210.ps tmp/50zdi1258619210.png") > system("convert tmp/6oo6a1258619210.ps tmp/6oo6a1258619210.png") > system("convert tmp/76w4g1258619210.ps tmp/76w4g1258619210.png") > system("convert tmp/8pwlf1258619210.ps tmp/8pwlf1258619210.png") > system("convert tmp/9lwb61258619210.ps tmp/9lwb61258619210.png") > system("convert tmp/10xozo1258619210.ps tmp/10xozo1258619210.png") > > > proc.time() user system elapsed 3.251 1.740 44.097