R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(15 + ,15 + ,77 + ,46 + ,10 + ,5 + ,4 + ,11 + ,12 + ,13 + ,6 + ,12 + ,9 + ,63 + ,37 + ,20 + ,6 + ,4 + ,12 + ,7 + ,11 + ,4 + ,15 + ,12 + ,73 + ,45 + ,16 + ,4 + ,10 + ,12 + ,13 + ,14 + ,6 + ,12 + ,15 + ,76 + ,46 + ,10 + ,6 + ,6 + ,11 + ,11 + ,12 + ,5 + ,14 + ,17 + ,90 + ,55 + ,8 + ,3 + ,5 + ,11 + ,16 + ,12 + ,5 + ,8 + ,14 + ,67 + ,40 + ,14 + ,10 + ,8 + ,10 + ,10 + ,6 + ,4 + ,11 + ,9 + ,69 + ,43 + ,19 + ,8 + ,9 + ,11 + ,15 + ,10 + ,5 + ,15 + ,12 + ,70 + ,43 + ,15 + ,3 + ,6 + ,9 + ,5 + ,11 + ,3 + ,4 + ,11 + ,54 + ,33 + ,23 + ,4 + ,8 + ,10 + ,4 + ,10 + ,2 + ,13 + ,13 + ,54 + ,33 + ,9 + ,3 + ,11 + ,12 + ,7 + ,12 + ,5 + ,19 + ,16 + ,76 + ,47 + ,12 + ,5 + ,6 + ,12 + ,15 + ,15 + ,6 + ,10 + ,16 + ,75 + ,44 + ,14 + ,5 + ,8 + ,12 + ,5 + ,13 + ,6 + ,15 + ,15 + ,76 + ,47 + ,13 + ,6 + ,11 + ,13 + ,16 + ,18 + ,8 + ,6 + ,10 + ,80 + ,49 + ,11 + ,5 + ,5 + ,9 + ,15 + ,11 + ,6 + ,7 + ,16 + ,89 + ,55 + ,11 + ,3 + ,10 + ,12 + ,13 + ,12 + ,3 + ,14 + ,12 + ,73 + ,43 + ,10 + ,4 + ,7 + ,12 + ,13 + ,13 + ,6 + ,16 + ,15 + ,74 + ,46 + ,12 + ,8 + ,7 + ,12 + ,15 + ,14 + ,6 + ,16 + ,13 + ,78 + ,51 + ,18 + ,8 + ,13 + ,12 + ,15 + ,16 + ,7 + ,14 + ,18 + ,76 + ,47 + ,12 + ,8 + ,10 + ,13 + ,10 + ,16 + ,8 + ,15 + ,13 + ,69 + ,42 + ,10 + ,5 + ,8 + ,11 + ,17 + ,16 + ,6 + ,14 + ,17 + ,74 + ,42 + ,15 + ,8 + ,6 + ,12 + ,14 + ,15 + ,7 + ,12 + ,14 + ,82 + ,48 + ,15 + ,2 + ,8 + ,12 + ,9 + ,13 + ,4 + ,9 + ,13 + ,77 + ,45 + ,12 + ,0 + ,7 + ,15 + ,6 + ,8 + ,4 + ,12 + ,13 + ,84 + ,51 + ,9 + ,5 + ,5 + ,11 + ,11 + ,14 + ,2 + ,14 + ,15 + ,75 + ,46 + ,11 + ,2 + ,9 + ,12 + ,13 + ,15 + ,6 + ,12 + ,13 + ,54 + ,33 + ,15 + ,7 + ,9 + ,10 + ,12 + ,13 + ,6 + ,14 + ,15 + ,79 + ,47 + ,16 + ,5 + ,11 + ,11 + ,10 + ,16 + ,6 + ,10 + ,13 + ,79 + ,47 + ,17 + ,2 + ,11 + ,13 + ,4 + ,13 + ,6 + ,14 + ,14 + ,69 + ,42 + ,12 + ,12 + ,11 + ,6 + ,13 + ,12 + ,6 + ,16 + ,13 + ,88 + ,55 + ,11 + ,7 + ,9 + ,12 + ,15 + ,15 + ,7 + ,10 + ,16 + ,57 + ,36 + ,13 + ,0 + ,7 + ,12 + ,8 + ,11 + ,4 + ,8 + ,14 + ,69 + ,42 + ,9 + ,2 + ,6 + ,10 + ,10 + ,14 + ,3 + ,12 + ,18 + ,86 + ,51 + ,11 + ,3 + ,6 + ,12 + ,8 + ,13 + ,5 + ,11 + ,15 + ,65 + ,43 + ,9 + ,0 + ,6 + ,12 + ,7 + ,13 + ,6 + ,8 + ,9 + ,66 + ,40 + ,20 + ,9 + ,5 + ,11 + ,9 + ,12 + ,4 + ,13 + ,16 + ,54 + ,33 + ,8 + ,2 + ,4 + ,9 + ,14 + ,14 + ,6 + ,11 + ,16 + ,85 + ,52 + ,12 + ,3 + ,10 + ,10 + ,5 + ,13 + ,3 + ,12 + ,17 + ,79 + ,49 + ,10 + ,1 + ,8 + ,12 + ,7 + ,12 + ,3 + ,16 + ,13 + ,84 + ,50 + ,11 + ,10 + ,6 + ,12 + ,16 + ,14 + ,6 + ,16 + ,17 + ,70 + ,43 + ,13 + ,1 + ,5 + ,11 + ,14 + ,15 + ,6 + ,13 + ,15 + ,54 + ,33 + ,13 + ,4 + ,9 + ,12 + ,16 + ,16 + ,6 + ,14 + ,14 + ,70 + ,44 + ,13 + ,6 + ,10 + ,11 + ,15 + ,15 + ,8 + ,5 + ,10 + ,54 + ,33 + ,15 + ,6 + ,6 + ,14 + ,4 + ,5 + ,2 + ,14 + ,13 + ,69 + ,41 + ,12 + ,4 + ,9 + ,10 + ,12 + ,15 + ,6 + ,13 + ,11 + ,68 + ,40 + ,13 + ,4 + ,10 + ,10 + ,8 + ,8 + ,4 + ,16 + ,11 + ,68 + ,40 + ,13 + ,7 + ,6 + ,11 + ,17 + ,16 + ,7 + ,14 + ,16 + ,71 + ,41 + ,9 + ,7 + ,6 + ,11 + ,15 + ,16 + ,6 + ,15 + ,16 + ,71 + ,41 + ,9 + ,7 + ,6 + ,11 + ,16 + ,14 + ,6 + ,15 + ,11 + ,66 + ,42 + ,14 + ,0 + ,13 + ,10 + ,12 + ,16 + ,6 + ,11 + ,15 + ,67 + ,42 + ,9 + ,3 + ,8 + ,10 + ,12 + ,14 + ,5 + ,15 + ,15 + ,71 + ,45 + ,9 + ,8 + ,10 + ,12 + ,13 + ,13 + ,6 + ,16 + ,12 + ,54 + ,33 + ,15 + ,8 + ,5 + ,11 + ,14 + ,14 + ,6 + ,13 + ,17 + ,76 + ,46 + ,10 + ,10 + ,8 + ,8 + ,14 + ,14 + ,5 + ,11 + ,15 + ,77 + ,47 + ,13 + ,11 + ,6 + ,12 + ,15 + ,12 + ,6 + ,12 + ,16 + ,71 + ,44 + ,8 + ,6 + ,9 + ,10 + ,14 + ,13 + ,7 + ,12 + ,14 + ,69 + ,44 + ,15 + ,2 + ,9 + ,7 + ,11 + ,15 + ,5 + ,10 + ,17 + ,73 + ,46 + ,13 + ,6 + ,7 + ,11 + ,13 + ,15 + ,6 + ,8 + ,10 + ,46 + ,30 + ,24 + ,1 + ,20 + ,7 + ,4 + ,13 + ,6 + ,9 + ,11 + ,66 + ,42 + ,11 + ,5 + ,8 + ,11 + ,8 + ,10 + ,4 + ,12 + ,15 + ,77 + ,46 + ,13 + ,4 + ,8 + ,8 + ,13 + ,13 + ,5 + ,14 + ,15 + ,77 + ,46 + ,12 + ,6 + ,7 + ,11 + ,15 + ,14 + ,6 + ,12 + ,7 + ,70 + ,43 + ,22 + ,6 + ,7 + ,12 + ,15 + ,13 + ,6 + ,11 + ,17 + ,86 + ,52 + ,11 + ,4 + ,10 + ,8 + ,8 + ,13 + ,4 + ,14 + ,14 + ,38 + ,11 + ,15 + ,1 + ,5 + ,14 + ,17 + ,18 + ,6 + ,7 + ,18 + ,66 + ,41 + ,7 + ,6 + ,8 + ,14 + ,12 + ,12 + ,4 + ,16 + ,14 + ,75 + ,45 + ,14 + ,7 + ,9 + ,11 + ,13 + ,14 + ,7 + ,16 + ,12 + ,80 + ,49 + ,19 + ,7 + ,9 + ,12 + ,14 + ,16 + ,8 + ,11 + ,14 + ,64 + ,41 + ,10 + ,2 + ,20 + ,14 + ,7 + ,13 + ,6 + ,16 + ,9 + ,80 + ,47 + ,9 + ,7 + ,6 + ,9 + ,16 + ,16 + ,6 + ,13 + ,14 + ,86 + ,53 + ,12 + ,8 + ,10 + ,13 + ,11 + ,15 + ,6 + ,11 + ,11 + ,54 + ,35 + ,16 + ,5 + ,11 + ,8 + ,10 + ,14 + ,5 + ,13 + ,16 + ,74 + ,45 + ,13 + ,4 + ,7 + ,11 + ,14 + ,13 + ,6 + ,14 + ,17 + ,88 + ,54 + ,11 + ,2 + ,12 + ,9 + ,19 + ,12 + ,6 + ,15 + ,16 + ,85 + ,53 + ,12 + ,0 + ,12 + ,12 + ,14 + ,16 + ,4 + ,10 + ,12 + ,63 + ,36 + ,11 + ,7 + ,8 + ,7 + ,8 + ,9 + ,5 + ,15 + ,15 + ,81 + ,48 + ,13 + ,0 + ,6 + ,11 + ,15 + ,15 + ,8 + ,11 + ,15 + ,81 + ,48 + ,13 + ,5 + ,6 + ,12 + ,8 + ,16 + ,6 + ,11 + ,15 + ,74 + ,45 + ,10 + ,3 + ,9 + ,11 + ,8 + ,12 + ,6 + ,6 + ,16 + ,80 + ,47 + ,11 + ,3 + ,5 + ,12 + ,6 + ,11 + ,2 + ,11 + ,16 + ,80 + ,49 + ,9 + ,3 + ,11 + ,9 + ,7 + ,13 + ,2 + ,12 + ,11 + ,60 + ,38 + ,13 + ,3 + ,6 + ,11 + ,16 + ,13 + ,4 + ,13 + ,15 + ,65 + ,40 + ,15 + ,7 + ,6 + ,13 + ,15 + ,14 + ,6 + ,12 + ,12 + ,62 + ,46 + ,14 + ,6 + ,10 + ,12 + ,10 + ,15 + ,6 + ,8 + ,14 + ,63 + ,42 + ,14 + ,3 + ,8 + ,12 + ,8 + ,14 + ,5 + ,9 + ,15 + ,89 + ,54 + ,11 + ,0 + ,7 + ,11 + ,9 + ,12 + ,4 + ,10 + ,17 + ,76 + ,45 + ,10 + ,2 + ,8 + ,12 + ,8 + ,16 + ,4 + ,16 + ,19 + ,81 + ,53 + ,11 + ,0 + ,9 + ,12 + ,14 + ,14 + ,6 + ,15 + ,15 + ,72 + ,44 + ,12 + ,9 + ,8 + ,11 + ,14 + ,13 + ,5 + ,14 + ,16 + ,84 + ,51 + ,14 + ,10 + ,10 + ,11 + ,14 + ,12 + ,6 + ,12 + ,14 + ,76 + ,46 + ,14 + ,3 + ,13 + ,8 + ,15 + ,13 + ,7 + ,12 + ,16 + ,76 + ,46 + ,21 + ,7 + ,7 + ,9 + ,7 + ,12 + ,6 + ,10 + ,15 + ,78 + ,45 + ,14 + ,3 + ,7 + ,11 + ,7 + ,9 + ,4 + ,12 + ,15 + ,72 + ,44 + ,13 + ,6 + ,7 + ,12 + ,12 + ,13 + ,4 + ,8 + ,17 + ,81 + ,48 + ,11 + ,5 + ,8 + ,13 + ,7 + ,10 + ,3 + ,16 + ,12 + ,72 + ,44 + ,12 + ,0 + ,9 + ,12 + ,12 + ,15 + ,8 + ,11 + ,18 + ,78 + ,47 + ,12 + ,0 + ,9 + ,6 + ,6 + ,9 + ,4 + ,12 + ,13 + ,79 + ,47 + ,11 + ,4 + ,8 + ,12 + ,10 + ,13 + ,4 + ,9 + ,14 + ,52 + ,31 + ,14 + ,0 + ,7 + ,11 + ,12 + ,13 + ,5 + ,14 + ,14 + ,67 + ,44 + ,13 + ,0 + ,6 + ,13 + ,13 + ,13 + ,5 + ,15 + ,14 + ,74 + ,42 + ,13 + ,7 + ,8 + ,11 + ,14 + ,15 + ,7 + ,8 + ,12 + ,73 + ,41 + ,12 + ,3 + ,8 + ,12 + ,8 + ,13 + ,4 + ,12 + ,14 + ,69 + ,43 + ,14 + ,9 + ,4 + ,10 + ,14 + ,14 + ,5 + ,10 + ,12 + ,67 + ,41 + ,12 + ,4 + ,8 + ,10 + ,10 + ,11 + ,5 + ,16 + ,15 + ,76 + ,47 + ,12 + ,4 + ,10 + ,11 + ,14 + ,15 + ,8 + ,17 + ,11 + ,77 + ,45 + ,12 + ,15 + ,7 + ,11 + ,15 + ,14 + ,5 + ,8 + ,11 + ,63 + ,37 + ,18 + ,7 + ,8 + ,11 + ,10 + ,15 + ,2 + ,9 + ,15 + ,84 + ,54 + ,11 + ,8 + ,7 + ,9 + ,6 + ,12 + ,5 + ,8 + ,14 + ,90 + ,55 + ,15 + ,2 + ,10 + ,7 + ,9 + ,15 + ,4 + ,11 + ,15 + ,75 + ,45 + ,13 + ,8 + ,9 + ,11 + ,11 + ,14 + ,5 + ,16 + ,16 + ,76 + ,47 + ,11 + ,7 + ,8 + ,12 + ,16 + ,16 + ,7 + ,13 + ,12 + ,75 + ,46 + ,11 + ,3 + ,8 + ,12 + ,14 + ,14 + ,6 + ,5 + ,14 + ,53 + ,37 + ,22 + ,3 + ,5 + ,15 + ,8 + ,12 + ,3 + ,15 + ,18 + ,87 + ,53 + ,10 + ,6 + ,8 + ,11 + ,16 + ,11 + ,5 + ,15 + ,14 + ,78 + ,46 + ,11 + ,8 + ,9 + ,10 + ,16 + ,13 + ,6 + ,12 + ,13 + ,54 + ,33 + ,15 + ,5 + ,11 + ,13 + ,14 + ,12 + ,5 + ,12 + ,14 + ,58 + ,36 + ,14 + ,6 + ,7 + ,13 + ,12 + ,12 + ,6 + ,16 + ,14 + ,80 + ,49 + ,11 + ,10 + ,8 + ,11 + ,16 + ,16 + ,7 + ,12 + ,17 + ,74 + ,44 + ,10 + ,0 + ,4 + ,12 + ,15 + ,13 + ,6 + ,10 + ,12 + ,56 + ,37 + ,14 + ,5 + ,16 + ,12 + ,11 + ,12 + ,6 + ,12 + ,16 + ,82 + ,53 + ,14 + ,0 + ,9 + ,12 + ,6 + ,14 + ,5 + ,4 + ,15 + ,64 + ,40 + ,11 + ,0 + ,16 + ,8 + ,6 + ,4 + ,4 + ,11 + ,10 + ,67 + ,42 + ,15 + ,5 + ,12 + ,5 + ,16 + ,14 + ,6 + ,16 + ,13 + ,75 + ,45 + ,11 + ,10 + ,8 + ,11 + ,16 + ,15 + ,6 + ,7 + ,15 + ,69 + ,40 + ,10 + ,0 + ,4 + ,12 + ,8 + ,12 + ,3 + ,9 + ,16 + ,72 + ,44 + ,10 + ,5 + ,11 + ,12 + ,11 + ,11 + ,4 + ,14 + ,15 + ,71 + ,43 + ,16 + ,6 + ,11 + ,11 + ,12 + ,12 + ,4 + ,11 + ,14 + ,54 + ,33 + ,12 + ,1 + ,8 + ,12 + ,13 + ,11 + ,4 + ,10 + ,11 + ,68 + ,44 + ,14 + ,5 + ,8 + ,10 + ,11 + ,12 + ,5 + ,6 + ,13 + ,54 + ,33 + ,15 + ,3 + ,12 + ,7 + ,9 + ,11 + ,4 + ,14 + ,17 + ,71 + ,43 + ,10 + ,3 + ,8 + ,12 + ,15 + ,13 + ,6 + ,11 + ,14 + ,53 + ,32 + ,12 + ,6 + ,6 + ,12 + ,11 + ,12 + ,6 + ,11 + ,16 + ,54 + ,33 + ,15 + ,2 + ,8 + ,9 + ,12 + ,12 + ,4 + ,9 + ,15 + ,71 + ,43 + ,12 + ,5 + ,6 + ,11 + ,15 + ,15 + ,7 + ,16 + ,12 + ,69 + ,42 + ,11 + ,6 + ,14 + ,12 + ,8 + ,14 + ,4 + ,7 + ,16 + ,30 + ,0 + ,10 + ,2 + ,10 + ,12 + ,7 + ,12 + ,4 + ,8 + ,8 + ,53 + ,32 + ,20 + ,3 + ,5 + ,11 + ,10 + ,12 + ,4 + ,10 + ,9 + ,68 + ,41 + ,19 + ,7 + ,8 + ,11 + ,9 + ,12 + ,4 + ,14 + ,13 + ,69 + ,44 + ,17 + ,6 + ,12 + ,12 + ,13 + ,13 + ,5 + ,9 + ,19 + ,54 + ,33 + ,8 + ,3 + ,11 + ,12 + ,11 + ,11 + ,4 + ,13 + ,11 + ,66 + ,42 + ,17 + ,6 + ,8 + ,11 + ,12 + ,13 + ,7 + ,13 + ,15 + ,79 + ,46 + ,11 + ,9 + ,8 + ,12 + ,5 + ,12 + ,3 + ,12 + ,11 + ,67 + ,44 + ,13 + ,2 + ,9 + ,12 + ,12 + ,14 + ,5 + ,11 + ,15 + ,74 + ,45 + ,9 + ,5 + ,6 + ,8 + ,14 + ,15 + ,5 + ,10 + ,16 + ,86 + ,53 + ,10 + ,10 + ,5 + ,15 + ,15 + ,15 + ,6 + ,12 + ,15 + ,63 + ,38 + ,13 + ,9 + ,8 + ,11 + ,14 + ,13 + ,5 + ,14 + ,12 + ,69 + ,43 + ,16 + ,8 + ,7 + ,11 + ,13 + ,16 + ,6 + ,11 + ,16 + ,73 + ,43 + ,12 + ,8 + ,4 + ,6 + ,14 + ,17 + ,6 + ,13 + ,15 + ,69 + ,42 + ,14 + ,5 + ,9 + ,13 + ,14 + ,13 + ,3 + ,14 + ,13 + ,71 + ,42 + ,11 + ,9 + ,5 + ,12 + ,15 + ,14 + ,6 + ,13 + ,14 + ,77 + ,47 + ,13 + ,9 + ,9 + ,12 + ,13 + ,13 + ,5 + ,16 + ,11 + ,74 + ,44 + ,15 + ,14 + ,12 + ,12 + ,14 + ,16 + ,8 + ,13 + ,15 + ,82 + ,49 + ,14 + ,5 + ,6 + ,12 + ,11 + ,13 + ,6 + ,12 + ,16 + ,54 + ,33 + ,14 + ,12 + ,4 + ,12 + ,14 + ,14 + ,4 + ,9 + ,14 + ,54 + ,33 + ,14 + ,6 + ,6 + ,10 + ,11 + ,13 + ,3 + ,14 + ,13 + ,80 + ,47 + ,10 + ,6 + ,7 + ,12 + ,8 + ,14 + ,4 + ,15 + ,15 + ,76 + ,47 + ,8 + ,8 + ,9 + ,12 + ,12 + ,16 + ,7) + ,dim=c(11 + ,156) + ,dimnames=list(c('Popularity' + ,'Happiness' + ,'Belonging' + ,'Belonging_alternative' + ,'Depression' + ,'Weighted_popularity' + ,'Parental_criticism' + ,'Finding_Friends' + ,'Knowing_People' + ,'Perceived_Liked' + ,'Celebrity') + ,1:156)) > y <- array(NA,dim=c(11,156),dimnames=list(c('Popularity','Happiness','Belonging','Belonging_alternative','Depression','Weighted_popularity','Parental_criticism','Finding_Friends','Knowing_People','Perceived_Liked','Celebrity'),1:156)) > 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 = 'Do not include Seasonal 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 > 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 Popularity Happiness Belonging Belonging_alternative Depression 1 15 15 77 46 10 2 12 9 63 37 20 3 15 12 73 45 16 4 12 15 76 46 10 5 14 17 90 55 8 6 8 14 67 40 14 7 11 9 69 43 19 8 15 12 70 43 15 9 4 11 54 33 23 10 13 13 54 33 9 11 19 16 76 47 12 12 10 16 75 44 14 13 15 15 76 47 13 14 6 10 80 49 11 15 7 16 89 55 11 16 14 12 73 43 10 17 16 15 74 46 12 18 16 13 78 51 18 19 14 18 76 47 12 20 15 13 69 42 10 21 14 17 74 42 15 22 12 14 82 48 15 23 9 13 77 45 12 24 12 13 84 51 9 25 14 15 75 46 11 26 12 13 54 33 15 27 14 15 79 47 16 28 10 13 79 47 17 29 14 14 69 42 12 30 16 13 88 55 11 31 10 16 57 36 13 32 8 14 69 42 9 33 12 18 86 51 11 34 11 15 65 43 9 35 8 9 66 40 20 36 13 16 54 33 8 37 11 16 85 52 12 38 12 17 79 49 10 39 16 13 84 50 11 40 16 17 70 43 13 41 13 15 54 33 13 42 14 14 70 44 13 43 5 10 54 33 15 44 14 13 69 41 12 45 13 11 68 40 13 46 16 11 68 40 13 47 14 16 71 41 9 48 15 16 71 41 9 49 15 11 66 42 14 50 11 15 67 42 9 51 15 15 71 45 9 52 16 12 54 33 15 53 13 17 76 46 10 54 11 15 77 47 13 55 12 16 71 44 8 56 12 14 69 44 15 57 10 17 73 46 13 58 8 10 46 30 24 59 9 11 66 42 11 60 12 15 77 46 13 61 14 15 77 46 12 62 12 7 70 43 22 63 11 17 86 52 11 64 14 14 38 11 15 65 7 18 66 41 7 66 16 14 75 45 14 67 16 12 80 49 19 68 11 14 64 41 10 69 16 9 80 47 9 70 13 14 86 53 12 71 11 11 54 35 16 72 13 16 74 45 13 73 14 17 88 54 11 74 15 16 85 53 12 75 10 12 63 36 11 76 15 15 81 48 13 77 11 15 81 48 13 78 11 15 74 45 10 79 6 16 80 47 11 80 11 16 80 49 9 81 12 11 60 38 13 82 13 15 65 40 15 83 12 12 62 46 14 84 8 14 63 42 14 85 9 15 89 54 11 86 10 17 76 45 10 87 16 19 81 53 11 88 15 15 72 44 12 89 14 16 84 51 14 90 12 14 76 46 14 91 12 16 76 46 21 92 10 15 78 45 14 93 12 15 72 44 13 94 8 17 81 48 11 95 16 12 72 44 12 96 11 18 78 47 12 97 12 13 79 47 11 98 9 14 52 31 14 99 14 14 67 44 13 100 15 14 74 42 13 101 8 12 73 41 12 102 12 14 69 43 14 103 10 12 67 41 12 104 16 15 76 47 12 105 17 11 77 45 12 106 8 11 63 37 18 107 9 15 84 54 11 108 8 14 90 55 15 109 11 15 75 45 13 110 16 16 76 47 11 111 13 12 75 46 11 112 5 14 53 37 22 113 15 18 87 53 10 114 15 14 78 46 11 115 12 13 54 33 15 116 12 14 58 36 14 117 16 14 80 49 11 118 12 17 74 44 10 119 10 12 56 37 14 120 12 16 82 53 14 121 4 15 64 40 11 122 11 10 67 42 15 123 16 13 75 45 11 124 7 15 69 40 10 125 9 16 72 44 10 126 14 15 71 43 16 127 11 14 54 33 12 128 10 11 68 44 14 129 6 13 54 33 15 130 14 17 71 43 10 131 11 14 53 32 12 132 11 16 54 33 15 133 9 15 71 43 12 134 16 12 69 42 11 135 7 16 30 0 10 136 8 8 53 32 20 137 10 9 68 41 19 138 14 13 69 44 17 139 9 19 54 33 8 140 13 11 66 42 17 141 13 15 79 46 11 142 12 11 67 44 13 143 11 15 74 45 9 144 10 16 86 53 10 145 12 15 63 38 13 146 14 12 69 43 16 147 11 16 73 43 12 148 13 15 69 42 14 149 14 13 71 42 11 150 13 14 77 47 13 151 16 11 74 44 15 152 13 15 82 49 14 153 12 16 54 33 14 154 9 14 54 33 14 155 14 13 80 47 10 156 15 15 76 47 8 Weighted_popularity Parental_criticism Finding_Friends Knowing_People 1 5 4 11 12 2 6 4 12 7 3 4 10 12 13 4 6 6 11 11 5 3 5 11 16 6 10 8 10 10 7 8 9 11 15 8 3 6 9 5 9 4 8 10 4 10 3 11 12 7 11 5 6 12 15 12 5 8 12 5 13 6 11 13 16 14 5 5 9 15 15 3 10 12 13 16 4 7 12 13 17 8 7 12 15 18 8 13 12 15 19 8 10 13 10 20 5 8 11 17 21 8 6 12 14 22 2 8 12 9 23 0 7 15 6 24 5 5 11 11 25 2 9 12 13 26 7 9 10 12 27 5 11 11 10 28 2 11 13 4 29 12 11 6 13 30 7 9 12 15 31 0 7 12 8 32 2 6 10 10 33 3 6 12 8 34 0 6 12 7 35 9 5 11 9 36 2 4 9 14 37 3 10 10 5 38 1 8 12 7 39 10 6 12 16 40 1 5 11 14 41 4 9 12 16 42 6 10 11 15 43 6 6 14 4 44 4 9 10 12 45 4 10 10 8 46 7 6 11 17 47 7 6 11 15 48 7 6 11 16 49 0 13 10 12 50 3 8 10 12 51 8 10 12 13 52 8 5 11 14 53 10 8 8 14 54 11 6 12 15 55 6 9 10 14 56 2 9 7 11 57 6 7 11 13 58 1 20 7 4 59 5 8 11 8 60 4 8 8 13 61 6 7 11 15 62 6 7 12 15 63 4 10 8 8 64 1 5 14 17 65 6 8 14 12 66 7 9 11 13 67 7 9 12 14 68 2 20 14 7 69 7 6 9 16 70 8 10 13 11 71 5 11 8 10 72 4 7 11 14 73 2 12 9 19 74 0 12 12 14 75 7 8 7 8 76 0 6 11 15 77 5 6 12 8 78 3 9 11 8 79 3 5 12 6 80 3 11 9 7 81 3 6 11 16 82 7 6 13 15 83 6 10 12 10 84 3 8 12 8 85 0 7 11 9 86 2 8 12 8 87 0 9 12 14 88 9 8 11 14 89 10 10 11 14 90 3 13 8 15 91 7 7 9 7 92 3 7 11 7 93 6 7 12 12 94 5 8 13 7 95 0 9 12 12 96 0 9 6 6 97 4 8 12 10 98 0 7 11 12 99 0 6 13 13 100 7 8 11 14 101 3 8 12 8 102 9 4 10 14 103 4 8 10 10 104 4 10 11 14 105 15 7 11 15 106 7 8 11 10 107 8 7 9 6 108 2 10 7 9 109 8 9 11 11 110 7 8 12 16 111 3 8 12 14 112 3 5 15 8 113 6 8 11 16 114 8 9 10 16 115 5 11 13 14 116 6 7 13 12 117 10 8 11 16 118 0 4 12 15 119 5 16 12 11 120 0 9 12 6 121 0 16 8 6 122 5 12 5 16 123 10 8 11 16 124 0 4 12 8 125 5 11 12 11 126 6 11 11 12 127 1 8 12 13 128 5 8 10 11 129 3 12 7 9 130 3 8 12 15 131 6 6 12 11 132 2 8 9 12 133 5 6 11 15 134 6 14 12 8 135 2 10 12 7 136 3 5 11 10 137 7 8 11 9 138 6 12 12 13 139 3 11 12 11 140 6 8 11 12 141 9 8 12 5 142 2 9 12 12 143 5 6 8 14 144 10 5 15 15 145 9 8 11 14 146 8 7 11 13 147 8 4 6 14 148 5 9 13 14 149 9 5 12 15 150 9 9 12 13 151 14 12 12 14 152 5 6 12 11 153 12 4 12 14 154 6 6 10 11 155 6 7 12 8 156 8 9 12 12 Perceived_Liked Celebrity t 1 13 6 1 2 11 4 2 3 14 6 3 4 12 5 4 5 12 5 5 6 6 4 6 7 10 5 7 8 11 3 8 9 10 2 9 10 12 5 10 11 15 6 11 12 13 6 12 13 18 8 13 14 11 6 14 15 12 3 15 16 13 6 16 17 14 6 17 18 16 7 18 19 16 8 19 20 16 6 20 21 15 7 21 22 13 4 22 23 8 4 23 24 14 2 24 25 15 6 25 26 13 6 26 27 16 6 27 28 13 6 28 29 12 6 29 30 15 7 30 31 11 4 31 32 14 3 32 33 13 5 33 34 13 6 34 35 12 4 35 36 14 6 36 37 13 3 37 38 12 3 38 39 14 6 39 40 15 6 40 41 16 6 41 42 15 8 42 43 5 2 43 44 15 6 44 45 8 4 45 46 16 7 46 47 16 6 47 48 14 6 48 49 16 6 49 50 14 5 50 51 13 6 51 52 14 6 52 53 14 5 53 54 12 6 54 55 13 7 55 56 15 5 56 57 15 6 57 58 13 6 58 59 10 4 59 60 13 5 60 61 14 6 61 62 13 6 62 63 13 4 63 64 18 6 64 65 12 4 65 66 14 7 66 67 16 8 67 68 13 6 68 69 16 6 69 70 15 6 70 71 14 5 71 72 13 6 72 73 12 6 73 74 16 4 74 75 9 5 75 76 15 8 76 77 16 6 77 78 12 6 78 79 11 2 79 80 13 2 80 81 13 4 81 82 14 6 82 83 15 6 83 84 14 5 84 85 12 4 85 86 16 4 86 87 14 6 87 88 13 5 88 89 12 6 89 90 13 7 90 91 12 6 91 92 9 4 92 93 13 4 93 94 10 3 94 95 15 8 95 96 9 4 96 97 13 4 97 98 13 5 98 99 13 5 99 100 15 7 100 101 13 4 101 102 14 5 102 103 11 5 103 104 15 8 104 105 14 5 105 106 15 2 106 107 12 5 107 108 15 4 108 109 14 5 109 110 16 7 110 111 14 6 111 112 12 3 112 113 11 5 113 114 13 6 114 115 12 5 115 116 12 6 116 117 16 7 117 118 13 6 118 119 12 6 119 120 14 5 120 121 4 4 121 122 14 6 122 123 15 6 123 124 12 3 124 125 11 4 125 126 12 4 126 127 11 4 127 128 12 5 128 129 11 4 129 130 13 6 130 131 12 6 131 132 12 4 132 133 15 7 133 134 14 4 134 135 12 4 135 136 12 4 136 137 12 4 137 138 13 5 138 139 11 4 139 140 13 7 140 141 12 3 141 142 14 5 142 143 15 5 143 144 15 6 144 145 13 5 145 146 16 6 146 147 17 6 147 148 13 3 148 149 14 6 149 150 13 5 150 151 16 8 151 152 13 6 152 153 14 4 153 154 13 3 154 155 14 4 155 156 16 7 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Happiness Belonging -1.400332 -0.060189 0.071908 Belonging_alternative Depression Weighted_popularity -0.039993 -0.076095 0.094136 Parental_criticism Finding_Friends Knowing_People 0.083878 0.118164 0.230029 Perceived_Liked Celebrity t 0.344271 0.522588 -0.006399 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.191 -1.266 0.144 1.046 6.647 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.400332 2.564480 -0.546 0.585877 Happiness -0.060189 0.085851 -0.701 0.484374 Belonging 0.071908 0.051482 1.397 0.164632 Belonging_alternative -0.039993 0.073107 -0.547 0.585191 Depression -0.076095 0.063844 -1.192 0.235270 Weighted_popularity 0.094136 0.058400 1.612 0.109169 Parental_criticism 0.083878 0.065932 1.272 0.205353 Finding_Friends 0.118164 0.093894 1.258 0.210256 Knowing_People 0.230029 0.064589 3.561 0.000500 *** Perceived_Liked 0.344271 0.094193 3.655 0.000360 *** Celebrity 0.522588 0.158855 3.290 0.001261 ** t -0.006399 0.003744 -1.709 0.089591 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.024 on 144 degrees of freedom Multiple R-squared: 0.5587, Adjusted R-squared: 0.525 F-statistic: 16.58 on 11 and 144 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.9336493 0.1327014852 6.635074e-02 [2,] 0.9999306 0.0001387563 6.937813e-05 [3,] 0.9998253 0.0003493392 1.746696e-04 [4,] 0.9995788 0.0008423515 4.211758e-04 [5,] 0.9994425 0.0011150741 5.575370e-04 [6,] 0.9989417 0.0021165835 1.058292e-03 [7,] 0.9990348 0.0019304894 9.652447e-04 [8,] 0.9995673 0.0008654991 4.327495e-04 [9,] 0.9991578 0.0016843443 8.421722e-04 [10,] 0.9984453 0.0031093480 1.554674e-03 [11,] 0.9972355 0.0055289651 2.764483e-03 [12,] 0.9952679 0.0094642354 4.732118e-03 [13,] 0.9959427 0.0081146225 4.057311e-03 [14,] 0.9935169 0.0129661352 6.483068e-03 [15,] 0.9965825 0.0068350846 3.417542e-03 [16,] 0.9952172 0.0095656475 4.782824e-03 [17,] 0.9929213 0.0141573260 7.078663e-03 [18,] 0.9962843 0.0074313309 3.715665e-03 [19,] 0.9943309 0.0113382765 5.669138e-03 [20,] 0.9922774 0.0154451259 7.722563e-03 [21,] 0.9912794 0.0174412878 8.720644e-03 [22,] 0.9877578 0.0244843692 1.224218e-02 [23,] 0.9848936 0.0302127147 1.510636e-02 [24,] 0.9860231 0.0279538815 1.397694e-02 [25,] 0.9852618 0.0294764797 1.473824e-02 [26,] 0.9898364 0.0203272883 1.016364e-02 [27,] 0.9860230 0.0279540329 1.397702e-02 [28,] 0.9807785 0.0384429152 1.922146e-02 [29,] 0.9734890 0.0530219268 2.651096e-02 [30,] 0.9676904 0.0646191715 3.230959e-02 [31,] 0.9912926 0.0174148901 8.707445e-03 [32,] 0.9880137 0.0239726436 1.198632e-02 [33,] 0.9839869 0.0320262115 1.601311e-02 [34,] 0.9790217 0.0419565609 2.097828e-02 [35,] 0.9765208 0.0469583356 2.347917e-02 [36,] 0.9720103 0.0559794819 2.798974e-02 [37,] 0.9694320 0.0611360987 3.056805e-02 [38,] 0.9821390 0.0357220227 1.786101e-02 [39,] 0.9760674 0.0478652476 2.393262e-02 [40,] 0.9767379 0.0465241293 2.326206e-02 [41,] 0.9733760 0.0532479788 2.662399e-02 [42,] 0.9663856 0.0672287074 3.361435e-02 [43,] 0.9750728 0.0498543741 2.492719e-02 [44,] 0.9686047 0.0627906292 3.139531e-02 [45,] 0.9587840 0.0824319366 4.121597e-02 [46,] 0.9467447 0.1065105780 5.325529e-02 [47,] 0.9328431 0.1343138176 6.715691e-02 [48,] 0.9198991 0.1602017685 8.010088e-02 [49,] 0.9002519 0.1994961004 9.974805e-02 [50,] 0.8846228 0.2307544507 1.153772e-01 [51,] 0.9361582 0.1276835455 6.384177e-02 [52,] 0.9413024 0.1173951317 5.869757e-02 [53,] 0.9281614 0.1436771948 7.183860e-02 [54,] 0.9155660 0.1688679911 8.443400e-02 [55,] 0.8984462 0.2031075464 1.015538e-01 [56,] 0.8854602 0.2290795272 1.145398e-01 [57,] 0.8627781 0.2744438401 1.372219e-01 [58,] 0.8368683 0.3262633251 1.631317e-01 [59,] 0.8207122 0.3585755769 1.792878e-01 [60,] 0.8151383 0.3697233315 1.848617e-01 [61,] 0.7902476 0.4195048979 2.097524e-01 [62,] 0.7561521 0.4876957838 2.438479e-01 [63,] 0.7466586 0.5066828501 2.533414e-01 [64,] 0.7057337 0.5885326299 2.942663e-01 [65,] 0.7113378 0.5773244990 2.886622e-01 [66,] 0.6972041 0.6055918586 3.027959e-01 [67,] 0.6618987 0.6762026235 3.381013e-01 [68,] 0.6199649 0.7600702958 3.800351e-01 [69,] 0.5726545 0.8546910868 4.273455e-01 [70,] 0.5814237 0.8371526822 4.185763e-01 [71,] 0.5630902 0.8738195925 4.369098e-01 [72,] 0.5395088 0.9209823005 4.604912e-01 [73,] 0.5917909 0.8164181443 4.082091e-01 [74,] 0.6207437 0.7585125497 3.792563e-01 [75,] 0.5858615 0.8282770488 4.141385e-01 [76,] 0.5699168 0.8601663479 4.300832e-01 [77,] 0.5582096 0.8835807283 4.417904e-01 [78,] 0.5264658 0.9470683168 4.735342e-01 [79,] 0.4829475 0.9658949509 5.170525e-01 [80,] 0.4654655 0.9309310527 5.345345e-01 [81,] 0.4793073 0.9586146299 5.206927e-01 [82,] 0.6190567 0.7618866917 3.809433e-01 [83,] 0.5739056 0.8521887993 4.260944e-01 [84,] 0.5379113 0.9241773380 4.620887e-01 [85,] 0.6049848 0.7900304075 3.950152e-01 [86,] 0.5705912 0.8588175732 4.294088e-01 [87,] 0.5908218 0.8183563560 4.091782e-01 [88,] 0.5444238 0.9111524825 4.555762e-01 [89,] 0.4942123 0.9884246177 5.057877e-01 [90,] 0.5002204 0.9995592047 4.997796e-01 [91,] 0.5519344 0.8961312671 4.480656e-01 [92,] 0.5548922 0.8902156980 4.451078e-01 [93,] 0.5119420 0.9761159236 4.880580e-01 [94,] 0.6097246 0.7805508746 3.902754e-01 [95,] 0.5930667 0.8138665182 4.069333e-01 [96,] 0.5505773 0.8988454775 4.494227e-01 [97,] 0.4948266 0.9896531993 5.051734e-01 [98,] 0.6168093 0.7663813134 3.831907e-01 [99,] 0.6261544 0.7476912184 3.738456e-01 [100,] 0.6152355 0.7695290238 3.847645e-01 [101,] 0.5599876 0.8800247408 4.400124e-01 [102,] 0.5211389 0.9577222447 4.788611e-01 [103,] 0.4770162 0.9540323637 5.229838e-01 [104,] 0.4638834 0.9277668332 5.361166e-01 [105,] 0.4947394 0.9894787443 5.052606e-01 [106,] 0.4415309 0.8830617167 5.584691e-01 [107,] 0.4134830 0.8269659044 5.865170e-01 [108,] 0.3685878 0.7371756658 6.314122e-01 [109,] 0.4260640 0.8521280640 5.739360e-01 [110,] 0.3873901 0.7747802074 6.126099e-01 [111,] 0.4151332 0.8302663369 5.848668e-01 [112,] 0.4448626 0.8897251009 5.551374e-01 [113,] 0.4320321 0.8640642461 5.679679e-01 [114,] 0.3616136 0.7232271893 6.383864e-01 [115,] 0.5980661 0.8038677623 4.019339e-01 [116,] 0.7384688 0.5230623367 2.615312e-01 [117,] 0.7418200 0.5163599779 2.581800e-01 [118,] 0.7892672 0.4214655637 2.107328e-01 [119,] 0.7626227 0.4747545478 2.373773e-01 [120,] 0.8089580 0.3820839551 1.910420e-01 [121,] 0.7326375 0.5347249417 2.673625e-01 [122,] 0.6681749 0.6636502375 3.318251e-01 [123,] 0.7582452 0.4835096413 2.417548e-01 [124,] 0.7042372 0.5915255521 2.957628e-01 [125,] 0.6469509 0.7060981706 3.530491e-01 [126,] 0.5030940 0.9938120983 4.969060e-01 [127,] 0.4021277 0.8042553331 5.978723e-01 > postscript(file="/var/www/rcomp/tmp/131v31321616175.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/www/rcomp/tmp/20co91321616175.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/www/rcomp/tmp/3n7e41321616175.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/www/rcomp/tmp/4pe551321616175.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/www/rcomp/tmp/5x0vn1321616175.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 = 156 Frequency = 1 1 2 3 4 5 6 1.895881119 2.620427765 1.330717095 -0.178019636 0.365933615 -1.121711250 7 8 9 10 11 12 -1.123213570 6.647304648 -2.330299894 2.390933319 4.619595624 -1.448810891 13 14 15 16 17 18 -2.291412675 -7.190631352 -5.132371829 0.473251186 1.679605980 0.220125052 19 20 21 22 23 24 -1.184223080 -0.206106818 -0.659061264 0.634972150 -0.078438783 0.435413441 25 26 27 28 29 30 0.095636326 -0.039586069 0.255082604 -1.323734745 1.041293627 -0.020941910 31 32 33 34 35 36 1.169255572 -2.710391435 0.255145411 0.108760171 -2.316616832 0.876211275 37 38 39 40 41 42 0.984433103 2.214215114 0.730369634 3.021527893 -0.882268859 -1.271526173 43 44 45 46 47 48 -0.553508690 0.682492275 3.967834104 0.516979380 -0.673137972 0.791774017 49 50 51 52 53 54 1.698770513 -1.158338499 1.397298101 3.385471213 -0.312550828 -2.693270860 55 56 57 58 59 60 -1.877145284 0.463107197 -3.373848399 -1.038388722 -0.604058129 -0.092649403 61 62 63 64 65 66 0.051852785 -1.052834208 -0.007501405 0.090599448 -4.545998168 1.955246027 67 68 69 70 71 72 0.462847129 -1.264760180 0.645387855 -1.418359962 0.179267112 0.196823950 73 74 75 76 77 78 -0.336219969 1.513831060 0.640340593 0.275525580 -1.995810234 -0.402432914 79 80 81 82 83 84 -2.499181981 1.367662582 0.443356298 -0.209140654 -0.321061732 -2.649083341 85 86 87 88 89 90 -1.734921254 -1.646741065 2.884120930 2.234770084 0.430392812 -1.643370365 91 92 93 94 95 96 1.731725238 1.179667937 0.573625387 -1.341345661 1.947923493 3.249126235 97 98 99 100 101 102 0.507725519 -1.299834978 2.689280074 0.558208537 -2.705091434 -0.298513190 103 104 105 106 107 108 -0.412757339 1.216109797 2.728003330 -2.079417059 -1.583871667 -3.375546707 109 110 111 112 113 114 -1.374423718 0.724039971 -0.430672756 -2.711190258 2.215321290 1.059160783 115 116 117 118 119 120 0.602708093 0.604397220 0.276561128 -0.436944958 -1.625554236 1.433900843 121 122 123 124 125 126 -2.222932114 -1.917694464 1.321189884 -1.797126117 -1.712521813 3.171897099 127 128 129 130 131 132 1.354626875 -0.781159058 -2.477331713 1.197647551 0.179825573 1.881395676 133 134 135 136 137 138 -4.864827869 4.627642073 -1.445963415 -0.780907989 0.092752887 2.089274082 139 140 141 142 143 144 -0.551870034 0.755961494 3.415973130 0.347863586 -1.535168116 -4.902001440 145 146 147 148 149 150 0.082795565 0.758068132 -2.318632146 2.008122239 0.457112763 0.435810507 151 152 153 154 155 156 -0.043345997 0.870986398 0.830734395 -0.092914275 2.742232173 0.472002081 > postscript(file="/var/www/rcomp/tmp/68aov1321616175.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 1.895881119 NA 1 2.620427765 1.895881119 2 1.330717095 2.620427765 3 -0.178019636 1.330717095 4 0.365933615 -0.178019636 5 -1.121711250 0.365933615 6 -1.123213570 -1.121711250 7 6.647304648 -1.123213570 8 -2.330299894 6.647304648 9 2.390933319 -2.330299894 10 4.619595624 2.390933319 11 -1.448810891 4.619595624 12 -2.291412675 -1.448810891 13 -7.190631352 -2.291412675 14 -5.132371829 -7.190631352 15 0.473251186 -5.132371829 16 1.679605980 0.473251186 17 0.220125052 1.679605980 18 -1.184223080 0.220125052 19 -0.206106818 -1.184223080 20 -0.659061264 -0.206106818 21 0.634972150 -0.659061264 22 -0.078438783 0.634972150 23 0.435413441 -0.078438783 24 0.095636326 0.435413441 25 -0.039586069 0.095636326 26 0.255082604 -0.039586069 27 -1.323734745 0.255082604 28 1.041293627 -1.323734745 29 -0.020941910 1.041293627 30 1.169255572 -0.020941910 31 -2.710391435 1.169255572 32 0.255145411 -2.710391435 33 0.108760171 0.255145411 34 -2.316616832 0.108760171 35 0.876211275 -2.316616832 36 0.984433103 0.876211275 37 2.214215114 0.984433103 38 0.730369634 2.214215114 39 3.021527893 0.730369634 40 -0.882268859 3.021527893 41 -1.271526173 -0.882268859 42 -0.553508690 -1.271526173 43 0.682492275 -0.553508690 44 3.967834104 0.682492275 45 0.516979380 3.967834104 46 -0.673137972 0.516979380 47 0.791774017 -0.673137972 48 1.698770513 0.791774017 49 -1.158338499 1.698770513 50 1.397298101 -1.158338499 51 3.385471213 1.397298101 52 -0.312550828 3.385471213 53 -2.693270860 -0.312550828 54 -1.877145284 -2.693270860 55 0.463107197 -1.877145284 56 -3.373848399 0.463107197 57 -1.038388722 -3.373848399 58 -0.604058129 -1.038388722 59 -0.092649403 -0.604058129 60 0.051852785 -0.092649403 61 -1.052834208 0.051852785 62 -0.007501405 -1.052834208 63 0.090599448 -0.007501405 64 -4.545998168 0.090599448 65 1.955246027 -4.545998168 66 0.462847129 1.955246027 67 -1.264760180 0.462847129 68 0.645387855 -1.264760180 69 -1.418359962 0.645387855 70 0.179267112 -1.418359962 71 0.196823950 0.179267112 72 -0.336219969 0.196823950 73 1.513831060 -0.336219969 74 0.640340593 1.513831060 75 0.275525580 0.640340593 76 -1.995810234 0.275525580 77 -0.402432914 -1.995810234 78 -2.499181981 -0.402432914 79 1.367662582 -2.499181981 80 0.443356298 1.367662582 81 -0.209140654 0.443356298 82 -0.321061732 -0.209140654 83 -2.649083341 -0.321061732 84 -1.734921254 -2.649083341 85 -1.646741065 -1.734921254 86 2.884120930 -1.646741065 87 2.234770084 2.884120930 88 0.430392812 2.234770084 89 -1.643370365 0.430392812 90 1.731725238 -1.643370365 91 1.179667937 1.731725238 92 0.573625387 1.179667937 93 -1.341345661 0.573625387 94 1.947923493 -1.341345661 95 3.249126235 1.947923493 96 0.507725519 3.249126235 97 -1.299834978 0.507725519 98 2.689280074 -1.299834978 99 0.558208537 2.689280074 100 -2.705091434 0.558208537 101 -0.298513190 -2.705091434 102 -0.412757339 -0.298513190 103 1.216109797 -0.412757339 104 2.728003330 1.216109797 105 -2.079417059 2.728003330 106 -1.583871667 -2.079417059 107 -3.375546707 -1.583871667 108 -1.374423718 -3.375546707 109 0.724039971 -1.374423718 110 -0.430672756 0.724039971 111 -2.711190258 -0.430672756 112 2.215321290 -2.711190258 113 1.059160783 2.215321290 114 0.602708093 1.059160783 115 0.604397220 0.602708093 116 0.276561128 0.604397220 117 -0.436944958 0.276561128 118 -1.625554236 -0.436944958 119 1.433900843 -1.625554236 120 -2.222932114 1.433900843 121 -1.917694464 -2.222932114 122 1.321189884 -1.917694464 123 -1.797126117 1.321189884 124 -1.712521813 -1.797126117 125 3.171897099 -1.712521813 126 1.354626875 3.171897099 127 -0.781159058 1.354626875 128 -2.477331713 -0.781159058 129 1.197647551 -2.477331713 130 0.179825573 1.197647551 131 1.881395676 0.179825573 132 -4.864827869 1.881395676 133 4.627642073 -4.864827869 134 -1.445963415 4.627642073 135 -0.780907989 -1.445963415 136 0.092752887 -0.780907989 137 2.089274082 0.092752887 138 -0.551870034 2.089274082 139 0.755961494 -0.551870034 140 3.415973130 0.755961494 141 0.347863586 3.415973130 142 -1.535168116 0.347863586 143 -4.902001440 -1.535168116 144 0.082795565 -4.902001440 145 0.758068132 0.082795565 146 -2.318632146 0.758068132 147 2.008122239 -2.318632146 148 0.457112763 2.008122239 149 0.435810507 0.457112763 150 -0.043345997 0.435810507 151 0.870986398 -0.043345997 152 0.830734395 0.870986398 153 -0.092914275 0.830734395 154 2.742232173 -0.092914275 155 0.472002081 2.742232173 156 NA 0.472002081 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.620427765 1.895881119 [2,] 1.330717095 2.620427765 [3,] -0.178019636 1.330717095 [4,] 0.365933615 -0.178019636 [5,] -1.121711250 0.365933615 [6,] -1.123213570 -1.121711250 [7,] 6.647304648 -1.123213570 [8,] -2.330299894 6.647304648 [9,] 2.390933319 -2.330299894 [10,] 4.619595624 2.390933319 [11,] -1.448810891 4.619595624 [12,] -2.291412675 -1.448810891 [13,] -7.190631352 -2.291412675 [14,] -5.132371829 -7.190631352 [15,] 0.473251186 -5.132371829 [16,] 1.679605980 0.473251186 [17,] 0.220125052 1.679605980 [18,] -1.184223080 0.220125052 [19,] -0.206106818 -1.184223080 [20,] -0.659061264 -0.206106818 [21,] 0.634972150 -0.659061264 [22,] -0.078438783 0.634972150 [23,] 0.435413441 -0.078438783 [24,] 0.095636326 0.435413441 [25,] -0.039586069 0.095636326 [26,] 0.255082604 -0.039586069 [27,] -1.323734745 0.255082604 [28,] 1.041293627 -1.323734745 [29,] -0.020941910 1.041293627 [30,] 1.169255572 -0.020941910 [31,] -2.710391435 1.169255572 [32,] 0.255145411 -2.710391435 [33,] 0.108760171 0.255145411 [34,] -2.316616832 0.108760171 [35,] 0.876211275 -2.316616832 [36,] 0.984433103 0.876211275 [37,] 2.214215114 0.984433103 [38,] 0.730369634 2.214215114 [39,] 3.021527893 0.730369634 [40,] -0.882268859 3.021527893 [41,] -1.271526173 -0.882268859 [42,] -0.553508690 -1.271526173 [43,] 0.682492275 -0.553508690 [44,] 3.967834104 0.682492275 [45,] 0.516979380 3.967834104 [46,] -0.673137972 0.516979380 [47,] 0.791774017 -0.673137972 [48,] 1.698770513 0.791774017 [49,] -1.158338499 1.698770513 [50,] 1.397298101 -1.158338499 [51,] 3.385471213 1.397298101 [52,] -0.312550828 3.385471213 [53,] -2.693270860 -0.312550828 [54,] -1.877145284 -2.693270860 [55,] 0.463107197 -1.877145284 [56,] -3.373848399 0.463107197 [57,] -1.038388722 -3.373848399 [58,] -0.604058129 -1.038388722 [59,] -0.092649403 -0.604058129 [60,] 0.051852785 -0.092649403 [61,] -1.052834208 0.051852785 [62,] -0.007501405 -1.052834208 [63,] 0.090599448 -0.007501405 [64,] -4.545998168 0.090599448 [65,] 1.955246027 -4.545998168 [66,] 0.462847129 1.955246027 [67,] -1.264760180 0.462847129 [68,] 0.645387855 -1.264760180 [69,] -1.418359962 0.645387855 [70,] 0.179267112 -1.418359962 [71,] 0.196823950 0.179267112 [72,] -0.336219969 0.196823950 [73,] 1.513831060 -0.336219969 [74,] 0.640340593 1.513831060 [75,] 0.275525580 0.640340593 [76,] -1.995810234 0.275525580 [77,] -0.402432914 -1.995810234 [78,] -2.499181981 -0.402432914 [79,] 1.367662582 -2.499181981 [80,] 0.443356298 1.367662582 [81,] -0.209140654 0.443356298 [82,] -0.321061732 -0.209140654 [83,] -2.649083341 -0.321061732 [84,] -1.734921254 -2.649083341 [85,] -1.646741065 -1.734921254 [86,] 2.884120930 -1.646741065 [87,] 2.234770084 2.884120930 [88,] 0.430392812 2.234770084 [89,] -1.643370365 0.430392812 [90,] 1.731725238 -1.643370365 [91,] 1.179667937 1.731725238 [92,] 0.573625387 1.179667937 [93,] -1.341345661 0.573625387 [94,] 1.947923493 -1.341345661 [95,] 3.249126235 1.947923493 [96,] 0.507725519 3.249126235 [97,] -1.299834978 0.507725519 [98,] 2.689280074 -1.299834978 [99,] 0.558208537 2.689280074 [100,] -2.705091434 0.558208537 [101,] -0.298513190 -2.705091434 [102,] -0.412757339 -0.298513190 [103,] 1.216109797 -0.412757339 [104,] 2.728003330 1.216109797 [105,] -2.079417059 2.728003330 [106,] -1.583871667 -2.079417059 [107,] -3.375546707 -1.583871667 [108,] -1.374423718 -3.375546707 [109,] 0.724039971 -1.374423718 [110,] -0.430672756 0.724039971 [111,] -2.711190258 -0.430672756 [112,] 2.215321290 -2.711190258 [113,] 1.059160783 2.215321290 [114,] 0.602708093 1.059160783 [115,] 0.604397220 0.602708093 [116,] 0.276561128 0.604397220 [117,] -0.436944958 0.276561128 [118,] -1.625554236 -0.436944958 [119,] 1.433900843 -1.625554236 [120,] -2.222932114 1.433900843 [121,] -1.917694464 -2.222932114 [122,] 1.321189884 -1.917694464 [123,] -1.797126117 1.321189884 [124,] -1.712521813 -1.797126117 [125,] 3.171897099 -1.712521813 [126,] 1.354626875 3.171897099 [127,] -0.781159058 1.354626875 [128,] -2.477331713 -0.781159058 [129,] 1.197647551 -2.477331713 [130,] 0.179825573 1.197647551 [131,] 1.881395676 0.179825573 [132,] -4.864827869 1.881395676 [133,] 4.627642073 -4.864827869 [134,] -1.445963415 4.627642073 [135,] -0.780907989 -1.445963415 [136,] 0.092752887 -0.780907989 [137,] 2.089274082 0.092752887 [138,] -0.551870034 2.089274082 [139,] 0.755961494 -0.551870034 [140,] 3.415973130 0.755961494 [141,] 0.347863586 3.415973130 [142,] -1.535168116 0.347863586 [143,] -4.902001440 -1.535168116 [144,] 0.082795565 -4.902001440 [145,] 0.758068132 0.082795565 [146,] -2.318632146 0.758068132 [147,] 2.008122239 -2.318632146 [148,] 0.457112763 2.008122239 [149,] 0.435810507 0.457112763 [150,] -0.043345997 0.435810507 [151,] 0.870986398 -0.043345997 [152,] 0.830734395 0.870986398 [153,] -0.092914275 0.830734395 [154,] 2.742232173 -0.092914275 [155,] 0.472002081 2.742232173 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.620427765 1.895881119 2 1.330717095 2.620427765 3 -0.178019636 1.330717095 4 0.365933615 -0.178019636 5 -1.121711250 0.365933615 6 -1.123213570 -1.121711250 7 6.647304648 -1.123213570 8 -2.330299894 6.647304648 9 2.390933319 -2.330299894 10 4.619595624 2.390933319 11 -1.448810891 4.619595624 12 -2.291412675 -1.448810891 13 -7.190631352 -2.291412675 14 -5.132371829 -7.190631352 15 0.473251186 -5.132371829 16 1.679605980 0.473251186 17 0.220125052 1.679605980 18 -1.184223080 0.220125052 19 -0.206106818 -1.184223080 20 -0.659061264 -0.206106818 21 0.634972150 -0.659061264 22 -0.078438783 0.634972150 23 0.435413441 -0.078438783 24 0.095636326 0.435413441 25 -0.039586069 0.095636326 26 0.255082604 -0.039586069 27 -1.323734745 0.255082604 28 1.041293627 -1.323734745 29 -0.020941910 1.041293627 30 1.169255572 -0.020941910 31 -2.710391435 1.169255572 32 0.255145411 -2.710391435 33 0.108760171 0.255145411 34 -2.316616832 0.108760171 35 0.876211275 -2.316616832 36 0.984433103 0.876211275 37 2.214215114 0.984433103 38 0.730369634 2.214215114 39 3.021527893 0.730369634 40 -0.882268859 3.021527893 41 -1.271526173 -0.882268859 42 -0.553508690 -1.271526173 43 0.682492275 -0.553508690 44 3.967834104 0.682492275 45 0.516979380 3.967834104 46 -0.673137972 0.516979380 47 0.791774017 -0.673137972 48 1.698770513 0.791774017 49 -1.158338499 1.698770513 50 1.397298101 -1.158338499 51 3.385471213 1.397298101 52 -0.312550828 3.385471213 53 -2.693270860 -0.312550828 54 -1.877145284 -2.693270860 55 0.463107197 -1.877145284 56 -3.373848399 0.463107197 57 -1.038388722 -3.373848399 58 -0.604058129 -1.038388722 59 -0.092649403 -0.604058129 60 0.051852785 -0.092649403 61 -1.052834208 0.051852785 62 -0.007501405 -1.052834208 63 0.090599448 -0.007501405 64 -4.545998168 0.090599448 65 1.955246027 -4.545998168 66 0.462847129 1.955246027 67 -1.264760180 0.462847129 68 0.645387855 -1.264760180 69 -1.418359962 0.645387855 70 0.179267112 -1.418359962 71 0.196823950 0.179267112 72 -0.336219969 0.196823950 73 1.513831060 -0.336219969 74 0.640340593 1.513831060 75 0.275525580 0.640340593 76 -1.995810234 0.275525580 77 -0.402432914 -1.995810234 78 -2.499181981 -0.402432914 79 1.367662582 -2.499181981 80 0.443356298 1.367662582 81 -0.209140654 0.443356298 82 -0.321061732 -0.209140654 83 -2.649083341 -0.321061732 84 -1.734921254 -2.649083341 85 -1.646741065 -1.734921254 86 2.884120930 -1.646741065 87 2.234770084 2.884120930 88 0.430392812 2.234770084 89 -1.643370365 0.430392812 90 1.731725238 -1.643370365 91 1.179667937 1.731725238 92 0.573625387 1.179667937 93 -1.341345661 0.573625387 94 1.947923493 -1.341345661 95 3.249126235 1.947923493 96 0.507725519 3.249126235 97 -1.299834978 0.507725519 98 2.689280074 -1.299834978 99 0.558208537 2.689280074 100 -2.705091434 0.558208537 101 -0.298513190 -2.705091434 102 -0.412757339 -0.298513190 103 1.216109797 -0.412757339 104 2.728003330 1.216109797 105 -2.079417059 2.728003330 106 -1.583871667 -2.079417059 107 -3.375546707 -1.583871667 108 -1.374423718 -3.375546707 109 0.724039971 -1.374423718 110 -0.430672756 0.724039971 111 -2.711190258 -0.430672756 112 2.215321290 -2.711190258 113 1.059160783 2.215321290 114 0.602708093 1.059160783 115 0.604397220 0.602708093 116 0.276561128 0.604397220 117 -0.436944958 0.276561128 118 -1.625554236 -0.436944958 119 1.433900843 -1.625554236 120 -2.222932114 1.433900843 121 -1.917694464 -2.222932114 122 1.321189884 -1.917694464 123 -1.797126117 1.321189884 124 -1.712521813 -1.797126117 125 3.171897099 -1.712521813 126 1.354626875 3.171897099 127 -0.781159058 1.354626875 128 -2.477331713 -0.781159058 129 1.197647551 -2.477331713 130 0.179825573 1.197647551 131 1.881395676 0.179825573 132 -4.864827869 1.881395676 133 4.627642073 -4.864827869 134 -1.445963415 4.627642073 135 -0.780907989 -1.445963415 136 0.092752887 -0.780907989 137 2.089274082 0.092752887 138 -0.551870034 2.089274082 139 0.755961494 -0.551870034 140 3.415973130 0.755961494 141 0.347863586 3.415973130 142 -1.535168116 0.347863586 143 -4.902001440 -1.535168116 144 0.082795565 -4.902001440 145 0.758068132 0.082795565 146 -2.318632146 0.758068132 147 2.008122239 -2.318632146 148 0.457112763 2.008122239 149 0.435810507 0.457112763 150 -0.043345997 0.435810507 151 0.870986398 -0.043345997 152 0.830734395 0.870986398 153 -0.092914275 0.830734395 154 2.742232173 -0.092914275 155 0.472002081 2.742232173 > 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/rcomp/tmp/75oco1321616175.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/www/rcomp/tmp/834p61321616175.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/www/rcomp/tmp/95ka61321616175.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/www/rcomp/tmp/10xzfk1321616175.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/116tpw1321616175.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/rcomp/tmp/127u151321616175.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/rcomp/tmp/13vxs41321616175.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/rcomp/tmp/147hzd1321616175.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/rcomp/tmp/156b1a1321616175.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/rcomp/tmp/16grhm1321616175.tab") + } > > try(system("convert tmp/131v31321616175.ps tmp/131v31321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/20co91321616175.ps tmp/20co91321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/3n7e41321616175.ps tmp/3n7e41321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/4pe551321616175.ps tmp/4pe551321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/5x0vn1321616175.ps tmp/5x0vn1321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/68aov1321616175.ps tmp/68aov1321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/75oco1321616175.ps tmp/75oco1321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/834p61321616175.ps tmp/834p61321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/95ka61321616175.ps tmp/95ka61321616175.png",intern=TRUE)) character(0) > try(system("convert tmp/10xzfk1321616175.ps tmp/10xzfk1321616175.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.680 0.300 6.035