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(102.1880309 + ,0 + ,114.0150276 + ,108.1560276 + ,100 + ,0 + ,0 + ,0 + ,110.3672031 + ,0 + ,102.1880309 + ,114.0150276 + ,108.1560276 + ,0 + ,0 + ,0 + ,96.8602511 + ,0 + ,110.3672031 + ,102.1880309 + ,114.0150276 + ,0 + ,0 + ,0 + ,94.1944583 + ,0 + ,96.8602511 + ,110.3672031 + ,102.1880309 + ,0 + ,0 + ,0 + ,99.51621961 + ,0 + ,94.1944583 + ,96.8602511 + ,110.3672031 + ,0 + ,0 + ,0 + ,94.06333487 + ,0 + ,99.51621961 + ,94.1944583 + ,96.8602511 + ,0 + ,0 + ,0 + ,97.5541476 + ,0 + ,94.06333487 + ,99.51621961 + ,94.1944583 + ,0 + ,0 + ,0 + ,78.15062422 + ,0 + ,97.5541476 + ,94.06333487 + ,99.51621961 + ,0 + ,0 + ,0 + ,81.2434643 + ,0 + ,78.15062422 + ,97.5541476 + ,94.06333487 + ,0 + ,0 + ,0 + ,92.36262465 + ,0 + ,81.2434643 + ,78.15062422 + ,97.5541476 + ,0 + ,0 + ,0 + ,96.06324371 + ,0 + ,92.36262465 + ,81.2434643 + ,78.15062422 + ,0 + ,0 + ,0 + ,114.0523777 + ,0 + ,96.06324371 + ,92.36262465 + ,81.2434643 + ,0 + ,0 + ,0 + ,110.6616666 + ,0 + ,114.0523777 + ,96.06324371 + ,92.36262465 + ,0 + ,0 + ,0 + ,104.9171949 + ,0 + ,110.6616666 + ,114.0523777 + ,96.06324371 + ,0 + ,0 + ,0 + ,90.00187193 + ,0 + ,104.9171949 + ,110.6616666 + ,114.0523777 + ,0 + ,0 + ,0 + ,95.7008067 + ,0 + ,90.00187193 + ,104.9171949 + ,110.6616666 + ,0 + ,0 + ,0 + ,86.02741157 + ,0 + ,95.7008067 + ,90.00187193 + ,104.9171949 + ,0 + ,0 + ,0 + ,84.85287668 + ,0 + ,86.02741157 + ,95.7008067 + ,90.00187193 + ,0 + ,0 + ,0 + ,100.04328 + ,0 + ,84.85287668 + ,86.02741157 + ,95.7008067 + ,0 + ,0 + ,0 + ,80.91713823 + ,0 + ,100.04328 + ,84.85287668 + ,86.02741157 + ,0 + ,0 + ,0 + ,74.06539709 + ,0 + ,80.91713823 + ,100.04328 + ,84.85287668 + ,0 + ,0 + ,0 + ,77.30281369 + ,0 + ,74.06539709 + ,80.91713823 + ,100.04328 + ,0 + ,0 + ,0 + ,97.23043249 + ,0 + ,77.30281369 + ,74.06539709 + ,80.91713823 + ,0 + ,0 + ,0 + ,90.75515676 + ,0 + ,97.23043249 + ,77.30281369 + ,74.06539709 + ,0 + ,0 + ,0 + ,100.5614455 + ,0 + ,90.75515676 + ,97.23043249 + ,77.30281369 + ,0 + ,0 + ,0 + ,92.01293267 + ,0 + ,100.5614455 + ,90.75515676 + ,97.23043249 + ,0 + ,0 + ,0 + ,99.24012138 + ,0 + ,92.01293267 + ,100.5614455 + ,90.75515676 + ,0 + ,0 + ,0 + ,105.8672755 + ,0 + ,99.24012138 + ,92.01293267 + ,100.5614455 + ,0 + ,0 + ,0 + ,90.9920463 + ,0 + ,105.8672755 + ,99.24012138 + ,92.01293267 + ,0 + ,0 + ,0 + ,93.30624423 + ,0 + ,90.9920463 + ,105.8672755 + ,99.24012138 + ,0 + ,0 + ,0 + ,91.17419413 + ,0 + ,93.30624423 + ,90.9920463 + ,105.8672755 + ,0 + ,0 + ,0 + ,77.33295039 + ,0 + ,91.17419413 + ,93.30624423 + ,90.9920463 + ,0 + ,0 + ,0 + ,91.1277721 + ,0 + ,77.33295039 + ,91.17419413 + ,93.30624423 + ,0 + ,0 + ,0 + ,85.01249943 + ,0 + ,91.1277721 + ,77.33295039 + ,91.17419413 + ,0 + ,0 + ,0 + ,83.90390242 + ,0 + ,85.01249943 + ,91.1277721 + ,77.33295039 + ,0 + ,0 + ,0 + ,104.8626302 + ,0 + ,83.90390242 + ,85.01249943 + ,91.1277721 + ,0 + ,0 + ,0 + ,110.9039108 + ,0 + ,104.8626302 + ,83.90390242 + ,85.01249943 + ,0 + ,0 + ,0 + ,95.43714373 + ,0 + ,110.9039108 + ,104.8626302 + ,83.90390242 + ,0 + ,0 + ,0 + ,111.6238727 + ,0 + ,95.43714373 + ,110.9039108 + ,104.8626302 + ,0 + ,0 + ,0 + ,108.8925403 + ,0 + ,111.6238727 + ,95.43714373 + ,110.9039108 + ,0 + ,0 + ,0 + ,96.17511682 + ,0 + ,108.8925403 + ,111.6238727 + ,95.43714373 + ,0 + ,0 + ,0 + ,101.9740205 + ,0 + ,96.17511682 + ,108.8925403 + ,111.6238727 + ,0 + ,0 + ,0 + ,99.11953031 + ,0 + ,101.9740205 + ,96.17511682 + ,108.8925403 + ,0 + ,0 + ,0 + ,86.78158147 + ,0 + ,99.11953031 + ,101.9740205 + ,96.17511682 + ,0 + ,0 + ,0 + ,118.4195003 + ,0 + ,86.78158147 + ,99.11953031 + ,101.9740205 + ,0 + ,0 + ,0 + ,118.7441447 + ,0 + ,118.4195003 + ,86.78158147 + ,99.11953031 + ,0 + ,0 + ,0 + ,106.5296192 + ,0 + ,118.7441447 + ,118.4195003 + ,86.78158147 + ,0 + ,0 + ,0 + ,134.7772694 + ,0 + ,106.5296192 + ,118.7441447 + ,118.4195003 + ,0 + ,0 + ,0 + ,104.6778714 + ,0 + ,134.7772694 + ,106.5296192 + ,118.7441447 + ,0 + ,0 + ,0 + ,105.2954304 + ,0 + ,104.6778714 + ,134.7772694 + ,106.5296192 + ,0 + ,0 + ,0 + ,139.4139849 + ,0 + ,105.2954304 + ,104.6778714 + ,134.7772694 + ,0 + ,0 + ,0 + ,103.6060491 + ,0 + ,139.4139849 + ,105.2954304 + ,104.6778714 + ,0 + ,0 + ,0 + ,99.78182974 + ,0 + ,103.6060491 + ,139.4139849 + ,105.2954304 + ,0 + ,0 + ,0 + ,103.4610301 + ,0 + ,99.78182974 + ,103.6060491 + ,139.4139849 + ,0 + ,0 + ,0 + ,120.0594945 + ,0 + ,103.4610301 + ,99.78182974 + ,103.6060491 + ,0 + ,0 + ,0 + ,96.71377168 + ,0 + ,120.0594945 + ,103.4610301 + ,99.78182974 + ,0 + ,0 + ,0 + ,107.1308929 + ,0 + ,96.71377168 + ,120.0594945 + ,103.4610301 + ,0 + ,0 + ,0 + ,105.3608372 + ,0 + ,107.1308929 + ,96.71377168 + ,120.0594945 + ,0 + ,0 + ,0 + ,111.6942359 + ,0 + ,105.3608372 + ,107.1308929 + ,96.71377168 + ,0 + ,0 + ,0 + ,132.0519998 + ,0 + ,111.6942359 + ,105.3608372 + ,107.1308929 + ,0 + ,0 + ,0 + ,126.8037879 + ,0 + ,132.0519998 + ,111.6942359 + ,105.3608372 + ,0 + ,0 + ,0 + ,154.4824253 + ,0 + ,126.8037879 + ,132.0519998 + ,111.6942359 + ,1 + ,0 + ,0 + ,141.5570984 + ,0 + ,154.4824253 + ,126.8037879 + ,132.0519998 + ,0 + ,0 + ,0 + ,109.9506882 + ,0 + ,141.5570984 + ,154.4824253 + ,126.8037879 + ,0 + ,0 + ,0 + ,127.904198 + ,0 + ,109.9506882 + ,141.5570984 + ,154.4824253 + ,0 + ,0 + ,0 + ,133.0888617 + ,0 + ,127.904198 + ,109.9506882 + ,141.5570984 + ,0 + ,0 + ,0 + ,120.0796299 + ,0 + ,133.0888617 + ,127.904198 + ,109.9506882 + ,0 + ,0 + ,0 + ,117.5557142 + ,0 + ,120.0796299 + ,133.0888617 + ,127.904198 + ,0 + ,0 + ,0 + ,143.0362309 + ,0 + ,117.5557142 + ,120.0796299 + ,133.0888617 + ,0 + ,0 + ,0 + ,159.982927 + ,1 + ,143.0362309 + ,117.5557142 + ,120.0796299 + ,0 + ,1 + ,0 + ,128.5991124 + ,1 + ,159.982927 + ,143.0362309 + ,117.5557142 + ,0 + ,0 + ,0 + ,149.7373327 + ,1 + ,128.5991124 + ,159.982927 + ,143.0362309 + ,0 + ,0 + ,0 + ,126.8169313 + ,1 + ,149.7373327 + ,128.5991124 + ,159.982927 + ,0 + ,0 + ,0 + ,140.9639674 + ,1 + ,126.8169313 + ,149.7373327 + ,128.5991124 + ,0 + ,0 + ,0 + ,137.6691981 + ,1 + ,140.9639674 + ,126.8169313 + ,149.7373327 + ,0 + ,0 + ,0 + ,117.9402337 + ,1 + ,137.6691981 + ,140.9639674 + ,126.8169313 + ,0 + ,0 + ,0 + ,122.3095247 + ,1 + ,117.9402337 + ,137.6691981 + ,140.9639674 + ,0 + ,0 + ,0 + ,127.7804207 + ,1 + ,122.3095247 + ,117.9402337 + ,137.6691981 + ,0 + ,0 + ,0 + ,136.1677176 + ,1 + ,127.7804207 + ,122.3095247 + ,117.9402337 + ,0 + ,0 + ,0 + ,116.2405856 + ,1 + ,136.1677176 + ,127.7804207 + ,122.3095247 + ,0 + ,0 + ,0 + ,123.1576893 + ,1 + ,116.2405856 + ,136.1677176 + ,127.7804207 + ,0 + ,0 + ,0 + ,116.3400234 + ,1 + ,123.1576893 + ,116.2405856 + ,136.1677176 + ,0 + ,0 + ,0 + ,108.6119282 + ,1 + ,116.3400234 + ,123.1576893 + ,116.2405856 + ,0 + ,0 + ,0 + ,125.8982264 + ,1 + ,108.6119282 + ,116.3400234 + ,123.1576893 + ,0 + ,0 + ,0 + ,112.8003105 + ,1 + ,125.8982264 + ,108.6119282 + ,116.3400234 + ,0 + ,0 + ,0 + ,107.5182447 + ,1 + ,112.8003105 + ,125.8982264 + ,108.6119282 + ,0 + ,0 + ,0 + ,135.0955413 + ,1 + ,107.5182447 + ,112.8003105 + ,125.8982264 + ,0 + ,0 + ,0 + ,115.5096488 + ,1 + ,135.0955413 + ,107.5182447 + ,112.8003105 + ,0 + ,0 + ,0 + ,115.8640759 + ,1 + ,115.5096488 + ,135.0955413 + ,107.5182447 + ,0 + ,0 + ,0 + ,104.5883906 + ,1 + ,115.8640759 + ,115.5096488 + ,135.0955413 + ,0 + ,0 + ,0 + ,163.7213386 + ,1 + ,104.5883906 + ,115.8640759 + ,115.5096488 + ,0 + ,0 + ,1 + ,113.4482275 + ,1 + ,163.7213386 + ,104.5883906 + ,115.8640759 + ,0 + ,0 + ,0 + ,98.0428844 + ,1 + ,113.4482275 + ,163.7213386 + ,104.5883906 + ,0 + ,0 + ,0 + ,116.7868521 + ,1 + ,98.0428844 + ,113.4482275 + ,163.7213386 + ,0 + ,0 + ,0 + ,126.5330444 + ,1 + ,116.7868521 + ,98.0428844 + ,113.4482275 + ,0 + ,0 + ,0 + ,113.0336597 + ,1 + ,126.5330444 + ,116.7868521 + ,98.0428844 + ,0 + ,0 + ,0 + ,124.3392163 + ,1 + ,113.0336597 + ,126.5330444 + ,116.7868521 + ,0 + ,0 + ,0 + ,109.8298759 + ,1 + ,124.3392163 + ,113.0336597 + ,126.5330444 + ,0 + ,0 + ,0 + ,124.4434777 + ,1 + ,109.8298759 + ,124.3392163 + ,113.0336597 + ,0 + ,0 + ,0 + ,111.5039454 + ,1 + ,124.4434777 + ,109.8298759 + ,124.3392163 + ,0 + ,0 + ,0 + ,102.0350019 + ,1 + ,111.5039454 + ,124.4434777 + ,109.8298759 + ,0 + ,0 + ,0 + ,116.8726598 + ,1 + ,102.0350019 + ,111.5039454 + ,124.4434777 + ,0 + ,0 + ,0 + ,112.2073122 + ,1 + ,116.8726598 + ,102.0350019 + ,111.5039454 + ,0 + ,0 + ,0 + ,101.1513902 + ,1 + ,112.2073122 + ,116.8726598 + ,102.0350019 + ,0 + ,0 + ,0 + ,124.4255108 + ,1 + ,101.1513902 + ,112.2073122 + ,116.8726598 + ,0 + ,0 + ,0) + ,dim=c(8 + ,105) + ,dimnames=list(c('Y' + ,'X' + ,'Y1' + ,'Y2' + ,'Y3' + ,'O1' + ,'O2' + ,'O3') + ,1:105)) > y <- array(NA,dim=c(8,105),dimnames=list(c('Y','X','Y1','Y2','Y3','O1','O2','O3'),1:105)) > 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 O1 O2 O3 M1 M2 M3 M4 M5 M6 M7 M8 1 102.18803 0 114.01503 108.15603 100.00000 0 0 0 1 0 0 0 0 0 0 0 2 110.36720 0 102.18803 114.01503 108.15603 0 0 0 0 1 0 0 0 0 0 0 3 96.86025 0 110.36720 102.18803 114.01503 0 0 0 0 0 1 0 0 0 0 0 4 94.19446 0 96.86025 110.36720 102.18803 0 0 0 0 0 0 1 0 0 0 0 5 99.51622 0 94.19446 96.86025 110.36720 0 0 0 0 0 0 0 1 0 0 0 6 94.06333 0 99.51622 94.19446 96.86025 0 0 0 0 0 0 0 0 1 0 0 7 97.55415 0 94.06333 99.51622 94.19446 0 0 0 0 0 0 0 0 0 1 0 8 78.15062 0 97.55415 94.06333 99.51622 0 0 0 0 0 0 0 0 0 0 1 9 81.24346 0 78.15062 97.55415 94.06333 0 0 0 0 0 0 0 0 0 0 0 10 92.36262 0 81.24346 78.15062 97.55415 0 0 0 0 0 0 0 0 0 0 0 11 96.06324 0 92.36262 81.24346 78.15062 0 0 0 0 0 0 0 0 0 0 0 12 114.05238 0 96.06324 92.36262 81.24346 0 0 0 0 0 0 0 0 0 0 0 13 110.66167 0 114.05238 96.06324 92.36262 0 0 0 1 0 0 0 0 0 0 0 14 104.91719 0 110.66167 114.05238 96.06324 0 0 0 0 1 0 0 0 0 0 0 15 90.00187 0 104.91719 110.66167 114.05238 0 0 0 0 0 1 0 0 0 0 0 16 95.70081 0 90.00187 104.91719 110.66167 0 0 0 0 0 0 1 0 0 0 0 17 86.02741 0 95.70081 90.00187 104.91719 0 0 0 0 0 0 0 1 0 0 0 18 84.85288 0 86.02741 95.70081 90.00187 0 0 0 0 0 0 0 0 1 0 0 19 100.04328 0 84.85288 86.02741 95.70081 0 0 0 0 0 0 0 0 0 1 0 20 80.91714 0 100.04328 84.85288 86.02741 0 0 0 0 0 0 0 0 0 0 1 21 74.06540 0 80.91714 100.04328 84.85288 0 0 0 0 0 0 0 0 0 0 0 22 77.30281 0 74.06540 80.91714 100.04328 0 0 0 0 0 0 0 0 0 0 0 23 97.23043 0 77.30281 74.06540 80.91714 0 0 0 0 0 0 0 0 0 0 0 24 90.75516 0 97.23043 77.30281 74.06540 0 0 0 0 0 0 0 0 0 0 0 25 100.56145 0 90.75516 97.23043 77.30281 0 0 0 1 0 0 0 0 0 0 0 26 92.01293 0 100.56145 90.75516 97.23043 0 0 0 0 1 0 0 0 0 0 0 27 99.24012 0 92.01293 100.56145 90.75516 0 0 0 0 0 1 0 0 0 0 0 28 105.86728 0 99.24012 92.01293 100.56145 0 0 0 0 0 0 1 0 0 0 0 29 90.99205 0 105.86728 99.24012 92.01293 0 0 0 0 0 0 0 1 0 0 0 30 93.30624 0 90.99205 105.86728 99.24012 0 0 0 0 0 0 0 0 1 0 0 31 91.17419 0 93.30624 90.99205 105.86728 0 0 0 0 0 0 0 0 0 1 0 32 77.33295 0 91.17419 93.30624 90.99205 0 0 0 0 0 0 0 0 0 0 1 33 91.12777 0 77.33295 91.17419 93.30624 0 0 0 0 0 0 0 0 0 0 0 34 85.01250 0 91.12777 77.33295 91.17419 0 0 0 0 0 0 0 0 0 0 0 35 83.90390 0 85.01250 91.12777 77.33295 0 0 0 0 0 0 0 0 0 0 0 36 104.86263 0 83.90390 85.01250 91.12777 0 0 0 0 0 0 0 0 0 0 0 37 110.90391 0 104.86263 83.90390 85.01250 0 0 0 1 0 0 0 0 0 0 0 38 95.43714 0 110.90391 104.86263 83.90390 0 0 0 0 1 0 0 0 0 0 0 39 111.62387 0 95.43714 110.90391 104.86263 0 0 0 0 0 1 0 0 0 0 0 40 108.89254 0 111.62387 95.43714 110.90391 0 0 0 0 0 0 1 0 0 0 0 41 96.17512 0 108.89254 111.62387 95.43714 0 0 0 0 0 0 0 1 0 0 0 42 101.97402 0 96.17512 108.89254 111.62387 0 0 0 0 0 0 0 0 1 0 0 43 99.11953 0 101.97402 96.17512 108.89254 0 0 0 0 0 0 0 0 0 1 0 44 86.78158 0 99.11953 101.97402 96.17512 0 0 0 0 0 0 0 0 0 0 1 45 118.41950 0 86.78158 99.11953 101.97402 0 0 0 0 0 0 0 0 0 0 0 46 118.74414 0 118.41950 86.78158 99.11953 0 0 0 0 0 0 0 0 0 0 0 47 106.52962 0 118.74414 118.41950 86.78158 0 0 0 0 0 0 0 0 0 0 0 48 134.77727 0 106.52962 118.74414 118.41950 0 0 0 0 0 0 0 0 0 0 0 49 104.67787 0 134.77727 106.52962 118.74414 0 0 0 1 0 0 0 0 0 0 0 50 105.29543 0 104.67787 134.77727 106.52962 0 0 0 0 1 0 0 0 0 0 0 51 139.41398 0 105.29543 104.67787 134.77727 0 0 0 0 0 1 0 0 0 0 0 52 103.60605 0 139.41398 105.29543 104.67787 0 0 0 0 0 0 1 0 0 0 0 53 99.78183 0 103.60605 139.41398 105.29543 0 0 0 0 0 0 0 1 0 0 0 54 103.46103 0 99.78183 103.60605 139.41398 0 0 0 0 0 0 0 0 1 0 0 55 120.05949 0 103.46103 99.78183 103.60605 0 0 0 0 0 0 0 0 0 1 0 56 96.71377 0 120.05949 103.46103 99.78183 0 0 0 0 0 0 0 0 0 0 1 57 107.13089 0 96.71377 120.05949 103.46103 0 0 0 0 0 0 0 0 0 0 0 58 105.36084 0 107.13089 96.71377 120.05949 0 0 0 0 0 0 0 0 0 0 0 59 111.69424 0 105.36084 107.13089 96.71377 0 0 0 0 0 0 0 0 0 0 0 60 132.05200 0 111.69424 105.36084 107.13089 0 0 0 0 0 0 0 0 0 0 0 61 126.80379 0 132.05200 111.69424 105.36084 0 0 0 1 0 0 0 0 0 0 0 62 154.48243 0 126.80379 132.05200 111.69424 1 0 0 0 1 0 0 0 0 0 0 63 141.55710 0 154.48243 126.80379 132.05200 0 0 0 0 0 1 0 0 0 0 0 64 109.95069 0 141.55710 154.48243 126.80379 0 0 0 0 0 0 1 0 0 0 0 65 127.90420 0 109.95069 141.55710 154.48243 0 0 0 0 0 0 0 1 0 0 0 66 133.08886 0 127.90420 109.95069 141.55710 0 0 0 0 0 0 0 0 1 0 0 67 120.07963 0 133.08886 127.90420 109.95069 0 0 0 0 0 0 0 0 0 1 0 68 117.55571 0 120.07963 133.08886 127.90420 0 0 0 0 0 0 0 0 0 0 1 69 143.03623 0 117.55571 120.07963 133.08886 0 0 0 0 0 0 0 0 0 0 0 70 159.98293 1 143.03623 117.55571 120.07963 0 1 0 0 0 0 0 0 0 0 0 71 128.59911 1 159.98293 143.03623 117.55571 0 0 0 0 0 0 0 0 0 0 0 72 149.73733 1 128.59911 159.98293 143.03623 0 0 0 0 0 0 0 0 0 0 0 73 126.81693 1 149.73733 128.59911 159.98293 0 0 0 1 0 0 0 0 0 0 0 74 140.96397 1 126.81693 149.73733 128.59911 0 0 0 0 1 0 0 0 0 0 0 75 137.66920 1 140.96397 126.81693 149.73733 0 0 0 0 0 1 0 0 0 0 0 76 117.94023 1 137.66920 140.96397 126.81693 0 0 0 0 0 0 1 0 0 0 0 77 122.30952 1 117.94023 137.66920 140.96397 0 0 0 0 0 0 0 1 0 0 0 78 127.78042 1 122.30952 117.94023 137.66920 0 0 0 0 0 0 0 0 1 0 0 79 136.16772 1 127.78042 122.30952 117.94023 0 0 0 0 0 0 0 0 0 1 0 80 116.24059 1 136.16772 127.78042 122.30952 0 0 0 0 0 0 0 0 0 0 1 81 123.15769 1 116.24059 136.16772 127.78042 0 0 0 0 0 0 0 0 0 0 0 82 116.34002 1 123.15769 116.24059 136.16772 0 0 0 0 0 0 0 0 0 0 0 83 108.61193 1 116.34002 123.15769 116.24059 0 0 0 0 0 0 0 0 0 0 0 84 125.89823 1 108.61193 116.34002 123.15769 0 0 0 0 0 0 0 0 0 0 0 85 112.80031 1 125.89823 108.61193 116.34002 0 0 0 1 0 0 0 0 0 0 0 86 107.51824 1 112.80031 125.89823 108.61193 0 0 0 0 1 0 0 0 0 0 0 87 135.09554 1 107.51824 112.80031 125.89823 0 0 0 0 0 1 0 0 0 0 0 88 115.50965 1 135.09554 107.51824 112.80031 0 0 0 0 0 0 1 0 0 0 0 89 115.86408 1 115.50965 135.09554 107.51824 0 0 0 0 0 0 0 1 0 0 0 90 104.58839 1 115.86408 115.50965 135.09554 0 0 0 0 0 0 0 0 1 0 0 91 163.72134 1 104.58839 115.86408 115.50965 0 0 1 0 0 0 0 0 0 1 0 92 113.44823 1 163.72134 104.58839 115.86408 0 0 0 0 0 0 0 0 0 0 1 93 98.04288 1 113.44823 163.72134 104.58839 0 0 0 0 0 0 0 0 0 0 0 94 116.78685 1 98.04288 113.44823 163.72134 0 0 0 0 0 0 0 0 0 0 0 95 126.53304 1 116.78685 98.04288 113.44823 0 0 0 0 0 0 0 0 0 0 0 96 113.03366 1 126.53304 116.78685 98.04288 0 0 0 0 0 0 0 0 0 0 0 97 124.33922 1 113.03366 126.53304 116.78685 0 0 0 1 0 0 0 0 0 0 0 98 109.82988 1 124.33922 113.03366 126.53304 0 0 0 0 1 0 0 0 0 0 0 99 124.44348 1 109.82988 124.33922 113.03366 0 0 0 0 0 1 0 0 0 0 0 100 111.50395 1 124.44348 109.82988 124.33922 0 0 0 0 0 0 1 0 0 0 0 101 102.03500 1 111.50395 124.44348 109.82988 0 0 0 0 0 0 0 1 0 0 0 102 116.87266 1 102.03500 111.50395 124.44348 0 0 0 0 0 0 0 0 1 0 0 103 112.20731 1 116.87266 102.03500 111.50395 0 0 0 0 0 0 0 0 0 1 0 104 101.15139 1 112.20731 116.87266 102.03500 0 0 0 0 0 0 0 0 0 0 1 105 124.42551 1 101.15139 112.20731 116.87266 0 0 0 0 0 0 0 0 0 0 0 M9 M10 M11 t 1 0 0 0 1 2 0 0 0 2 3 0 0 0 3 4 0 0 0 4 5 0 0 0 5 6 0 0 0 6 7 0 0 0 7 8 0 0 0 8 9 1 0 0 9 10 0 1 0 10 11 0 0 1 11 12 0 0 0 12 13 0 0 0 13 14 0 0 0 14 15 0 0 0 15 16 0 0 0 16 17 0 0 0 17 18 0 0 0 18 19 0 0 0 19 20 0 0 0 20 21 1 0 0 21 22 0 1 0 22 23 0 0 1 23 24 0 0 0 24 25 0 0 0 25 26 0 0 0 26 27 0 0 0 27 28 0 0 0 28 29 0 0 0 29 30 0 0 0 30 31 0 0 0 31 32 0 0 0 32 33 1 0 0 33 34 0 1 0 34 35 0 0 1 35 36 0 0 0 36 37 0 0 0 37 38 0 0 0 38 39 0 0 0 39 40 0 0 0 40 41 0 0 0 41 42 0 0 0 42 43 0 0 0 43 44 0 0 0 44 45 1 0 0 45 46 0 1 0 46 47 0 0 1 47 48 0 0 0 48 49 0 0 0 49 50 0 0 0 50 51 0 0 0 51 52 0 0 0 52 53 0 0 0 53 54 0 0 0 54 55 0 0 0 55 56 0 0 0 56 57 1 0 0 57 58 0 1 0 58 59 0 0 1 59 60 0 0 0 60 61 0 0 0 61 62 0 0 0 62 63 0 0 0 63 64 0 0 0 64 65 0 0 0 65 66 0 0 0 66 67 0 0 0 67 68 0 0 0 68 69 1 0 0 69 70 0 1 0 70 71 0 0 1 71 72 0 0 0 72 73 0 0 0 73 74 0 0 0 74 75 0 0 0 75 76 0 0 0 76 77 0 0 0 77 78 0 0 0 78 79 0 0 0 79 80 0 0 0 80 81 1 0 0 81 82 0 1 0 82 83 0 0 1 83 84 0 0 0 84 85 0 0 0 85 86 0 0 0 86 87 0 0 0 87 88 0 0 0 88 89 0 0 0 89 90 0 0 0 90 91 0 0 0 91 92 0 0 0 92 93 1 0 0 93 94 0 1 0 94 95 0 0 1 95 96 0 0 0 96 97 0 0 0 97 98 0 0 0 98 99 0 0 0 99 100 0 0 0 100 101 0 0 0 101 102 0 0 0 102 103 0 0 0 103 104 0 0 0 104 105 1 0 0 105 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X Y1 Y2 Y3 O1 42.67722 -7.03033 0.23895 0.02734 0.40219 35.16391 O2 O3 M1 M2 M3 M4 46.45027 48.36851 -11.05493 -13.58439 -8.58776 -20.10798 M5 M6 M7 M8 M9 M10 -20.02035 -19.57053 -11.63219 -26.71281 -13.18199 -20.66496 M11 t -9.85179 0.18375 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -2.081e+01 -5.191e+00 5.224e-15 5.692e+00 1.919e+01 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 42.67722 8.79758 4.851 5.50e-06 *** X -7.03033 3.55240 -1.979 0.051049 . Y1 0.23895 0.08279 2.886 0.004940 ** Y2 0.02734 0.08313 0.329 0.743066 Y3 0.40219 0.08073 4.982 3.27e-06 *** O1 35.16391 10.17787 3.455 0.000861 *** O2 46.45027 10.60648 4.379 3.37e-05 *** O3 48.36851 10.12967 4.775 7.42e-06 *** M1 -11.05493 4.69985 -2.352 0.020975 * M2 -13.58439 4.75853 -2.855 0.005410 ** M3 -8.58776 4.70125 -1.827 0.071256 . M4 -20.10798 4.66217 -4.313 4.32e-05 *** M5 -20.02035 4.65453 -4.301 4.51e-05 *** M6 -19.57053 4.75111 -4.119 8.79e-05 *** M7 -11.63219 4.72272 -2.463 0.015794 * M8 -26.71281 4.61759 -5.785 1.18e-07 *** M9 -13.18199 4.73033 -2.787 0.006566 ** M10 -20.66496 5.19847 -3.975 0.000147 *** M11 -9.85179 4.74002 -2.078 0.040686 * t 0.18375 0.06167 2.980 0.003763 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.369 on 85 degrees of freedom Multiple R-squared: 0.7903, Adjusted R-squared: 0.7434 F-statistic: 16.86 on 19 and 85 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.3529103 0.7058207 0.6470897 [2,] 0.6861454 0.6277093 0.3138546 [3,] 0.5623896 0.8752208 0.4376104 [4,] 0.5064512 0.9870975 0.4935488 [5,] 0.4700616 0.9401233 0.5299384 [6,] 0.6399836 0.7200329 0.3600164 [7,] 0.5416397 0.9167206 0.4583603 [8,] 0.4889622 0.9779245 0.5110378 [9,] 0.4282229 0.8564459 0.5717771 [10,] 0.3468308 0.6936617 0.6531692 [11,] 0.4389103 0.8778206 0.5610897 [12,] 0.3618227 0.7236453 0.6381773 [13,] 0.3550665 0.7101330 0.6449335 [14,] 0.3027948 0.6055896 0.6972052 [15,] 0.2898500 0.5796999 0.7101500 [16,] 0.2328506 0.4657013 0.7671494 [17,] 0.3344642 0.6689283 0.6655358 [18,] 0.2987172 0.5974343 0.7012828 [19,] 0.2467774 0.4935547 0.7532226 [20,] 0.2010296 0.4020593 0.7989704 [21,] 0.2067374 0.4134749 0.7932626 [22,] 0.1855944 0.3711889 0.8144056 [23,] 0.4374209 0.8748418 0.5625791 [24,] 0.5775692 0.8448617 0.4224308 [25,] 0.5176144 0.9647712 0.4823856 [26,] 0.4712207 0.9424414 0.5287793 [27,] 0.6909598 0.6180805 0.3090402 [28,] 0.6460101 0.7079799 0.3539899 [29,] 0.7271310 0.5457379 0.2728690 [30,] 0.6952491 0.6095018 0.3047509 [31,] 0.6500158 0.6999684 0.3499842 [32,] 0.7404781 0.5190437 0.2595219 [33,] 0.7255358 0.5489285 0.2744642 [34,] 0.7176951 0.5646097 0.2823049 [35,] 0.7336259 0.5327481 0.2663741 [36,] 0.7084183 0.5831634 0.2915817 [37,] 0.6932710 0.6134581 0.3067290 [38,] 0.6472255 0.7055491 0.3527745 [39,] 0.5869973 0.8260054 0.4130027 [40,] 0.5136097 0.9727806 0.4863903 [41,] 0.4567977 0.9135954 0.5432023 [42,] 0.4574237 0.9148474 0.5425763 [43,] 0.3972197 0.7944394 0.6027803 [44,] 0.3491942 0.6983884 0.6508058 [45,] 0.3180888 0.6361776 0.6819112 [46,] 0.3303690 0.6607381 0.6696310 [47,] 0.3073948 0.6147897 0.6926052 [48,] 0.2390862 0.4781725 0.7609138 [49,] 0.1915034 0.3830068 0.8084966 [50,] 0.2345824 0.4691648 0.7654176 [51,] 0.2271934 0.4543868 0.7728066 [52,] 0.5564211 0.8871578 0.4435789 [53,] 0.4620077 0.9240154 0.5379923 [54,] 0.3759529 0.7519057 0.6240471 [55,] 0.2815644 0.5631289 0.7184356 [56,] 0.2353726 0.4707451 0.7646274 [57,] 0.3498619 0.6997239 0.6501381 [58,] 0.2853118 0.5706237 0.7146882 [59,] 0.2007499 0.4014999 0.7992501 [60,] 0.1197753 0.2395507 0.8802247 > postscript(file="/var/www/html/rcomp/tmp/1xaj41258654568.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/21dhn1258654568.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/3344r1258654568.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/4wvdr1258654568.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/50nd91258654568.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 = 105 Frequency = 1 1 2 3 4 5 -3.837060e-02 9.872105e+00 -1.280277e+01 3.628543e+00 6.395571e+00 6 7 8 9 10 4.542760e+00 2.141129e+00 -5.190969e+00 -9.078514e+00 7.727316e+00 11 12 13 14 15 5.493480e+00 1.101490e+01 9.623594e+00 5.054872e+00 -2.081060e+01 16 17 18 19 20 1.309612e+00 -7.278777e+00 -9.323633e-01 4.388987e+00 4.526260e-01 21 22 23 24 25 -1.548636e+01 -8.899086e+00 7.137748e+00 -1.146759e+01 8.910283e+00 26 27 28 29 30 -7.473495e+00 -1.047784e+00 1.147856e+01 -2.011044e+00 1.361327e-01 31 32 33 34 35 -1.292972e+01 -5.445185e+00 -2.930015e+00 -3.806462e+00 -9.261011e+00 36 37 38 39 40 -3.453929e+00 1.094023e+01 -3.751526e+00 2.356000e+00 5.086363e+00 41 42 43 44 45 -1.471677e+00 2.969734e-01 -1.061906e+01 -2.421729e+00 1.619555e+01 46 47 48 49 50 1.774484e+01 -1.446896e+00 6.950447e+00 -1.882424e+01 -4.528330e+00 51 52 53 54 55 1.372413e+01 -6.811123e+00 -3.531497e+00 -1.231539e+01 9.788111e+00 56 57 58 59 60 -1.189488e+00 -8.419740e-01 -3.839551e+00 1.024584e+00 5.692120e+00 61 62 63 64 65 6.989314e+00 -1.104585e-15 2.400054e+00 -1.342727e+01 1.028457e+00 66 67 68 69 70 7.352095e+00 -2.797044e+00 5.321951e+00 1.596141e+01 5.223686e-15 71 72 73 74 75 3.385702e-01 8.229059e+00 -1.482904e+01 1.918505e+01 -5.456047e-01 76 77 78 79 80 6.808648e-01 3.893270e+00 9.551047e+00 1.632438e+01 7.383087e+00 81 82 83 84 85 2.917581e+00 -1.082251e+00 -1.035272e+01 -3.850952e+00 -7.254986e+00 86 87 88 89 90 -4.425975e+00 1.263874e+01 3.211973e+00 9.345582e+00 -1.320433e+01 91 92 93 94 95 3.387048e-16 -9.719497e-01 -1.516064e+01 -7.844805e+00 7.066248e+00 96 97 98 99 100 -1.311405e+01 4.483219e+00 -1.393270e+01 4.087839e+00 -5.157530e+00 101 102 103 104 105 -6.369885e+00 4.573072e+00 -6.296784e+00 2.061656e+00 8.422967e+00 > postscript(file="/var/www/html/rcomp/tmp/6nq2f1258654568.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 = 105 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.837060e-02 NA 1 9.872105e+00 -3.837060e-02 2 -1.280277e+01 9.872105e+00 3 3.628543e+00 -1.280277e+01 4 6.395571e+00 3.628543e+00 5 4.542760e+00 6.395571e+00 6 2.141129e+00 4.542760e+00 7 -5.190969e+00 2.141129e+00 8 -9.078514e+00 -5.190969e+00 9 7.727316e+00 -9.078514e+00 10 5.493480e+00 7.727316e+00 11 1.101490e+01 5.493480e+00 12 9.623594e+00 1.101490e+01 13 5.054872e+00 9.623594e+00 14 -2.081060e+01 5.054872e+00 15 1.309612e+00 -2.081060e+01 16 -7.278777e+00 1.309612e+00 17 -9.323633e-01 -7.278777e+00 18 4.388987e+00 -9.323633e-01 19 4.526260e-01 4.388987e+00 20 -1.548636e+01 4.526260e-01 21 -8.899086e+00 -1.548636e+01 22 7.137748e+00 -8.899086e+00 23 -1.146759e+01 7.137748e+00 24 8.910283e+00 -1.146759e+01 25 -7.473495e+00 8.910283e+00 26 -1.047784e+00 -7.473495e+00 27 1.147856e+01 -1.047784e+00 28 -2.011044e+00 1.147856e+01 29 1.361327e-01 -2.011044e+00 30 -1.292972e+01 1.361327e-01 31 -5.445185e+00 -1.292972e+01 32 -2.930015e+00 -5.445185e+00 33 -3.806462e+00 -2.930015e+00 34 -9.261011e+00 -3.806462e+00 35 -3.453929e+00 -9.261011e+00 36 1.094023e+01 -3.453929e+00 37 -3.751526e+00 1.094023e+01 38 2.356000e+00 -3.751526e+00 39 5.086363e+00 2.356000e+00 40 -1.471677e+00 5.086363e+00 41 2.969734e-01 -1.471677e+00 42 -1.061906e+01 2.969734e-01 43 -2.421729e+00 -1.061906e+01 44 1.619555e+01 -2.421729e+00 45 1.774484e+01 1.619555e+01 46 -1.446896e+00 1.774484e+01 47 6.950447e+00 -1.446896e+00 48 -1.882424e+01 6.950447e+00 49 -4.528330e+00 -1.882424e+01 50 1.372413e+01 -4.528330e+00 51 -6.811123e+00 1.372413e+01 52 -3.531497e+00 -6.811123e+00 53 -1.231539e+01 -3.531497e+00 54 9.788111e+00 -1.231539e+01 55 -1.189488e+00 9.788111e+00 56 -8.419740e-01 -1.189488e+00 57 -3.839551e+00 -8.419740e-01 58 1.024584e+00 -3.839551e+00 59 5.692120e+00 1.024584e+00 60 6.989314e+00 5.692120e+00 61 -1.104585e-15 6.989314e+00 62 2.400054e+00 -1.104585e-15 63 -1.342727e+01 2.400054e+00 64 1.028457e+00 -1.342727e+01 65 7.352095e+00 1.028457e+00 66 -2.797044e+00 7.352095e+00 67 5.321951e+00 -2.797044e+00 68 1.596141e+01 5.321951e+00 69 5.223686e-15 1.596141e+01 70 3.385702e-01 5.223686e-15 71 8.229059e+00 3.385702e-01 72 -1.482904e+01 8.229059e+00 73 1.918505e+01 -1.482904e+01 74 -5.456047e-01 1.918505e+01 75 6.808648e-01 -5.456047e-01 76 3.893270e+00 6.808648e-01 77 9.551047e+00 3.893270e+00 78 1.632438e+01 9.551047e+00 79 7.383087e+00 1.632438e+01 80 2.917581e+00 7.383087e+00 81 -1.082251e+00 2.917581e+00 82 -1.035272e+01 -1.082251e+00 83 -3.850952e+00 -1.035272e+01 84 -7.254986e+00 -3.850952e+00 85 -4.425975e+00 -7.254986e+00 86 1.263874e+01 -4.425975e+00 87 3.211973e+00 1.263874e+01 88 9.345582e+00 3.211973e+00 89 -1.320433e+01 9.345582e+00 90 3.387048e-16 -1.320433e+01 91 -9.719497e-01 3.387048e-16 92 -1.516064e+01 -9.719497e-01 93 -7.844805e+00 -1.516064e+01 94 7.066248e+00 -7.844805e+00 95 -1.311405e+01 7.066248e+00 96 4.483219e+00 -1.311405e+01 97 -1.393270e+01 4.483219e+00 98 4.087839e+00 -1.393270e+01 99 -5.157530e+00 4.087839e+00 100 -6.369885e+00 -5.157530e+00 101 4.573072e+00 -6.369885e+00 102 -6.296784e+00 4.573072e+00 103 2.061656e+00 -6.296784e+00 104 8.422967e+00 2.061656e+00 105 NA 8.422967e+00 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 9.872105e+00 -3.837060e-02 [2,] -1.280277e+01 9.872105e+00 [3,] 3.628543e+00 -1.280277e+01 [4,] 6.395571e+00 3.628543e+00 [5,] 4.542760e+00 6.395571e+00 [6,] 2.141129e+00 4.542760e+00 [7,] -5.190969e+00 2.141129e+00 [8,] -9.078514e+00 -5.190969e+00 [9,] 7.727316e+00 -9.078514e+00 [10,] 5.493480e+00 7.727316e+00 [11,] 1.101490e+01 5.493480e+00 [12,] 9.623594e+00 1.101490e+01 [13,] 5.054872e+00 9.623594e+00 [14,] -2.081060e+01 5.054872e+00 [15,] 1.309612e+00 -2.081060e+01 [16,] -7.278777e+00 1.309612e+00 [17,] -9.323633e-01 -7.278777e+00 [18,] 4.388987e+00 -9.323633e-01 [19,] 4.526260e-01 4.388987e+00 [20,] -1.548636e+01 4.526260e-01 [21,] -8.899086e+00 -1.548636e+01 [22,] 7.137748e+00 -8.899086e+00 [23,] -1.146759e+01 7.137748e+00 [24,] 8.910283e+00 -1.146759e+01 [25,] -7.473495e+00 8.910283e+00 [26,] -1.047784e+00 -7.473495e+00 [27,] 1.147856e+01 -1.047784e+00 [28,] -2.011044e+00 1.147856e+01 [29,] 1.361327e-01 -2.011044e+00 [30,] -1.292972e+01 1.361327e-01 [31,] -5.445185e+00 -1.292972e+01 [32,] -2.930015e+00 -5.445185e+00 [33,] -3.806462e+00 -2.930015e+00 [34,] -9.261011e+00 -3.806462e+00 [35,] -3.453929e+00 -9.261011e+00 [36,] 1.094023e+01 -3.453929e+00 [37,] -3.751526e+00 1.094023e+01 [38,] 2.356000e+00 -3.751526e+00 [39,] 5.086363e+00 2.356000e+00 [40,] -1.471677e+00 5.086363e+00 [41,] 2.969734e-01 -1.471677e+00 [42,] -1.061906e+01 2.969734e-01 [43,] -2.421729e+00 -1.061906e+01 [44,] 1.619555e+01 -2.421729e+00 [45,] 1.774484e+01 1.619555e+01 [46,] -1.446896e+00 1.774484e+01 [47,] 6.950447e+00 -1.446896e+00 [48,] -1.882424e+01 6.950447e+00 [49,] -4.528330e+00 -1.882424e+01 [50,] 1.372413e+01 -4.528330e+00 [51,] -6.811123e+00 1.372413e+01 [52,] -3.531497e+00 -6.811123e+00 [53,] -1.231539e+01 -3.531497e+00 [54,] 9.788111e+00 -1.231539e+01 [55,] -1.189488e+00 9.788111e+00 [56,] -8.419740e-01 -1.189488e+00 [57,] -3.839551e+00 -8.419740e-01 [58,] 1.024584e+00 -3.839551e+00 [59,] 5.692120e+00 1.024584e+00 [60,] 6.989314e+00 5.692120e+00 [61,] -1.104585e-15 6.989314e+00 [62,] 2.400054e+00 -1.104585e-15 [63,] -1.342727e+01 2.400054e+00 [64,] 1.028457e+00 -1.342727e+01 [65,] 7.352095e+00 1.028457e+00 [66,] -2.797044e+00 7.352095e+00 [67,] 5.321951e+00 -2.797044e+00 [68,] 1.596141e+01 5.321951e+00 [69,] 5.223686e-15 1.596141e+01 [70,] 3.385702e-01 5.223686e-15 [71,] 8.229059e+00 3.385702e-01 [72,] -1.482904e+01 8.229059e+00 [73,] 1.918505e+01 -1.482904e+01 [74,] -5.456047e-01 1.918505e+01 [75,] 6.808648e-01 -5.456047e-01 [76,] 3.893270e+00 6.808648e-01 [77,] 9.551047e+00 3.893270e+00 [78,] 1.632438e+01 9.551047e+00 [79,] 7.383087e+00 1.632438e+01 [80,] 2.917581e+00 7.383087e+00 [81,] -1.082251e+00 2.917581e+00 [82,] -1.035272e+01 -1.082251e+00 [83,] -3.850952e+00 -1.035272e+01 [84,] -7.254986e+00 -3.850952e+00 [85,] -4.425975e+00 -7.254986e+00 [86,] 1.263874e+01 -4.425975e+00 [87,] 3.211973e+00 1.263874e+01 [88,] 9.345582e+00 3.211973e+00 [89,] -1.320433e+01 9.345582e+00 [90,] 3.387048e-16 -1.320433e+01 [91,] -9.719497e-01 3.387048e-16 [92,] -1.516064e+01 -9.719497e-01 [93,] -7.844805e+00 -1.516064e+01 [94,] 7.066248e+00 -7.844805e+00 [95,] -1.311405e+01 7.066248e+00 [96,] 4.483219e+00 -1.311405e+01 [97,] -1.393270e+01 4.483219e+00 [98,] 4.087839e+00 -1.393270e+01 [99,] -5.157530e+00 4.087839e+00 [100,] -6.369885e+00 -5.157530e+00 [101,] 4.573072e+00 -6.369885e+00 [102,] -6.296784e+00 4.573072e+00 [103,] 2.061656e+00 -6.296784e+00 [104,] 8.422967e+00 2.061656e+00 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 9.872105e+00 -3.837060e-02 2 -1.280277e+01 9.872105e+00 3 3.628543e+00 -1.280277e+01 4 6.395571e+00 3.628543e+00 5 4.542760e+00 6.395571e+00 6 2.141129e+00 4.542760e+00 7 -5.190969e+00 2.141129e+00 8 -9.078514e+00 -5.190969e+00 9 7.727316e+00 -9.078514e+00 10 5.493480e+00 7.727316e+00 11 1.101490e+01 5.493480e+00 12 9.623594e+00 1.101490e+01 13 5.054872e+00 9.623594e+00 14 -2.081060e+01 5.054872e+00 15 1.309612e+00 -2.081060e+01 16 -7.278777e+00 1.309612e+00 17 -9.323633e-01 -7.278777e+00 18 4.388987e+00 -9.323633e-01 19 4.526260e-01 4.388987e+00 20 -1.548636e+01 4.526260e-01 21 -8.899086e+00 -1.548636e+01 22 7.137748e+00 -8.899086e+00 23 -1.146759e+01 7.137748e+00 24 8.910283e+00 -1.146759e+01 25 -7.473495e+00 8.910283e+00 26 -1.047784e+00 -7.473495e+00 27 1.147856e+01 -1.047784e+00 28 -2.011044e+00 1.147856e+01 29 1.361327e-01 -2.011044e+00 30 -1.292972e+01 1.361327e-01 31 -5.445185e+00 -1.292972e+01 32 -2.930015e+00 -5.445185e+00 33 -3.806462e+00 -2.930015e+00 34 -9.261011e+00 -3.806462e+00 35 -3.453929e+00 -9.261011e+00 36 1.094023e+01 -3.453929e+00 37 -3.751526e+00 1.094023e+01 38 2.356000e+00 -3.751526e+00 39 5.086363e+00 2.356000e+00 40 -1.471677e+00 5.086363e+00 41 2.969734e-01 -1.471677e+00 42 -1.061906e+01 2.969734e-01 43 -2.421729e+00 -1.061906e+01 44 1.619555e+01 -2.421729e+00 45 1.774484e+01 1.619555e+01 46 -1.446896e+00 1.774484e+01 47 6.950447e+00 -1.446896e+00 48 -1.882424e+01 6.950447e+00 49 -4.528330e+00 -1.882424e+01 50 1.372413e+01 -4.528330e+00 51 -6.811123e+00 1.372413e+01 52 -3.531497e+00 -6.811123e+00 53 -1.231539e+01 -3.531497e+00 54 9.788111e+00 -1.231539e+01 55 -1.189488e+00 9.788111e+00 56 -8.419740e-01 -1.189488e+00 57 -3.839551e+00 -8.419740e-01 58 1.024584e+00 -3.839551e+00 59 5.692120e+00 1.024584e+00 60 6.989314e+00 5.692120e+00 61 -1.104585e-15 6.989314e+00 62 2.400054e+00 -1.104585e-15 63 -1.342727e+01 2.400054e+00 64 1.028457e+00 -1.342727e+01 65 7.352095e+00 1.028457e+00 66 -2.797044e+00 7.352095e+00 67 5.321951e+00 -2.797044e+00 68 1.596141e+01 5.321951e+00 69 5.223686e-15 1.596141e+01 70 3.385702e-01 5.223686e-15 71 8.229059e+00 3.385702e-01 72 -1.482904e+01 8.229059e+00 73 1.918505e+01 -1.482904e+01 74 -5.456047e-01 1.918505e+01 75 6.808648e-01 -5.456047e-01 76 3.893270e+00 6.808648e-01 77 9.551047e+00 3.893270e+00 78 1.632438e+01 9.551047e+00 79 7.383087e+00 1.632438e+01 80 2.917581e+00 7.383087e+00 81 -1.082251e+00 2.917581e+00 82 -1.035272e+01 -1.082251e+00 83 -3.850952e+00 -1.035272e+01 84 -7.254986e+00 -3.850952e+00 85 -4.425975e+00 -7.254986e+00 86 1.263874e+01 -4.425975e+00 87 3.211973e+00 1.263874e+01 88 9.345582e+00 3.211973e+00 89 -1.320433e+01 9.345582e+00 90 3.387048e-16 -1.320433e+01 91 -9.719497e-01 3.387048e-16 92 -1.516064e+01 -9.719497e-01 93 -7.844805e+00 -1.516064e+01 94 7.066248e+00 -7.844805e+00 95 -1.311405e+01 7.066248e+00 96 4.483219e+00 -1.311405e+01 97 -1.393270e+01 4.483219e+00 98 4.087839e+00 -1.393270e+01 99 -5.157530e+00 4.087839e+00 100 -6.369885e+00 -5.157530e+00 101 4.573072e+00 -6.369885e+00 102 -6.296784e+00 4.573072e+00 103 2.061656e+00 -6.296784e+00 104 8.422967e+00 2.061656e+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/73paw1258654568.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/8gpqj1258654568.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/9flh41258654568.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: 62, 70, 91 2: Not plotting observations with leverage one: 62, 70, 91 > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/106vqr1258654568.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/11k3ep1258654568.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/12i7qh1258654568.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/13r66o1258654568.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/149yjj1258654568.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/15s45x1258654568.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/16j5ah1258654568.tab") + } > system("convert tmp/1xaj41258654568.ps tmp/1xaj41258654568.png") > system("convert tmp/21dhn1258654568.ps tmp/21dhn1258654568.png") > system("convert tmp/3344r1258654568.ps tmp/3344r1258654568.png") > system("convert tmp/4wvdr1258654568.ps tmp/4wvdr1258654568.png") > system("convert tmp/50nd91258654568.ps tmp/50nd91258654568.png") > system("convert tmp/6nq2f1258654568.ps tmp/6nq2f1258654568.png") > system("convert tmp/73paw1258654568.ps tmp/73paw1258654568.png") > system("convert tmp/8gpqj1258654568.ps tmp/8gpqj1258654568.png") > system("convert tmp/9flh41258654568.ps tmp/9flh41258654568.png") > system("convert tmp/106vqr1258654568.ps tmp/106vqr1258654568.png") > > > proc.time() user system elapsed 3.219 1.602 3.637