R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(1 + ,1 + ,14 + ,12 + ,26 + ,21 + ,21 + ,23 + ,17 + ,23 + ,127 + ,1 + ,1 + ,18 + ,11 + ,20 + ,16 + ,15 + ,24 + ,17 + ,20 + ,108 + ,1 + ,1 + ,11 + ,14 + ,19 + ,19 + ,18 + ,22 + ,18 + ,20 + ,110 + ,1 + ,0 + ,12 + ,12 + ,19 + ,18 + ,11 + ,20 + ,21 + ,21 + ,102 + ,1 + ,1 + ,16 + ,21 + ,20 + ,16 + ,8 + ,24 + ,20 + ,24 + ,104 + ,1 + ,1 + ,18 + ,12 + ,25 + ,23 + ,19 + ,27 + ,28 + ,22 + ,140 + ,1 + ,0 + ,14 + ,22 + ,25 + ,17 + ,4 + ,28 + ,19 + ,23 + ,112 + ,1 + ,1 + ,14 + ,11 + ,22 + ,12 + ,20 + ,27 + ,22 + ,20 + ,115 + ,1 + ,1 + ,15 + ,10 + ,26 + ,19 + ,16 + ,24 + ,16 + ,25 + ,121 + ,1 + ,1 + ,15 + ,13 + ,22 + ,16 + ,14 + ,23 + ,18 + ,23 + ,112 + ,1 + ,0 + ,17 + ,10 + ,17 + ,19 + ,10 + ,24 + ,25 + ,27 + ,118 + ,1 + ,0 + ,19 + ,8 + ,22 + ,20 + ,13 + ,27 + ,17 + ,27 + ,122 + ,1 + ,1 + ,10 + ,15 + ,19 + ,13 + ,14 + ,27 + ,14 + ,22 + ,105 + ,1 + ,1 + ,16 + ,14 + ,24 + ,20 + ,8 + ,28 + ,11 + ,24 + ,111 + ,1 + ,1 + ,18 + ,10 + ,26 + ,27 + ,23 + ,27 + ,27 + ,25 + ,151 + ,1 + ,0 + ,14 + ,14 + ,21 + ,17 + ,11 + ,23 + ,20 + ,22 + ,106 + ,1 + ,1 + ,14 + ,14 + ,13 + ,8 + ,9 + ,24 + ,22 + ,28 + ,100 + ,1 + ,0 + ,17 + ,11 + ,26 + ,25 + ,24 + ,28 + ,22 + ,28 + ,149 + ,1 + ,0 + ,14 + ,10 + ,20 + ,26 + ,5 + ,27 + ,21 + ,27 + ,122 + ,1 + ,1 + ,16 + ,13 + ,22 + ,13 + ,15 + ,25 + ,23 + ,25 + ,115 + ,1 + ,0 + ,18 + ,7 + ,14 + ,19 + ,5 + ,19 + ,17 + ,16 + ,86 + ,1 + ,1 + ,11 + ,14 + ,21 + ,15 + ,19 + ,24 + ,24 + ,28 + ,124 + ,1 + ,1 + ,14 + ,12 + ,7 + ,5 + ,6 + ,20 + ,14 + ,21 + ,69 + ,1 + ,0 + ,12 + ,14 + ,23 + ,16 + ,13 + ,28 + ,17 + ,24 + ,117 + ,1 + ,1 + ,17 + ,11 + ,17 + ,14 + ,11 + ,26 + ,23 + ,27 + ,113 + ,1 + ,1 + ,9 + ,9 + ,25 + ,24 + ,17 + ,23 + ,24 + ,14 + ,123 + ,1 + ,1 + ,16 + ,11 + ,25 + ,24 + ,17 + ,23 + ,24 + ,14 + ,123 + ,1 + ,1 + ,14 + ,15 + ,19 + ,9 + ,5 + ,20 + ,8 + ,27 + ,84 + ,1 + ,0 + ,15 + ,14 + ,20 + ,19 + ,9 + ,11 + ,22 + ,20 + ,97 + ,1 + ,1 + ,11 + ,13 + ,23 + ,19 + ,15 + ,24 + ,23 + ,21 + ,121 + ,1 + ,0 + ,16 + ,9 + ,22 + ,25 + ,17 + ,25 + ,25 + ,22 + ,132 + ,1 + ,1 + ,13 + ,15 + ,22 + ,19 + ,17 + ,23 + ,21 + ,21 + ,119 + ,1 + ,1 + ,17 + ,10 + ,21 + ,18 + ,20 + ,18 + ,24 + ,12 + ,98 + ,1 + ,0 + ,15 + ,11 + ,15 + ,15 + ,12 + ,20 + ,15 + ,20 + ,87 + ,1 + ,0 + ,14 + ,13 + ,20 + ,12 + ,7 + ,20 + ,22 + ,24 + ,101 + ,1 + ,0 + ,16 + ,8 + ,22 + ,21 + ,16 + ,24 + ,21 + ,19 + ,115 + ,1 + ,1 + ,9 + ,20 + ,18 + ,12 + ,7 + ,23 + ,25 + ,28 + ,109 + ,1 + ,0 + ,15 + ,12 + ,20 + ,15 + ,14 + ,25 + ,16 + ,23 + ,109 + ,1 + ,0 + ,17 + ,10 + ,28 + ,28 + ,24 + ,28 + ,28 + ,27 + ,159 + ,1 + ,1 + ,13 + ,10 + ,22 + ,25 + ,15 + ,26 + ,23 + ,22 + ,129 + ,1 + ,1 + ,15 + ,9 + ,18 + ,19 + ,15 + ,26 + ,21 + ,27 + ,119 + ,1 + ,1 + ,16 + ,14 + ,23 + ,20 + ,10 + ,23 + ,21 + ,26 + ,119 + ,1 + ,1 + ,16 + ,8 + ,20 + ,24 + ,14 + ,22 + ,26 + ,22 + ,122 + ,1 + ,0 + ,12 + ,14 + ,25 + ,26 + ,18 + ,24 + ,22 + ,21 + ,131 + ,1 + ,0 + ,12 + ,11 + ,26 + ,25 + ,12 + ,21 + ,21 + ,19 + ,120 + ,1 + ,1 + ,11 + ,13 + ,15 + ,12 + ,9 + ,20 + ,18 + ,24 + ,82 + ,1 + ,0 + ,15 + ,9 + ,17 + ,12 + ,9 + ,22 + ,12 + ,19 + ,86 + ,1 + ,0 + ,15 + ,11 + ,23 + ,15 + ,8 + ,20 + ,25 + ,26 + ,105 + ,1 + ,1 + ,17 + ,15 + ,21 + ,17 + ,18 + ,25 + ,17 + ,22 + ,114 + ,1 + ,0 + ,13 + ,11 + ,13 + ,14 + ,10 + ,20 + ,24 + ,28 + ,100 + ,1 + ,1 + ,16 + ,10 + ,18 + ,16 + ,17 + ,22 + ,15 + ,21 + ,100 + ,1 + ,1 + ,14 + ,14 + ,19 + ,11 + ,14 + ,23 + ,13 + ,23 + ,99 + ,1 + ,1 + ,11 + ,18 + ,22 + ,20 + ,16 + ,25 + ,26 + ,28 + ,132 + ,1 + ,1 + ,12 + ,14 + ,16 + ,11 + ,10 + ,23 + ,16 + ,10 + ,82 + ,1 + ,0 + ,12 + ,11 + ,24 + ,22 + ,19 + ,23 + ,24 + ,24 + ,132 + ,1 + ,1 + ,15 + ,12 + ,18 + ,20 + ,10 + ,22 + ,21 + ,21 + ,107 + ,1 + ,1 + ,16 + ,13 + ,20 + ,19 + ,14 + ,24 + ,20 + ,21 + ,114 + ,1 + ,1 + ,15 + ,9 + ,24 + ,17 + ,10 + ,25 + ,14 + ,24 + ,110 + ,1 + ,0 + ,12 + ,10 + ,14 + ,21 + ,4 + ,21 + ,25 + ,24 + ,105 + ,1 + ,0 + ,12 + ,15 + ,22 + ,23 + ,19 + ,12 + ,25 + ,25 + ,121 + ,1 + ,1 + ,8 + ,20 + ,24 + ,18 + ,9 + ,17 + ,20 + ,25 + ,109 + ,1 + ,1 + ,13 + ,12 + ,18 + ,17 + ,12 + ,20 + ,22 + ,23 + ,106 + ,1 + ,1 + ,11 + ,12 + ,21 + ,27 + ,16 + ,23 + ,20 + ,21 + ,124 + ,1 + ,0 + ,14 + ,14 + ,23 + ,25 + ,11 + ,23 + ,26 + ,16 + ,120 + ,1 + ,1 + ,15 + ,13 + ,17 + ,19 + ,18 + ,20 + ,18 + ,17 + ,91 + ,1 + ,0 + ,10 + ,11 + ,22 + ,22 + ,11 + ,28 + ,22 + ,25 + ,126 + ,1 + ,0 + ,11 + ,17 + ,24 + ,24 + ,24 + ,24 + ,24 + ,24 + ,138 + ,1 + ,0 + ,12 + ,12 + ,21 + ,20 + ,17 + ,24 + ,17 + ,23 + ,118 + ,1 + ,1 + ,15 + ,13 + ,22 + ,19 + ,18 + ,24 + ,24 + ,25 + ,128 + ,1 + ,1 + ,15 + ,14 + ,16 + ,11 + ,9 + ,24 + ,20 + ,23 + ,98 + ,1 + ,1 + ,14 + ,13 + ,21 + ,22 + ,19 + ,28 + ,19 + ,28 + ,133 + ,1 + ,0 + ,16 + ,15 + ,23 + ,22 + ,18 + ,25 + ,20 + ,26 + ,130 + ,1 + ,0 + ,15 + ,13 + ,22 + ,16 + ,12 + ,21 + ,15 + ,22 + ,103 + ,1 + ,1 + ,15 + ,10 + ,24 + ,20 + ,23 + ,25 + ,23 + ,19 + ,124 + ,1 + ,1 + ,13 + ,11 + ,24 + ,24 + ,22 + ,25 + ,26 + ,26 + ,142 + ,1 + ,1 + ,12 + ,19 + ,16 + ,16 + ,14 + ,18 + ,22 + ,18 + ,96 + ,1 + ,1 + ,17 + ,13 + ,16 + ,16 + ,14 + ,17 + ,20 + ,18 + ,93 + ,1 + ,0 + ,13 + ,17 + ,21 + ,22 + ,16 + ,26 + ,24 + ,25 + ,129 + ,1 + ,0 + ,15 + ,13 + ,26 + ,24 + ,23 + ,28 + ,26 + ,27 + ,150 + ,1 + ,0 + ,13 + ,9 + ,15 + ,16 + ,7 + ,21 + ,21 + ,12 + ,88 + ,1 + ,0 + ,15 + ,11 + ,25 + ,27 + ,10 + ,27 + ,25 + ,15 + ,125 + ,1 + ,1 + ,16 + ,10 + ,18 + ,11 + ,12 + ,22 + ,13 + ,21 + ,92 + ,1 + ,0 + ,15 + ,9 + ,23 + ,21 + ,12 + ,21 + ,20 + ,23 + ,0 + ,1 + ,1 + ,16 + ,12 + ,20 + ,20 + ,12 + ,25 + ,22 + ,22 + ,117 + ,1 + ,0 + ,15 + ,12 + ,17 + ,20 + ,17 + ,22 + ,23 + ,21 + ,112 + ,1 + ,0 + ,14 + ,13 + ,25 + ,27 + ,21 + ,23 + ,28 + ,24 + ,144 + ,1 + ,1 + ,15 + ,13 + ,24 + ,20 + ,16 + ,26 + ,22 + ,27 + ,130 + ,1 + ,1 + ,14 + ,12 + ,17 + ,12 + ,11 + ,19 + ,20 + ,22 + ,87 + ,1 + ,1 + ,13 + ,15 + ,19 + ,8 + ,14 + ,25 + ,6 + ,28 + ,92 + ,1 + ,1 + ,7 + ,22 + ,20 + ,21 + ,13 + ,21 + ,21 + ,26 + ,114 + ,1 + ,1 + ,17 + ,13 + ,15 + ,18 + ,9 + ,13 + ,20 + ,10 + ,81 + ,1 + ,0 + ,13 + ,15 + ,27 + ,24 + ,19 + ,24 + ,18 + ,19 + ,127 + ,1 + ,1 + ,15 + ,13 + ,22 + ,16 + ,13 + ,25 + ,23 + ,22 + ,115 + ,1 + ,1 + ,14 + ,15 + ,23 + ,18 + ,19 + ,26 + ,20 + ,21 + ,123 + ,1 + ,1 + ,13 + ,10 + ,16 + ,20 + ,13 + ,25 + ,24 + ,24 + ,115 + ,1 + ,1 + ,16 + ,11 + ,19 + ,20 + ,13 + ,25 + ,22 + ,25 + ,117 + ,1 + ,0 + ,12 + ,16 + ,25 + ,19 + ,13 + ,22 + ,21 + ,21 + ,117 + ,1 + ,1 + ,14 + ,11 + ,19 + ,17 + ,14 + ,21 + ,18 + ,20 + ,103 + ,1 + ,0 + ,17 + ,11 + ,19 + ,16 + ,12 + ,23 + ,21 + ,21 + ,108 + ,1 + ,0 + ,15 + ,10 + ,26 + ,26 + ,22 + ,25 + ,23 + ,24 + ,139 + ,1 + ,1 + ,17 + ,10 + ,21 + ,15 + ,11 + ,24 + ,23 + ,23 + ,113 + ,1 + ,0 + ,12 + ,16 + ,20 + ,22 + ,5 + ,21 + ,15 + ,18 + ,97 + ,1 + ,1 + ,16 + ,12 + ,24 + ,17 + ,18 + ,21 + ,21 + ,24 + ,117 + ,1 + ,1 + ,11 + ,11 + ,22 + ,23 + ,19 + ,25 + ,24 + ,24 + ,133 + ,1 + ,0 + ,15 + ,16 + ,20 + ,21 + ,14 + ,22 + ,23 + ,19 + ,115 + ,1 + ,1 + ,9 + ,19 + ,18 + ,19 + ,15 + ,20 + ,21 + ,20 + ,103 + ,1 + ,0 + ,16 + ,11 + ,18 + ,14 + ,12 + ,20 + ,21 + ,18 + ,95 + ,1 + ,1 + ,15 + ,16 + ,24 + ,17 + ,19 + ,23 + ,20 + ,20 + ,117 + ,1 + ,1 + ,10 + ,15 + ,24 + ,12 + ,15 + ,28 + ,11 + ,27 + ,113 + ,1 + ,1 + ,10 + ,24 + ,22 + ,24 + ,17 + ,23 + ,22 + ,23 + ,127 + ,1 + ,1 + ,15 + ,14 + ,23 + ,18 + ,8 + ,28 + ,27 + ,26 + ,126 + ,1 + ,1 + ,11 + ,15 + ,22 + ,20 + ,10 + ,24 + ,25 + ,23 + ,119 + ,1 + ,1 + ,13 + ,11 + ,20 + ,16 + ,12 + ,18 + ,18 + ,17 + ,97 + ,1 + ,1 + ,14 + ,15 + ,18 + ,20 + ,12 + ,20 + ,20 + ,21 + ,105 + ,1 + ,1 + ,18 + ,12 + ,25 + ,22 + ,20 + ,28 + ,24 + ,25 + ,140 + ,1 + ,0 + ,16 + ,10 + ,18 + ,12 + ,12 + ,21 + ,10 + ,23 + ,91 + ,1 + ,1 + ,14 + ,14 + ,16 + ,16 + ,12 + ,21 + ,27 + ,27 + ,112 + ,1 + ,1 + ,14 + ,13 + ,20 + ,17 + ,14 + ,25 + ,21 + ,24 + ,113 + ,1 + ,0 + ,14 + ,9 + ,19 + ,22 + ,6 + ,19 + ,21 + ,20 + ,102 + ,1 + ,1 + ,14 + ,15 + ,15 + ,12 + ,10 + ,18 + ,18 + ,27 + ,92 + ,1 + ,1 + ,12 + ,15 + ,19 + ,14 + ,18 + ,21 + ,15 + ,21 + ,98 + ,1 + ,1 + ,14 + ,14 + ,19 + ,23 + ,18 + ,22 + ,24 + ,24 + ,122 + ,1 + ,1 + ,15 + ,11 + ,16 + ,15 + ,7 + ,24 + ,22 + ,21 + ,100 + ,1 + ,1 + ,15 + ,8 + ,17 + ,17 + ,18 + ,15 + ,14 + ,15 + ,84 + ,1 + ,1 + ,15 + ,11 + ,28 + ,28 + ,9 + ,28 + ,28 + ,25 + ,142 + ,1 + ,0 + ,13 + ,11 + ,23 + ,20 + ,17 + ,26 + ,18 + ,25 + ,124 + ,1 + ,1 + ,17 + ,8 + ,25 + ,23 + ,22 + ,23 + ,26 + ,22 + ,137 + ,1 + ,1 + ,17 + ,10 + ,20 + ,13 + ,11 + ,26 + ,17 + ,24 + ,105 + ,1 + ,0 + ,19 + ,11 + ,17 + ,18 + ,15 + ,20 + ,19 + ,21 + ,106 + ,1 + ,0 + ,15 + ,13 + ,23 + ,23 + ,17 + ,22 + ,22 + ,22 + ,125 + ,1 + ,1 + ,13 + ,11 + ,16 + ,19 + ,15 + ,20 + ,18 + ,23 + ,104 + ,1 + ,0 + ,9 + ,20 + ,23 + ,23 + ,22 + ,23 + ,24 + ,22 + ,130 + ,1 + ,0 + ,15 + ,10 + ,11 + ,12 + ,9 + ,22 + ,15 + ,20 + ,79 + ,1 + ,0 + ,15 + ,15 + ,18 + ,16 + ,13 + ,24 + ,18 + ,23 + ,108 + ,1 + ,0 + ,15 + ,12 + ,24 + ,23 + ,20 + ,23 + ,26 + ,25 + ,136 + ,1 + ,1 + ,16 + ,14 + ,23 + ,13 + ,14 + ,22 + ,11 + ,23 + ,98 + ,1 + ,1 + ,11 + ,23 + ,21 + ,22 + ,14 + ,26 + ,26 + ,22 + ,120 + ,1 + ,0 + ,14 + ,14 + ,16 + ,18 + ,12 + ,23 + ,21 + ,25 + ,108 + ,1 + ,0 + ,11 + ,16 + ,24 + ,23 + ,20 + ,27 + ,23 + ,26 + ,139 + ,1 + ,1 + ,15 + ,11 + ,23 + ,20 + ,20 + ,23 + ,23 + ,22 + ,123 + ,1 + ,1 + ,13 + ,12 + ,18 + ,10 + ,8 + ,21 + ,15 + ,24 + ,90 + ,1 + ,1 + ,15 + ,10 + ,20 + ,17 + ,17 + ,26 + ,22 + ,24 + ,119 + ,1 + ,1 + ,16 + ,14 + ,9 + ,18 + ,9 + ,23 + ,26 + ,25 + ,105 + ,1 + ,0 + ,14 + ,12 + ,24 + ,15 + ,18 + ,21 + ,16 + ,20 + ,110 + ,1 + ,1 + ,15 + ,12 + ,25 + ,23 + ,22 + ,27 + ,20 + ,26 + ,135 + ,1 + ,1 + ,16 + ,11 + ,20 + ,17 + ,10 + ,19 + ,18 + ,21 + ,101 + ,1 + ,0 + ,16 + ,12 + ,21 + ,17 + ,13 + ,23 + ,22 + ,26 + ,114 + ,1 + ,0 + ,11 + ,13 + ,25 + ,22 + ,15 + ,25 + ,16 + ,21 + ,118 + ,1 + ,0 + ,12 + ,11 + ,22 + ,20 + ,18 + ,23 + ,19 + ,22 + ,120 + ,1 + ,0 + ,9 + ,19 + ,21 + ,20 + ,18 + ,22 + ,20 + ,16 + ,108 + ,1 + ,1 + ,16 + ,12 + ,21 + ,19 + ,12 + ,22 + ,19 + ,26 + ,114 + ,1 + ,1 + ,13 + ,17 + ,22 + ,18 + ,12 + ,25 + ,23 + ,28 + ,122 + ,1 + ,1 + ,16 + ,9 + ,27 + ,22 + ,20 + ,25 + ,24 + ,18 + ,132 + ,1 + ,0 + ,12 + ,12 + ,24 + ,20 + ,12 + ,28 + ,25 + ,25 + ,130 + ,1 + ,0 + ,9 + ,19 + ,24 + ,22 + ,16 + ,28 + ,21 + ,23 + ,130 + ,1 + ,0 + ,13 + ,18 + ,21 + ,18 + ,16 + ,20 + ,21 + ,21 + ,112 + ,1 + ,1 + ,13 + ,15 + ,18 + ,16 + ,18 + ,25 + ,23 + ,20 + ,114 + ,1 + ,1 + ,14 + ,14 + ,16 + ,16 + ,16 + ,19 + ,27 + ,25 + ,103 + ,0 + ,1 + ,19 + ,11 + ,22 + ,16 + ,13 + ,25 + ,23 + ,22 + ,115 + ,0 + ,1 + ,13 + ,9 + ,20 + ,16 + ,17 + ,22 + ,18 + ,21 + ,108 + ,0 + ,0 + ,12 + ,18 + ,18 + ,17 + ,13 + ,18 + ,16 + ,16 + ,94 + ,0 + ,1 + ,13 + ,16 + ,20 + ,18 + ,17 + ,20 + ,16 + ,18 + ,105) + ,dim=c(11 + ,162) + ,dimnames=list(c('Pop' + ,'Gender' + ,'Happiness' + ,'Depression' + ,'I1' + ,'I2' + ,'I3' + ,'E1' + ,'E2' + ,'E3' + ,'TotaleMotivatie ') + ,1:162)) > y <- array(NA,dim=c(11,162),dimnames=list(c('Pop','Gender','Happiness','Depression','I1','I2','I3','E1','E2','E3','TotaleMotivatie '),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '11' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 TotaleMotivatie\r Pop Gender Happiness Depression I1 I2 I3 E1 E2 E3 1 127 1 1 14 12 26 21 21 23 17 23 2 108 1 1 18 11 20 16 15 24 17 20 3 110 1 1 11 14 19 19 18 22 18 20 4 102 1 0 12 12 19 18 11 20 21 21 5 104 1 1 16 21 20 16 8 24 20 24 6 140 1 1 18 12 25 23 19 27 28 22 7 112 1 0 14 22 25 17 4 28 19 23 8 115 1 1 14 11 22 12 20 27 22 20 9 121 1 1 15 10 26 19 16 24 16 25 10 112 1 1 15 13 22 16 14 23 18 23 11 118 1 0 17 10 17 19 10 24 25 27 12 122 1 0 19 8 22 20 13 27 17 27 13 105 1 1 10 15 19 13 14 27 14 22 14 111 1 1 16 14 24 20 8 28 11 24 15 151 1 1 18 10 26 27 23 27 27 25 16 106 1 0 14 14 21 17 11 23 20 22 17 100 1 1 14 14 13 8 9 24 22 28 18 149 1 0 17 11 26 25 24 28 22 28 19 122 1 0 14 10 20 26 5 27 21 27 20 115 1 1 16 13 22 13 15 25 23 25 21 86 1 0 18 7 14 19 5 19 17 16 22 124 1 1 11 14 21 15 19 24 24 28 23 69 1 1 14 12 7 5 6 20 14 21 24 117 1 0 12 14 23 16 13 28 17 24 25 113 1 1 17 11 17 14 11 26 23 27 26 123 1 1 9 9 25 24 17 23 24 14 27 123 1 1 16 11 25 24 17 23 24 14 28 84 1 1 14 15 19 9 5 20 8 27 29 97 1 0 15 14 20 19 9 11 22 20 30 121 1 1 11 13 23 19 15 24 23 21 31 132 1 0 16 9 22 25 17 25 25 22 32 119 1 1 13 15 22 19 17 23 21 21 33 98 1 1 17 10 21 18 20 18 24 12 34 87 1 0 15 11 15 15 12 20 15 20 35 101 1 0 14 13 20 12 7 20 22 24 36 115 1 0 16 8 22 21 16 24 21 19 37 109 1 1 9 20 18 12 7 23 25 28 38 109 1 0 15 12 20 15 14 25 16 23 39 159 1 0 17 10 28 28 24 28 28 27 40 129 1 1 13 10 22 25 15 26 23 22 41 119 1 1 15 9 18 19 15 26 21 27 42 119 1 1 16 14 23 20 10 23 21 26 43 122 1 1 16 8 20 24 14 22 26 22 44 131 1 0 12 14 25 26 18 24 22 21 45 120 1 0 12 11 26 25 12 21 21 19 46 82 1 1 11 13 15 12 9 20 18 24 47 86 1 0 15 9 17 12 9 22 12 19 48 105 1 0 15 11 23 15 8 20 25 26 49 114 1 1 17 15 21 17 18 25 17 22 50 100 1 0 13 11 13 14 10 20 24 28 51 100 1 1 16 10 18 16 17 22 15 21 52 99 1 1 14 14 19 11 14 23 13 23 53 132 1 1 11 18 22 20 16 25 26 28 54 82 1 1 12 14 16 11 10 23 16 10 55 132 1 0 12 11 24 22 19 23 24 24 56 107 1 1 15 12 18 20 10 22 21 21 57 114 1 1 16 13 20 19 14 24 20 21 58 110 1 1 15 9 24 17 10 25 14 24 59 105 1 0 12 10 14 21 4 21 25 24 60 121 1 0 12 15 22 23 19 12 25 25 61 109 1 1 8 20 24 18 9 17 20 25 62 106 1 1 13 12 18 17 12 20 22 23 63 124 1 1 11 12 21 27 16 23 20 21 64 120 1 0 14 14 23 25 11 23 26 16 65 91 1 1 15 13 17 19 18 20 18 17 66 126 1 0 10 11 22 22 11 28 22 25 67 138 1 0 11 17 24 24 24 24 24 24 68 118 1 0 12 12 21 20 17 24 17 23 69 128 1 1 15 13 22 19 18 24 24 25 70 98 1 1 15 14 16 11 9 24 20 23 71 133 1 1 14 13 21 22 19 28 19 28 72 130 1 0 16 15 23 22 18 25 20 26 73 103 1 0 15 13 22 16 12 21 15 22 74 124 1 1 15 10 24 20 23 25 23 19 75 142 1 1 13 11 24 24 22 25 26 26 76 96 1 1 12 19 16 16 14 18 22 18 77 93 1 1 17 13 16 16 14 17 20 18 78 129 1 0 13 17 21 22 16 26 24 25 79 150 1 0 15 13 26 24 23 28 26 27 80 88 1 0 13 9 15 16 7 21 21 12 81 125 1 0 15 11 25 27 10 27 25 15 82 92 1 1 16 10 18 11 12 22 13 21 83 0 1 0 15 9 23 21 12 21 20 23 84 117 1 1 16 12 20 20 12 25 22 22 85 112 1 0 15 12 17 20 17 22 23 21 86 144 1 0 14 13 25 27 21 23 28 24 87 130 1 1 15 13 24 20 16 26 22 27 88 87 1 1 14 12 17 12 11 19 20 22 89 92 1 1 13 15 19 8 14 25 6 28 90 114 1 1 7 22 20 21 13 21 21 26 91 81 1 1 17 13 15 18 9 13 20 10 92 127 1 0 13 15 27 24 19 24 18 19 93 115 1 1 15 13 22 16 13 25 23 22 94 123 1 1 14 15 23 18 19 26 20 21 95 115 1 1 13 10 16 20 13 25 24 24 96 117 1 1 16 11 19 20 13 25 22 25 97 117 1 0 12 16 25 19 13 22 21 21 98 103 1 1 14 11 19 17 14 21 18 20 99 108 1 0 17 11 19 16 12 23 21 21 100 139 1 0 15 10 26 26 22 25 23 24 101 113 1 1 17 10 21 15 11 24 23 23 102 97 1 0 12 16 20 22 5 21 15 18 103 117 1 1 16 12 24 17 18 21 21 24 104 133 1 1 11 11 22 23 19 25 24 24 105 115 1 0 15 16 20 21 14 22 23 19 106 103 1 1 9 19 18 19 15 20 21 20 107 95 1 0 16 11 18 14 12 20 21 18 108 117 1 1 15 16 24 17 19 23 20 20 109 113 1 1 10 15 24 12 15 28 11 27 110 127 1 1 10 24 22 24 17 23 22 23 111 126 1 1 15 14 23 18 8 28 27 26 112 119 1 1 11 15 22 20 10 24 25 23 113 97 1 1 13 11 20 16 12 18 18 17 114 105 1 1 14 15 18 20 12 20 20 21 115 140 1 1 18 12 25 22 20 28 24 25 116 91 1 0 16 10 18 12 12 21 10 23 117 112 1 1 14 14 16 16 12 21 27 27 118 113 1 1 14 13 20 17 14 25 21 24 119 102 1 0 14 9 19 22 6 19 21 20 120 92 1 1 14 15 15 12 10 18 18 27 121 98 1 1 12 15 19 14 18 21 15 21 122 122 1 1 14 14 19 23 18 22 24 24 123 100 1 1 15 11 16 15 7 24 22 21 124 84 1 1 15 8 17 17 18 15 14 15 125 142 1 1 15 11 28 28 9 28 28 25 126 124 1 0 13 11 23 20 17 26 18 25 127 137 1 1 17 8 25 23 22 23 26 22 128 105 1 1 17 10 20 13 11 26 17 24 129 106 1 0 19 11 17 18 15 20 19 21 130 125 1 0 15 13 23 23 17 22 22 22 131 104 1 1 13 11 16 19 15 20 18 23 132 130 1 0 9 20 23 23 22 23 24 22 133 79 1 0 15 10 11 12 9 22 15 20 134 108 1 0 15 15 18 16 13 24 18 23 135 136 1 0 15 12 24 23 20 23 26 25 136 98 1 1 16 14 23 13 14 22 11 23 137 120 1 1 11 23 21 22 14 26 26 22 138 108 1 0 14 14 16 18 12 23 21 25 139 139 1 0 11 16 24 23 20 27 23 26 140 123 1 1 15 11 23 20 20 23 23 22 141 90 1 1 13 12 18 10 8 21 15 24 142 119 1 1 15 10 20 17 17 26 22 24 143 105 1 1 16 14 9 18 9 23 26 25 144 110 1 0 14 12 24 15 18 21 16 20 145 135 1 1 15 12 25 23 22 27 20 26 146 101 1 1 16 11 20 17 10 19 18 21 147 114 1 0 16 12 21 17 13 23 22 26 148 118 1 0 11 13 25 22 15 25 16 21 149 120 1 0 12 11 22 20 18 23 19 22 150 108 1 0 9 19 21 20 18 22 20 16 151 114 1 1 16 12 21 19 12 22 19 26 152 122 1 1 13 17 22 18 12 25 23 28 153 132 1 1 16 9 27 22 20 25 24 18 154 130 1 0 12 12 24 20 12 28 25 25 155 130 1 0 9 19 24 22 16 28 21 23 156 112 1 0 13 18 21 18 16 20 21 21 157 114 1 1 13 15 18 16 18 25 23 20 158 103 1 1 14 14 16 16 16 19 27 25 159 115 0 1 19 11 22 16 13 25 23 22 160 108 0 1 13 9 20 16 17 22 18 21 161 94 0 0 12 18 18 17 13 18 16 16 162 105 0 1 13 16 20 18 17 20 16 18 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Pop Gender Happiness Depression I1 -17.46112 -1.70970 0.71523 0.09665 0.33439 0.87259 I2 I3 E1 E2 E3 1.08065 0.96584 1.53094 0.98017 0.83492 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -110.598 -0.721 0.865 2.424 8.260 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -17.46112 11.11299 -1.571 0.118221 Pop -1.70970 4.89002 -0.350 0.727104 Gender 0.71523 1.63364 0.438 0.662145 Happiness 0.09665 0.38682 0.250 0.803029 Depression 0.33439 0.28884 1.158 0.248803 I1 0.87259 0.30114 2.898 0.004320 ** I2 1.08065 0.27197 3.973 0.000109 *** I3 0.96584 0.19827 4.871 2.77e-06 *** E1 1.53094 0.29239 5.236 5.41e-07 *** E2 0.98017 0.22685 4.321 2.81e-05 *** E3 0.83492 0.23575 3.542 0.000529 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.488 on 151 degrees of freedom Multiple R-squared: 0.7507, Adjusted R-squared: 0.7342 F-statistic: 45.47 on 10 and 151 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,] 2.396965e-02 4.793931e-02 9.760303e-01 [2,] 5.358602e-03 1.071720e-02 9.946414e-01 [3,] 1.454378e-03 2.908756e-03 9.985456e-01 [4,] 3.429974e-04 6.859948e-04 9.996570e-01 [5,] 6.377881e-05 1.275576e-04 9.999362e-01 [6,] 1.215347e-05 2.430694e-05 9.999878e-01 [7,] 4.493845e-06 8.987691e-06 9.999955e-01 [8,] 1.002328e-06 2.004656e-06 9.999990e-01 [9,] 1.708316e-07 3.416632e-07 9.999998e-01 [10,] 2.979455e-08 5.958911e-08 1.000000e+00 [11,] 6.379679e-09 1.275936e-08 1.000000e+00 [12,] 1.028377e-09 2.056754e-09 1.000000e+00 [13,] 3.016338e-10 6.032676e-10 1.000000e+00 [14,] 5.382493e-11 1.076499e-10 1.000000e+00 [15,] 1.373883e-11 2.747767e-11 1.000000e+00 [16,] 7.898201e-12 1.579640e-11 1.000000e+00 [17,] 1.685704e-12 3.371409e-12 1.000000e+00 [18,] 2.720589e-13 5.441177e-13 1.000000e+00 [19,] 5.202171e-14 1.040434e-13 1.000000e+00 [20,] 1.973524e-11 3.947048e-11 1.000000e+00 [21,] 1.408324e-11 2.816649e-11 1.000000e+00 [22,] 4.515786e-12 9.031572e-12 1.000000e+00 [23,] 1.251525e-12 2.503049e-12 1.000000e+00 [24,] 2.625967e-13 5.251933e-13 1.000000e+00 [25,] 8.729591e-14 1.745918e-13 1.000000e+00 [26,] 1.918352e-14 3.836704e-14 1.000000e+00 [27,] 4.046609e-15 8.093218e-15 1.000000e+00 [28,] 2.163269e-15 4.326538e-15 1.000000e+00 [29,] 4.399776e-16 8.799551e-16 1.000000e+00 [30,] 1.027730e-16 2.055460e-16 1.000000e+00 [31,] 1.982898e-17 3.965796e-17 1.000000e+00 [32,] 3.962797e-18 7.925594e-18 1.000000e+00 [33,] 4.169134e-15 8.338268e-15 1.000000e+00 [34,] 1.091088e-15 2.182177e-15 1.000000e+00 [35,] 2.099457e-15 4.198914e-15 1.000000e+00 [36,] 5.258544e-16 1.051709e-15 1.000000e+00 [37,] 1.505439e-16 3.010877e-16 1.000000e+00 [38,] 5.430522e-17 1.086104e-16 1.000000e+00 [39,] 1.748523e-17 3.497045e-17 1.000000e+00 [40,] 4.070135e-18 8.140271e-18 1.000000e+00 [41,] 1.364610e-18 2.729220e-18 1.000000e+00 [42,] 4.392348e-19 8.784697e-19 1.000000e+00 [43,] 1.003255e-19 2.006509e-19 1.000000e+00 [44,] 2.463696e-20 4.927393e-20 1.000000e+00 [45,] 5.666983e-21 1.133397e-20 1.000000e+00 [46,] 1.498472e-21 2.996944e-21 1.000000e+00 [47,] 7.538597e-22 1.507719e-21 1.000000e+00 [48,] 2.008901e-22 4.017802e-22 1.000000e+00 [49,] 4.481938e-23 8.963876e-23 1.000000e+00 [50,] 9.940086e-24 1.988017e-23 1.000000e+00 [51,] 2.124449e-24 4.248898e-24 1.000000e+00 [52,] 1.305280e-21 2.610559e-21 1.000000e+00 [53,] 3.503427e-22 7.006854e-22 1.000000e+00 [54,] 8.133328e-23 1.626666e-22 1.000000e+00 [55,] 2.155092e-23 4.310185e-23 1.000000e+00 [56,] 6.392701e-24 1.278540e-23 1.000000e+00 [57,] 1.606283e-24 3.212566e-24 1.000000e+00 [58,] 3.569834e-25 7.139668e-25 1.000000e+00 [59,] 8.376950e-26 1.675390e-25 1.000000e+00 [60,] 2.032245e-26 4.064490e-26 1.000000e+00 [61,] 9.152698e-27 1.830540e-26 1.000000e+00 [62,] 2.043866e-27 4.087731e-27 1.000000e+00 [63,] 4.474169e-28 8.948338e-28 1.000000e+00 [64,] 9.471207e-29 1.894241e-28 1.000000e+00 [65,] 1.939863e-29 3.879727e-29 1.000000e+00 [66,] 4.162351e-30 8.324701e-30 1.000000e+00 [67,] 1.392237e-30 2.784474e-30 1.000000e+00 [68,] 2.861622e-31 5.723244e-31 1.000000e+00 [69,] 6.776949e-32 1.355390e-31 1.000000e+00 [70,] 1.000000e+00 4.009727e-37 2.004864e-37 [71,] 1.000000e+00 2.387517e-36 1.193759e-36 [72,] 1.000000e+00 1.254904e-35 6.274518e-36 [73,] 1.000000e+00 6.267700e-35 3.133850e-35 [74,] 1.000000e+00 3.788443e-34 1.894221e-34 [75,] 1.000000e+00 5.572939e-35 2.786469e-35 [76,] 1.000000e+00 3.379743e-34 1.689871e-34 [77,] 1.000000e+00 1.918552e-33 9.592759e-34 [78,] 1.000000e+00 4.862661e-33 2.431331e-33 [79,] 1.000000e+00 3.005976e-32 1.502988e-32 [80,] 1.000000e+00 1.852861e-31 9.264307e-32 [81,] 1.000000e+00 6.724312e-31 3.362156e-31 [82,] 1.000000e+00 4.049955e-30 2.024978e-30 [83,] 1.000000e+00 2.060901e-29 1.030450e-29 [84,] 1.000000e+00 1.122460e-28 5.612302e-29 [85,] 1.000000e+00 6.016848e-28 3.008424e-28 [86,] 1.000000e+00 2.839085e-27 1.419542e-27 [87,] 1.000000e+00 7.968541e-27 3.984270e-27 [88,] 1.000000e+00 2.998356e-26 1.499178e-26 [89,] 1.000000e+00 1.527642e-25 7.638211e-26 [90,] 1.000000e+00 7.524107e-25 3.762053e-25 [91,] 1.000000e+00 1.789482e-24 8.947410e-25 [92,] 1.000000e+00 8.426930e-24 4.213465e-24 [93,] 1.000000e+00 3.357065e-23 1.678533e-23 [94,] 1.000000e+00 1.458835e-22 7.294174e-23 [95,] 1.000000e+00 7.574977e-22 3.787488e-22 [96,] 1.000000e+00 2.444229e-21 1.222115e-21 [97,] 1.000000e+00 4.816776e-21 2.408388e-21 [98,] 1.000000e+00 2.462549e-20 1.231275e-20 [99,] 1.000000e+00 1.112118e-19 5.560592e-20 [100,] 1.000000e+00 1.664292e-19 8.321460e-20 [101,] 1.000000e+00 7.414280e-19 3.707140e-19 [102,] 1.000000e+00 3.467291e-18 1.733646e-18 [103,] 1.000000e+00 1.687604e-17 8.438018e-18 [104,] 1.000000e+00 6.109083e-17 3.054542e-17 [105,] 1.000000e+00 2.774765e-16 1.387383e-16 [106,] 1.000000e+00 1.191833e-15 5.959165e-16 [107,] 1.000000e+00 4.747067e-15 2.373534e-15 [108,] 1.000000e+00 2.137528e-14 1.068764e-14 [109,] 1.000000e+00 9.874354e-14 4.937177e-14 [110,] 1.000000e+00 3.430358e-13 1.715179e-13 [111,] 1.000000e+00 3.313974e-13 1.656987e-13 [112,] 1.000000e+00 1.196190e-12 5.980950e-13 [113,] 1.000000e+00 5.377920e-12 2.688960e-12 [114,] 1.000000e+00 1.840591e-11 9.202955e-12 [115,] 1.000000e+00 8.241946e-11 4.120973e-11 [116,] 1.000000e+00 3.212675e-10 1.606338e-10 [117,] 1.000000e+00 1.341899e-09 6.709495e-10 [118,] 1.000000e+00 5.560977e-09 2.780488e-09 [119,] 1.000000e+00 2.184780e-08 1.092390e-08 [120,] 1.000000e+00 1.158053e-08 5.790264e-09 [121,] 1.000000e+00 4.895716e-08 2.447858e-08 [122,] 9.999999e-01 1.537544e-07 7.687719e-08 [123,] 9.999998e-01 3.127290e-07 1.563645e-07 [124,] 9.999998e-01 4.786667e-07 2.393333e-07 [125,] 9.999991e-01 1.725048e-06 8.625240e-07 [126,] 9.999984e-01 3.277365e-06 1.638682e-06 [127,] 9.999928e-01 1.430231e-05 7.151155e-06 [128,] 9.999758e-01 4.832010e-05 2.416005e-05 [129,] 9.999091e-01 1.818618e-04 9.093089e-05 [130,] 9.997904e-01 4.191827e-04 2.095913e-04 [131,] 9.992862e-01 1.427548e-03 7.137741e-04 [132,] 9.974823e-01 5.035456e-03 2.517728e-03 [133,] 9.916013e-01 1.679747e-02 8.398733e-03 [134,] 9.768914e-01 4.621710e-02 2.310855e-02 [135,] 9.773884e-01 4.522323e-02 2.261162e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1f1z31355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2yryi1355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3fqpj1355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/44ryx1355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/5wdq71355063178.ps",horizontal=F,onefile=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 = 162 Frequency = 1 1 2 3 4 5 3.34837143 1.70385549 0.19206142 0.60744617 -4.96602633 6 7 8 9 10 0.53407067 -2.28078042 -2.65496526 2.69042603 2.59170638 11 12 13 14 15 3.36942351 2.75227316 -0.10223169 -0.74050760 1.61968791 16 17 18 19 20 -1.36674072 2.05556346 2.15779037 1.63411146 -1.86137263 21 22 23 24 25 4.40305547 0.18143161 2.90890136 0.84632878 0.65567801 26 27 28 29 30 2.98192142 1.63655794 3.94932930 8.26031791 2.13599076 31 32 33 34 35 2.83632651 1.70607140 -6.72442685 -1.86571717 5.06952902 36 37 38 39 40 -0.58446850 1.36902125 2.36563464 2.45895506 1.43774568 41 42 43 44 45 -0.66113108 2.38357797 1.79149909 1.19305392 4.44216816 46 47 48 49 50 -8.00379972 2.91091893 -1.79425740 -1.58861257 0.58427981 51 52 53 54 55 -1.76765718 2.27584620 -0.02573635 -0.13626205 4.49144535 56 57 58 59 60 1.21750782 1.17684484 2.99069138 4.20179306 7.84362221 61 62 63 64 65 4.40571107 2.13295802 2.07593653 1.37135235 -11.54834986 66 67 68 69 70 1.62742749 0.06027807 3.03297434 2.40459926 0.23409058 71 72 73 74 75 0.43837806 1.79465414 3.07591956 -3.78854752 1.92867677 76 77 78 79 80 -1.98052725 0.03383012 -0.52398017 1.64306088 3.01234819 81 82 83 84 85 0.02856728 2.42516293 -110.59811842 1.03608599 -0.91590638 86 87 88 89 90 3.50113758 0.73907352 -5.39580550 -2.09522698 -2.72021332 91 92 93 94 95 4.37742284 1.80278400 -0.57023753 0.27314671 -1.11080547 96 97 98 99 100 -1.22752437 2.96010057 1.46089783 3.06122271 0.48883853 101 102 103 104 105 2.82058707 1.72454908 0.42668423 2.47552509 1.61545631 106 107 108 109 110 -4.39509671 0.28933763 -0.52211389 0.88458707 -1.06677071 111 112 113 114 115 0.03754564 0.45819777 4.79486136 0.42133378 0.53385735 116 117 118 119 120 3.86134584 0.42191886 -2.48439615 4.28977895 0.62872859 121 122 123 124 125 -3.19920084 -1.64118263 0.55584669 -1.46989599 0.76013271 126 127 128 129 130 1.81365264 4.15484218 -0.16130376 4.10740451 3.41743051 131 132 133 134 135 1.07436493 -1.66388676 -2.96333155 1.56343650 3.02534256 136 137 138 139 140 -1.07787174 -9.57615728 -0.53519069 1.05622370 -0.79569443 141 142 143 144 145 2.05621954 -0.98650673 -0.33888098 4.73703632 -2.57183719 146 147 148 149 150 4.48532852 -0.12295415 0.19430940 3.93445039 -4.01786347 151 152 153 154 155 2.43778472 -0.91946839 2.42238864 1.60950255 -0.87546800 156 157 158 159 160 1.93002714 -1.71472836 -7.70975034 -1.99776640 0.46131229 161 162 1.05024059 0.48621352 > postscript(file="/var/wessaorg/rcomp/tmp/6ud5d1355063178.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 3.34837143 NA 1 1.70385549 3.34837143 2 0.19206142 1.70385549 3 0.60744617 0.19206142 4 -4.96602633 0.60744617 5 0.53407067 -4.96602633 6 -2.28078042 0.53407067 7 -2.65496526 -2.28078042 8 2.69042603 -2.65496526 9 2.59170638 2.69042603 10 3.36942351 2.59170638 11 2.75227316 3.36942351 12 -0.10223169 2.75227316 13 -0.74050760 -0.10223169 14 1.61968791 -0.74050760 15 -1.36674072 1.61968791 16 2.05556346 -1.36674072 17 2.15779037 2.05556346 18 1.63411146 2.15779037 19 -1.86137263 1.63411146 20 4.40305547 -1.86137263 21 0.18143161 4.40305547 22 2.90890136 0.18143161 23 0.84632878 2.90890136 24 0.65567801 0.84632878 25 2.98192142 0.65567801 26 1.63655794 2.98192142 27 3.94932930 1.63655794 28 8.26031791 3.94932930 29 2.13599076 8.26031791 30 2.83632651 2.13599076 31 1.70607140 2.83632651 32 -6.72442685 1.70607140 33 -1.86571717 -6.72442685 34 5.06952902 -1.86571717 35 -0.58446850 5.06952902 36 1.36902125 -0.58446850 37 2.36563464 1.36902125 38 2.45895506 2.36563464 39 1.43774568 2.45895506 40 -0.66113108 1.43774568 41 2.38357797 -0.66113108 42 1.79149909 2.38357797 43 1.19305392 1.79149909 44 4.44216816 1.19305392 45 -8.00379972 4.44216816 46 2.91091893 -8.00379972 47 -1.79425740 2.91091893 48 -1.58861257 -1.79425740 49 0.58427981 -1.58861257 50 -1.76765718 0.58427981 51 2.27584620 -1.76765718 52 -0.02573635 2.27584620 53 -0.13626205 -0.02573635 54 4.49144535 -0.13626205 55 1.21750782 4.49144535 56 1.17684484 1.21750782 57 2.99069138 1.17684484 58 4.20179306 2.99069138 59 7.84362221 4.20179306 60 4.40571107 7.84362221 61 2.13295802 4.40571107 62 2.07593653 2.13295802 63 1.37135235 2.07593653 64 -11.54834986 1.37135235 65 1.62742749 -11.54834986 66 0.06027807 1.62742749 67 3.03297434 0.06027807 68 2.40459926 3.03297434 69 0.23409058 2.40459926 70 0.43837806 0.23409058 71 1.79465414 0.43837806 72 3.07591956 1.79465414 73 -3.78854752 3.07591956 74 1.92867677 -3.78854752 75 -1.98052725 1.92867677 76 0.03383012 -1.98052725 77 -0.52398017 0.03383012 78 1.64306088 -0.52398017 79 3.01234819 1.64306088 80 0.02856728 3.01234819 81 2.42516293 0.02856728 82 -110.59811842 2.42516293 83 1.03608599 -110.59811842 84 -0.91590638 1.03608599 85 3.50113758 -0.91590638 86 0.73907352 3.50113758 87 -5.39580550 0.73907352 88 -2.09522698 -5.39580550 89 -2.72021332 -2.09522698 90 4.37742284 -2.72021332 91 1.80278400 4.37742284 92 -0.57023753 1.80278400 93 0.27314671 -0.57023753 94 -1.11080547 0.27314671 95 -1.22752437 -1.11080547 96 2.96010057 -1.22752437 97 1.46089783 2.96010057 98 3.06122271 1.46089783 99 0.48883853 3.06122271 100 2.82058707 0.48883853 101 1.72454908 2.82058707 102 0.42668423 1.72454908 103 2.47552509 0.42668423 104 1.61545631 2.47552509 105 -4.39509671 1.61545631 106 0.28933763 -4.39509671 107 -0.52211389 0.28933763 108 0.88458707 -0.52211389 109 -1.06677071 0.88458707 110 0.03754564 -1.06677071 111 0.45819777 0.03754564 112 4.79486136 0.45819777 113 0.42133378 4.79486136 114 0.53385735 0.42133378 115 3.86134584 0.53385735 116 0.42191886 3.86134584 117 -2.48439615 0.42191886 118 4.28977895 -2.48439615 119 0.62872859 4.28977895 120 -3.19920084 0.62872859 121 -1.64118263 -3.19920084 122 0.55584669 -1.64118263 123 -1.46989599 0.55584669 124 0.76013271 -1.46989599 125 1.81365264 0.76013271 126 4.15484218 1.81365264 127 -0.16130376 4.15484218 128 4.10740451 -0.16130376 129 3.41743051 4.10740451 130 1.07436493 3.41743051 131 -1.66388676 1.07436493 132 -2.96333155 -1.66388676 133 1.56343650 -2.96333155 134 3.02534256 1.56343650 135 -1.07787174 3.02534256 136 -9.57615728 -1.07787174 137 -0.53519069 -9.57615728 138 1.05622370 -0.53519069 139 -0.79569443 1.05622370 140 2.05621954 -0.79569443 141 -0.98650673 2.05621954 142 -0.33888098 -0.98650673 143 4.73703632 -0.33888098 144 -2.57183719 4.73703632 145 4.48532852 -2.57183719 146 -0.12295415 4.48532852 147 0.19430940 -0.12295415 148 3.93445039 0.19430940 149 -4.01786347 3.93445039 150 2.43778472 -4.01786347 151 -0.91946839 2.43778472 152 2.42238864 -0.91946839 153 1.60950255 2.42238864 154 -0.87546800 1.60950255 155 1.93002714 -0.87546800 156 -1.71472836 1.93002714 157 -7.70975034 -1.71472836 158 -1.99776640 -7.70975034 159 0.46131229 -1.99776640 160 1.05024059 0.46131229 161 0.48621352 1.05024059 162 NA 0.48621352 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.70385549 3.34837143 [2,] 0.19206142 1.70385549 [3,] 0.60744617 0.19206142 [4,] -4.96602633 0.60744617 [5,] 0.53407067 -4.96602633 [6,] -2.28078042 0.53407067 [7,] -2.65496526 -2.28078042 [8,] 2.69042603 -2.65496526 [9,] 2.59170638 2.69042603 [10,] 3.36942351 2.59170638 [11,] 2.75227316 3.36942351 [12,] -0.10223169 2.75227316 [13,] -0.74050760 -0.10223169 [14,] 1.61968791 -0.74050760 [15,] -1.36674072 1.61968791 [16,] 2.05556346 -1.36674072 [17,] 2.15779037 2.05556346 [18,] 1.63411146 2.15779037 [19,] -1.86137263 1.63411146 [20,] 4.40305547 -1.86137263 [21,] 0.18143161 4.40305547 [22,] 2.90890136 0.18143161 [23,] 0.84632878 2.90890136 [24,] 0.65567801 0.84632878 [25,] 2.98192142 0.65567801 [26,] 1.63655794 2.98192142 [27,] 3.94932930 1.63655794 [28,] 8.26031791 3.94932930 [29,] 2.13599076 8.26031791 [30,] 2.83632651 2.13599076 [31,] 1.70607140 2.83632651 [32,] -6.72442685 1.70607140 [33,] -1.86571717 -6.72442685 [34,] 5.06952902 -1.86571717 [35,] -0.58446850 5.06952902 [36,] 1.36902125 -0.58446850 [37,] 2.36563464 1.36902125 [38,] 2.45895506 2.36563464 [39,] 1.43774568 2.45895506 [40,] -0.66113108 1.43774568 [41,] 2.38357797 -0.66113108 [42,] 1.79149909 2.38357797 [43,] 1.19305392 1.79149909 [44,] 4.44216816 1.19305392 [45,] -8.00379972 4.44216816 [46,] 2.91091893 -8.00379972 [47,] -1.79425740 2.91091893 [48,] -1.58861257 -1.79425740 [49,] 0.58427981 -1.58861257 [50,] -1.76765718 0.58427981 [51,] 2.27584620 -1.76765718 [52,] -0.02573635 2.27584620 [53,] -0.13626205 -0.02573635 [54,] 4.49144535 -0.13626205 [55,] 1.21750782 4.49144535 [56,] 1.17684484 1.21750782 [57,] 2.99069138 1.17684484 [58,] 4.20179306 2.99069138 [59,] 7.84362221 4.20179306 [60,] 4.40571107 7.84362221 [61,] 2.13295802 4.40571107 [62,] 2.07593653 2.13295802 [63,] 1.37135235 2.07593653 [64,] -11.54834986 1.37135235 [65,] 1.62742749 -11.54834986 [66,] 0.06027807 1.62742749 [67,] 3.03297434 0.06027807 [68,] 2.40459926 3.03297434 [69,] 0.23409058 2.40459926 [70,] 0.43837806 0.23409058 [71,] 1.79465414 0.43837806 [72,] 3.07591956 1.79465414 [73,] -3.78854752 3.07591956 [74,] 1.92867677 -3.78854752 [75,] -1.98052725 1.92867677 [76,] 0.03383012 -1.98052725 [77,] -0.52398017 0.03383012 [78,] 1.64306088 -0.52398017 [79,] 3.01234819 1.64306088 [80,] 0.02856728 3.01234819 [81,] 2.42516293 0.02856728 [82,] -110.59811842 2.42516293 [83,] 1.03608599 -110.59811842 [84,] -0.91590638 1.03608599 [85,] 3.50113758 -0.91590638 [86,] 0.73907352 3.50113758 [87,] -5.39580550 0.73907352 [88,] -2.09522698 -5.39580550 [89,] -2.72021332 -2.09522698 [90,] 4.37742284 -2.72021332 [91,] 1.80278400 4.37742284 [92,] -0.57023753 1.80278400 [93,] 0.27314671 -0.57023753 [94,] -1.11080547 0.27314671 [95,] -1.22752437 -1.11080547 [96,] 2.96010057 -1.22752437 [97,] 1.46089783 2.96010057 [98,] 3.06122271 1.46089783 [99,] 0.48883853 3.06122271 [100,] 2.82058707 0.48883853 [101,] 1.72454908 2.82058707 [102,] 0.42668423 1.72454908 [103,] 2.47552509 0.42668423 [104,] 1.61545631 2.47552509 [105,] -4.39509671 1.61545631 [106,] 0.28933763 -4.39509671 [107,] -0.52211389 0.28933763 [108,] 0.88458707 -0.52211389 [109,] -1.06677071 0.88458707 [110,] 0.03754564 -1.06677071 [111,] 0.45819777 0.03754564 [112,] 4.79486136 0.45819777 [113,] 0.42133378 4.79486136 [114,] 0.53385735 0.42133378 [115,] 3.86134584 0.53385735 [116,] 0.42191886 3.86134584 [117,] -2.48439615 0.42191886 [118,] 4.28977895 -2.48439615 [119,] 0.62872859 4.28977895 [120,] -3.19920084 0.62872859 [121,] -1.64118263 -3.19920084 [122,] 0.55584669 -1.64118263 [123,] -1.46989599 0.55584669 [124,] 0.76013271 -1.46989599 [125,] 1.81365264 0.76013271 [126,] 4.15484218 1.81365264 [127,] -0.16130376 4.15484218 [128,] 4.10740451 -0.16130376 [129,] 3.41743051 4.10740451 [130,] 1.07436493 3.41743051 [131,] -1.66388676 1.07436493 [132,] -2.96333155 -1.66388676 [133,] 1.56343650 -2.96333155 [134,] 3.02534256 1.56343650 [135,] -1.07787174 3.02534256 [136,] -9.57615728 -1.07787174 [137,] -0.53519069 -9.57615728 [138,] 1.05622370 -0.53519069 [139,] -0.79569443 1.05622370 [140,] 2.05621954 -0.79569443 [141,] -0.98650673 2.05621954 [142,] -0.33888098 -0.98650673 [143,] 4.73703632 -0.33888098 [144,] -2.57183719 4.73703632 [145,] 4.48532852 -2.57183719 [146,] -0.12295415 4.48532852 [147,] 0.19430940 -0.12295415 [148,] 3.93445039 0.19430940 [149,] -4.01786347 3.93445039 [150,] 2.43778472 -4.01786347 [151,] -0.91946839 2.43778472 [152,] 2.42238864 -0.91946839 [153,] 1.60950255 2.42238864 [154,] -0.87546800 1.60950255 [155,] 1.93002714 -0.87546800 [156,] -1.71472836 1.93002714 [157,] -7.70975034 -1.71472836 [158,] -1.99776640 -7.70975034 [159,] 0.46131229 -1.99776640 [160,] 1.05024059 0.46131229 [161,] 0.48621352 1.05024059 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.70385549 3.34837143 2 0.19206142 1.70385549 3 0.60744617 0.19206142 4 -4.96602633 0.60744617 5 0.53407067 -4.96602633 6 -2.28078042 0.53407067 7 -2.65496526 -2.28078042 8 2.69042603 -2.65496526 9 2.59170638 2.69042603 10 3.36942351 2.59170638 11 2.75227316 3.36942351 12 -0.10223169 2.75227316 13 -0.74050760 -0.10223169 14 1.61968791 -0.74050760 15 -1.36674072 1.61968791 16 2.05556346 -1.36674072 17 2.15779037 2.05556346 18 1.63411146 2.15779037 19 -1.86137263 1.63411146 20 4.40305547 -1.86137263 21 0.18143161 4.40305547 22 2.90890136 0.18143161 23 0.84632878 2.90890136 24 0.65567801 0.84632878 25 2.98192142 0.65567801 26 1.63655794 2.98192142 27 3.94932930 1.63655794 28 8.26031791 3.94932930 29 2.13599076 8.26031791 30 2.83632651 2.13599076 31 1.70607140 2.83632651 32 -6.72442685 1.70607140 33 -1.86571717 -6.72442685 34 5.06952902 -1.86571717 35 -0.58446850 5.06952902 36 1.36902125 -0.58446850 37 2.36563464 1.36902125 38 2.45895506 2.36563464 39 1.43774568 2.45895506 40 -0.66113108 1.43774568 41 2.38357797 -0.66113108 42 1.79149909 2.38357797 43 1.19305392 1.79149909 44 4.44216816 1.19305392 45 -8.00379972 4.44216816 46 2.91091893 -8.00379972 47 -1.79425740 2.91091893 48 -1.58861257 -1.79425740 49 0.58427981 -1.58861257 50 -1.76765718 0.58427981 51 2.27584620 -1.76765718 52 -0.02573635 2.27584620 53 -0.13626205 -0.02573635 54 4.49144535 -0.13626205 55 1.21750782 4.49144535 56 1.17684484 1.21750782 57 2.99069138 1.17684484 58 4.20179306 2.99069138 59 7.84362221 4.20179306 60 4.40571107 7.84362221 61 2.13295802 4.40571107 62 2.07593653 2.13295802 63 1.37135235 2.07593653 64 -11.54834986 1.37135235 65 1.62742749 -11.54834986 66 0.06027807 1.62742749 67 3.03297434 0.06027807 68 2.40459926 3.03297434 69 0.23409058 2.40459926 70 0.43837806 0.23409058 71 1.79465414 0.43837806 72 3.07591956 1.79465414 73 -3.78854752 3.07591956 74 1.92867677 -3.78854752 75 -1.98052725 1.92867677 76 0.03383012 -1.98052725 77 -0.52398017 0.03383012 78 1.64306088 -0.52398017 79 3.01234819 1.64306088 80 0.02856728 3.01234819 81 2.42516293 0.02856728 82 -110.59811842 2.42516293 83 1.03608599 -110.59811842 84 -0.91590638 1.03608599 85 3.50113758 -0.91590638 86 0.73907352 3.50113758 87 -5.39580550 0.73907352 88 -2.09522698 -5.39580550 89 -2.72021332 -2.09522698 90 4.37742284 -2.72021332 91 1.80278400 4.37742284 92 -0.57023753 1.80278400 93 0.27314671 -0.57023753 94 -1.11080547 0.27314671 95 -1.22752437 -1.11080547 96 2.96010057 -1.22752437 97 1.46089783 2.96010057 98 3.06122271 1.46089783 99 0.48883853 3.06122271 100 2.82058707 0.48883853 101 1.72454908 2.82058707 102 0.42668423 1.72454908 103 2.47552509 0.42668423 104 1.61545631 2.47552509 105 -4.39509671 1.61545631 106 0.28933763 -4.39509671 107 -0.52211389 0.28933763 108 0.88458707 -0.52211389 109 -1.06677071 0.88458707 110 0.03754564 -1.06677071 111 0.45819777 0.03754564 112 4.79486136 0.45819777 113 0.42133378 4.79486136 114 0.53385735 0.42133378 115 3.86134584 0.53385735 116 0.42191886 3.86134584 117 -2.48439615 0.42191886 118 4.28977895 -2.48439615 119 0.62872859 4.28977895 120 -3.19920084 0.62872859 121 -1.64118263 -3.19920084 122 0.55584669 -1.64118263 123 -1.46989599 0.55584669 124 0.76013271 -1.46989599 125 1.81365264 0.76013271 126 4.15484218 1.81365264 127 -0.16130376 4.15484218 128 4.10740451 -0.16130376 129 3.41743051 4.10740451 130 1.07436493 3.41743051 131 -1.66388676 1.07436493 132 -2.96333155 -1.66388676 133 1.56343650 -2.96333155 134 3.02534256 1.56343650 135 -1.07787174 3.02534256 136 -9.57615728 -1.07787174 137 -0.53519069 -9.57615728 138 1.05622370 -0.53519069 139 -0.79569443 1.05622370 140 2.05621954 -0.79569443 141 -0.98650673 2.05621954 142 -0.33888098 -0.98650673 143 4.73703632 -0.33888098 144 -2.57183719 4.73703632 145 4.48532852 -2.57183719 146 -0.12295415 4.48532852 147 0.19430940 -0.12295415 148 3.93445039 0.19430940 149 -4.01786347 3.93445039 150 2.43778472 -4.01786347 151 -0.91946839 2.43778472 152 2.42238864 -0.91946839 153 1.60950255 2.42238864 154 -0.87546800 1.60950255 155 1.93002714 -0.87546800 156 -1.71472836 1.93002714 157 -7.70975034 -1.71472836 158 -1.99776640 -7.70975034 159 0.46131229 -1.99776640 160 1.05024059 0.46131229 161 0.48621352 1.05024059 > 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/wessaorg/rcomp/tmp/745vp1355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/8pgje1355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/9g9u91355063178.ps",horizontal=F,onefile=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') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10daj81355063178.ps",horizontal=F,onefile=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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11rshp1355063178.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/wessaorg/rcomp/tmp/12uurj1355063178.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/wessaorg/rcomp/tmp/13pc3f1355063178.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/wessaorg/rcomp/tmp/14evqf1355063178.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/wessaorg/rcomp/tmp/15oe8r1355063178.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/wessaorg/rcomp/tmp/166lbj1355063178.tab") + } > > try(system("convert tmp/1f1z31355063178.ps tmp/1f1z31355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/2yryi1355063178.ps tmp/2yryi1355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/3fqpj1355063178.ps tmp/3fqpj1355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/44ryx1355063178.ps tmp/44ryx1355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/5wdq71355063178.ps tmp/5wdq71355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/6ud5d1355063178.ps tmp/6ud5d1355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/745vp1355063178.ps tmp/745vp1355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/8pgje1355063178.ps tmp/8pgje1355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/9g9u91355063178.ps tmp/9g9u91355063178.png",intern=TRUE)) character(0) > try(system("convert tmp/10daj81355063178.ps tmp/10daj81355063178.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.623 1.003 9.628