R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1 + ,41 + ,25 + ,25 + ,15 + ,15 + ,9 + ,9 + ,3 + ,3 + ,1 + ,38 + ,25 + ,25 + ,15 + ,15 + ,9 + ,9 + ,4 + ,4 + ,1 + ,37 + ,19 + ,19 + ,14 + ,14 + ,9 + ,9 + ,4 + ,4 + ,1 + ,42 + ,18 + ,18 + ,10 + ,10 + ,8 + ,8 + ,4 + ,4 + ,1 + ,40 + ,23 + ,23 + ,18 + ,18 + ,15 + ,15 + ,3 + ,3 + ,1 + ,43 + ,25 + ,25 + ,14 + ,14 + ,9 + ,9 + ,4 + ,4 + ,1 + ,40 + ,23 + ,23 + ,11 + ,11 + ,11 + ,11 + ,4 + ,4 + ,1 + ,45 + ,30 + ,30 + ,17 + ,17 + ,6 + ,6 + ,5 + ,5 + ,1 + ,45 + ,32 + ,32 + ,21 + ,21 + ,10 + ,10 + ,4 + ,4 + ,1 + ,44 + ,25 + ,25 + ,7 + ,7 + ,11 + ,11 + ,4 + ,4 + ,1 + ,42 + ,26 + ,26 + ,18 + ,18 + ,16 + ,16 + ,4 + ,4 + ,1 + ,32 + ,25 + ,25 + ,13 + ,13 + ,11 + ,11 + ,5 + ,5 + ,1 + ,32 + ,25 + ,25 + ,13 + ,13 + ,11 + ,11 + ,5 + ,5 + ,1 + ,41 + ,35 + ,35 + ,18 + ,18 + ,7 + ,7 + ,4 + ,4 + ,1 + ,38 + ,20 + ,20 + ,12 + ,12 + ,10 + ,10 + ,4 + ,4 + ,1 + ,38 + ,21 + ,21 + ,9 + ,9 + ,9 + ,9 + ,4 + ,4 + ,1 + ,24 + ,23 + ,23 + ,11 + ,11 + ,15 + ,15 + ,3 + ,3 + ,1 + ,46 + ,17 + ,17 + ,11 + ,11 + ,6 + ,6 + ,5 + ,5 + ,1 + ,42 + ,27 + ,27 + ,16 + ,16 + ,12 + ,12 + ,4 + ,4 + ,1 + ,46 + ,25 + ,25 + ,12 + ,12 + ,10 + ,10 + ,4 + ,4 + ,1 + ,43 + ,18 + ,18 + ,14 + ,14 + ,14 + ,14 + ,5 + ,5 + ,1 + ,38 + ,22 + ,22 + ,13 + ,13 + ,9 + ,9 + ,4 + ,4 + ,1 + ,39 + ,23 + ,23 + ,17 + ,17 + ,14 + ,14 + ,4 + ,4 + ,1 + ,40 + ,25 + ,25 + ,13 + ,13 + ,14 + ,14 + ,3 + ,3 + ,1 + ,37 + ,19 + ,19 + ,13 + ,13 + ,9 + ,9 + ,2 + ,2 + ,1 + ,41 + ,20 + ,20 + ,12 + ,12 + ,8 + ,8 + ,4 + ,4 + ,1 + ,46 + ,26 + ,26 + ,12 + ,12 + ,10 + ,10 + ,4 + ,4 + ,1 + ,26 + ,16 + ,16 + ,12 + ,12 + ,9 + ,9 + ,3 + ,3 + ,1 + ,37 + ,22 + ,22 + ,9 + ,9 + ,9 + ,9 + ,3 + ,3 + ,1 + ,39 + ,25 + ,25 + ,17 + ,17 + ,9 + ,9 + ,4 + ,4 + ,1 + ,44 + ,29 + ,29 + ,18 + ,18 + ,11 + ,11 + ,5 + ,5 + ,1 + ,38 + ,22 + ,22 + ,12 + ,12 + ,10 + ,10 + ,2 + ,2 + ,1 + ,38 + ,32 + ,32 + ,12 + ,12 + ,8 + ,8 + ,0 + ,0 + ,1 + ,38 + ,23 + ,23 + ,9 + ,9 + ,14 + ,14 + ,4 + ,4 + ,1 + ,33 + ,18 + ,18 + ,13 + ,13 + ,10 + ,10 + ,3 + ,3 + ,1 + ,43 + ,26 + ,26 + ,11 + ,11 + ,14 + ,14 + ,4 + ,4 + ,1 + ,41 + ,14 + ,14 + ,13 + ,13 + ,15 + ,15 + ,2 + ,2 + ,1 + ,49 + ,20 + ,20 + ,6 + ,6 + ,8 + ,8 + ,4 + ,4 + ,1 + ,45 + ,25 + ,25 + ,11 + ,11 + ,10 + ,10 + ,5 + ,5 + ,1 + ,31 + ,21 + ,21 + ,18 + ,18 + ,13 + ,13 + ,3 + ,3 + ,1 + ,30 + ,21 + ,21 + ,18 + ,18 + ,13 + ,13 + ,3 + ,3 + ,1 + ,38 + ,23 + ,23 + ,15 + ,15 + ,10 + ,10 + ,4 + ,4 + ,1 + ,39 + ,24 + ,24 + ,11 + ,11 + ,11 + ,11 + ,4 + ,4 + ,1 + ,40 + ,21 + ,21 + ,14 + ,14 + ,10 + ,10 + ,4 + ,4 + ,1 + ,36 + ,17 + ,17 + ,12 + ,12 + ,16 + ,16 + ,2 + ,2 + ,1 + ,49 + ,29 + ,29 + ,8 + ,8 + ,6 + ,6 + ,5 + ,5 + ,1 + ,41 + ,25 + ,25 + ,11 + ,11 + ,11 + ,11 + ,4 + ,4 + ,1 + ,42 + ,25 + ,25 + ,17 + ,17 + ,14 + ,14 + ,3 + ,3 + ,1 + ,41 + ,25 + ,25 + ,16 + ,16 + ,9 + ,9 + ,5 + ,5 + ,1 + ,43 + ,21 + ,21 + ,13 + ,13 + ,11 + ,11 + ,4 + ,4 + ,1 + ,46 + ,23 + ,23 + ,15 + ,15 + ,8 + ,8 + ,3 + ,3 + ,1 + ,41 + ,25 + ,25 + ,16 + ,16 + ,8 + ,8 + ,5 + ,5 + ,1 + ,39 + ,25 + ,25 + ,7 + ,7 + ,11 + ,11 + ,4 + ,4 + ,1 + ,42 + ,24 + ,24 + ,16 + ,16 + ,16 + ,16 + ,4 + ,4 + ,1 + ,35 + ,21 + ,21 + ,13 + ,13 + ,12 + ,12 + ,5 + ,5 + ,1 + ,36 + ,22 + ,22 + ,15 + ,15 + ,14 + ,14 + ,3 + ,3 + ,1 + ,48 + ,14 + ,14 + ,12 + ,12 + ,8 + ,8 + ,4 + ,4 + ,1 + ,41 + ,20 + ,20 + ,12 + ,12 + ,10 + ,10 + ,4 + ,4 + ,1 + ,47 + ,21 + ,21 + ,24 + ,24 + ,14 + ,14 + ,3 + ,3 + ,1 + ,41 + ,22 + ,22 + ,15 + ,15 + ,10 + ,10 + ,3 + ,3 + ,1 + ,31 + ,19 + ,19 + ,8 + ,8 + ,5 + ,5 + ,5 + ,5 + ,1 + ,36 + ,28 + ,28 + ,18 + ,18 + ,12 + ,12 + ,4 + ,4 + ,1 + ,46 + ,25 + ,25 + ,17 + ,17 + ,9 + ,9 + ,4 + ,4 + ,1 + ,44 + ,21 + ,21 + ,15 + ,15 + ,8 + ,8 + ,4 + ,4 + ,1 + ,43 + ,27 + ,27 + ,11 + ,11 + ,16 + ,16 + ,2 + ,2 + ,1 + ,40 + ,19 + ,19 + ,12 + ,12 + ,13 + ,13 + ,5 + ,5 + ,1 + ,40 + ,20 + ,20 + ,14 + ,14 + ,8 + ,8 + ,3 + ,3 + ,1 + ,46 + ,17 + ,17 + ,11 + ,11 + ,14 + ,14 + ,3 + ,3 + ,1 + ,39 + ,22 + ,22 + ,10 + ,10 + ,8 + ,8 + ,4 + ,4 + ,1 + ,44 + ,26 + ,26 + ,11 + ,11 + ,7 + ,7 + ,4 + ,4 + ,1 + ,38 + ,17 + ,17 + ,12 + ,12 + ,11 + ,11 + ,2 + ,2 + ,1 + ,39 + ,15 + ,15 + ,6 + ,6 + ,6 + ,6 + ,4 + ,4 + ,1 + ,41 + ,27 + ,27 + ,15 + ,15 + ,9 + ,9 + ,5 + ,5 + ,1 + ,39 + ,25 + ,25 + ,14 + ,14 + ,14 + ,14 + ,3 + ,3 + ,1 + ,40 + ,19 + ,19 + ,16 + ,16 + ,12 + ,12 + ,4 + ,4 + ,1 + ,44 + ,18 + ,18 + ,16 + ,16 + ,8 + ,8 + ,4 + ,4 + ,1 + ,42 + ,15 + ,15 + ,11 + ,11 + ,8 + ,8 + ,4 + ,4 + ,1 + ,46 + ,29 + ,29 + ,15 + ,15 + ,12 + ,12 + ,5 + ,5 + ,1 + ,44 + ,24 + ,24 + ,12 + ,12 + ,13 + ,13 + ,4 + ,4 + ,1 + ,37 + ,24 + ,24 + ,13 + ,13 + ,11 + ,11 + ,4 + ,4 + ,1 + ,39 + ,22 + ,22 + ,14 + ,14 + ,12 + ,12 + ,2 + ,2 + ,1 + ,40 + ,22 + ,22 + ,12 + ,12 + ,13 + ,13 + ,3 + ,3 + ,1 + ,42 + ,25 + ,25 + ,17 + ,17 + ,14 + ,14 + ,3 + ,3 + ,1 + ,37 + ,21 + ,21 + ,11 + ,11 + ,9 + ,9 + ,3 + ,3 + ,1 + ,33 + ,21 + ,21 + ,13 + ,13 + ,8 + ,8 + ,2 + ,2 + ,1 + ,35 + ,18 + ,18 + ,9 + ,9 + ,8 + ,8 + ,4 + ,4 + ,1 + ,42 + ,10 + ,10 + ,12 + ,12 + ,9 + ,9 + ,2 + ,2 + ,0 + ,36 + ,18 + ,36 + ,10 + ,20 + ,14 + ,28 + ,2 + ,4 + ,0 + ,44 + ,23 + ,46 + ,9 + ,18 + ,14 + ,28 + ,4 + ,8 + ,0 + ,45 + ,24 + ,48 + ,11 + ,22 + ,14 + ,28 + ,4 + ,8 + ,0 + ,47 + ,32 + ,64 + ,9 + ,18 + ,14 + ,28 + ,4 + ,8 + ,0 + ,40 + ,24 + ,48 + ,16 + ,32 + ,9 + ,18 + ,4 + ,8 + ,0 + ,49 + ,17 + ,34 + ,14 + ,28 + ,14 + ,28 + ,4 + ,8 + ,0 + ,48 + ,30 + ,60 + ,24 + ,48 + ,8 + ,16 + ,5 + ,10 + ,0 + ,29 + ,25 + ,50 + ,9 + ,18 + ,10 + ,20 + ,4 + ,8 + ,0 + ,45 + ,23 + ,46 + ,11 + ,22 + ,11 + ,22 + ,5 + ,10 + ,0 + ,29 + ,19 + ,38 + ,14 + ,28 + ,13 + ,26 + ,2 + ,4 + ,0 + ,41 + ,21 + ,42 + ,12 + ,24 + ,9 + ,18 + ,4 + ,8 + ,0 + ,34 + ,24 + ,48 + ,8 + ,16 + ,13 + ,26 + ,2 + ,4 + ,0 + ,38 + ,23 + ,46 + ,5 + ,10 + ,16 + ,32 + ,2 + ,4 + ,0 + ,37 + ,19 + ,38 + ,10 + ,20 + ,12 + ,24 + ,3 + ,6 + ,0 + ,48 + ,27 + ,54 + ,15 + ,30 + ,4 + ,8 + ,5 + ,10 + ,0 + ,39 + ,26 + ,52 + ,10 + ,20 + ,10 + ,20 + ,4 + ,8 + ,0 + ,34 + ,26 + ,52 + ,18 + ,36 + ,14 + ,28 + ,4 + ,8 + ,0 + ,35 + ,16 + ,32 + ,12 + ,24 + ,10 + ,20 + ,2 + ,4 + ,0 + ,41 + ,27 + ,54 + ,13 + ,26 + ,9 + ,18 + ,3 + ,6 + ,0 + ,43 + ,14 + ,28 + ,11 + ,22 + ,8 + ,16 + ,4 + ,8 + ,0 + ,41 + ,18 + ,36 + ,12 + ,24 + ,9 + ,18 + ,3 + ,6 + ,0 + ,39 + ,21 + ,42 + ,7 + ,14 + ,15 + ,30 + ,2 + ,4 + ,0 + ,36 + ,22 + ,44 + ,17 + ,34 + ,8 + ,16 + ,4 + ,8 + ,0 + ,32 + ,31 + ,62 + ,9 + ,18 + ,11 + ,22 + ,4 + ,8 + ,0 + ,46 + ,23 + ,46 + ,10 + ,20 + ,12 + ,24 + ,4 + ,8 + ,0 + ,42 + ,24 + ,48 + ,12 + ,24 + ,9 + ,18 + ,4 + ,8 + ,0 + ,42 + ,19 + ,38 + ,10 + ,20 + ,13 + ,26 + ,2 + ,4 + ,0 + ,45 + ,22 + ,44 + ,7 + ,14 + ,7 + ,14 + ,3 + ,6 + ,0 + ,39 + ,24 + ,48 + ,13 + ,26 + ,10 + ,20 + ,4 + ,8 + ,0 + ,45 + ,28 + ,56 + ,9 + ,18 + ,11 + ,22 + ,4 + ,8 + ,0 + ,48 + ,24 + ,48 + ,9 + ,18 + ,8 + ,16 + ,5 + ,10 + ,0 + ,28 + ,15 + ,30 + ,12 + ,24 + ,14 + ,28 + ,4 + ,8 + ,0 + ,35 + ,21 + ,42 + ,11 + ,22 + ,9 + ,18 + ,2 + ,4 + ,0 + ,38 + ,21 + ,42 + ,14 + ,28 + ,16 + ,32 + ,4 + ,8 + ,0 + ,42 + ,13 + ,26 + ,8 + ,16 + ,11 + ,22 + ,4 + ,8 + ,0 + ,36 + ,20 + ,40 + ,11 + ,22 + ,12 + ,24 + ,3 + ,6 + ,0 + ,37 + ,22 + ,44 + ,11 + ,22 + ,8 + ,16 + ,4 + ,8 + ,0 + ,38 + ,19 + ,38 + ,12 + ,24 + ,7 + ,14 + ,3 + ,6 + ,0 + ,43 + ,26 + ,52 + ,20 + ,40 + ,13 + ,26 + ,4 + ,8 + ,0 + ,35 + ,19 + ,38 + ,8 + ,16 + ,20 + ,40 + ,2 + ,4 + ,0 + ,36 + ,20 + ,40 + ,11 + ,22 + ,11 + ,22 + ,4 + ,8 + ,0 + ,33 + ,14 + ,28 + ,15 + ,30 + ,10 + ,20 + ,2 + ,4 + ,0 + ,39 + ,17 + ,34 + ,12 + ,24 + ,16 + ,32 + ,4 + ,8 + ,0 + ,32 + ,29 + ,58 + ,12 + ,24 + ,12 + ,24 + ,4 + ,8 + ,0 + ,45 + ,21 + ,42 + ,12 + ,24 + ,8 + ,16 + ,3 + ,6 + ,0 + ,35 + ,19 + ,38 + ,11 + ,22 + ,10 + ,20 + ,4 + ,8 + ,0 + ,38 + ,17 + ,34 + ,9 + ,18 + ,11 + ,22 + ,3 + ,6 + ,0 + ,36 + ,19 + ,38 + ,8 + ,16 + ,14 + ,28 + ,3 + ,6 + ,0 + ,42 + ,17 + ,34 + ,12 + ,24 + ,10 + ,20 + ,3 + ,6 + ,0 + ,41 + ,19 + ,38 + ,13 + ,26 + ,12 + ,24 + ,4 + ,8 + ,0 + ,47 + ,21 + ,42 + ,17 + ,34 + ,11 + ,22 + ,3 + ,6 + ,0 + ,35 + ,20 + ,40 + ,16 + ,32 + ,11 + ,22 + ,3 + ,6 + ,0 + ,43 + ,20 + ,40 + ,11 + ,22 + ,14 + ,28 + ,3 + ,6 + ,0 + ,40 + ,29 + ,58 + ,9 + ,18 + ,16 + ,32 + ,4 + ,8 + ,0 + ,46 + ,23 + ,46 + ,11 + ,22 + ,9 + ,18 + ,4 + ,8 + ,0 + ,44 + ,23 + ,46 + ,11 + ,22 + ,11 + ,22 + ,5 + ,10 + ,0 + ,35 + ,19 + ,38 + ,13 + ,26 + ,9 + ,18 + ,3 + ,6 + ,0 + ,29 + ,22 + ,44 + ,15 + ,30 + ,14 + ,28 + ,4 + ,8) + ,dim=c(10 + ,145) + ,dimnames=list(c('G' + ,'Career' + ,'PersonalStandards' + ,'PeG' + ,'ParentalExpectations' + ,'PaG' + ,'Doubts' + ,'DoG' + ,'LeadershipPreference' + ,'LeaderG') + ,1:145)) > y <- array(NA,dim=c(10,145),dimnames=list(c('G','Career','PersonalStandards','PeG','ParentalExpectations','PaG','Doubts','DoG','LeadershipPreference','LeaderG'),1:145)) > 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 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Career G PersonalStandards PeG ParentalExpectations PaG Doubts DoG 1 41 1 25 25 15 15 9 9 2 38 1 25 25 15 15 9 9 3 37 1 19 19 14 14 9 9 4 42 1 18 18 10 10 8 8 5 40 1 23 23 18 18 15 15 6 43 1 25 25 14 14 9 9 7 40 1 23 23 11 11 11 11 8 45 1 30 30 17 17 6 6 9 45 1 32 32 21 21 10 10 10 44 1 25 25 7 7 11 11 11 42 1 26 26 18 18 16 16 12 32 1 25 25 13 13 11 11 13 32 1 25 25 13 13 11 11 14 41 1 35 35 18 18 7 7 15 38 1 20 20 12 12 10 10 16 38 1 21 21 9 9 9 9 17 24 1 23 23 11 11 15 15 18 46 1 17 17 11 11 6 6 19 42 1 27 27 16 16 12 12 20 46 1 25 25 12 12 10 10 21 43 1 18 18 14 14 14 14 22 38 1 22 22 13 13 9 9 23 39 1 23 23 17 17 14 14 24 40 1 25 25 13 13 14 14 25 37 1 19 19 13 13 9 9 26 41 1 20 20 12 12 8 8 27 46 1 26 26 12 12 10 10 28 26 1 16 16 12 12 9 9 29 37 1 22 22 9 9 9 9 30 39 1 25 25 17 17 9 9 31 44 1 29 29 18 18 11 11 32 38 1 22 22 12 12 10 10 33 38 1 32 32 12 12 8 8 34 38 1 23 23 9 9 14 14 35 33 1 18 18 13 13 10 10 36 43 1 26 26 11 11 14 14 37 41 1 14 14 13 13 15 15 38 49 1 20 20 6 6 8 8 39 45 1 25 25 11 11 10 10 40 31 1 21 21 18 18 13 13 41 30 1 21 21 18 18 13 13 42 38 1 23 23 15 15 10 10 43 39 1 24 24 11 11 11 11 44 40 1 21 21 14 14 10 10 45 36 1 17 17 12 12 16 16 46 49 1 29 29 8 8 6 6 47 41 1 25 25 11 11 11 11 48 42 1 25 25 17 17 14 14 49 41 1 25 25 16 16 9 9 50 43 1 21 21 13 13 11 11 51 46 1 23 23 15 15 8 8 52 41 1 25 25 16 16 8 8 53 39 1 25 25 7 7 11 11 54 42 1 24 24 16 16 16 16 55 35 1 21 21 13 13 12 12 56 36 1 22 22 15 15 14 14 57 48 1 14 14 12 12 8 8 58 41 1 20 20 12 12 10 10 59 47 1 21 21 24 24 14 14 60 41 1 22 22 15 15 10 10 61 31 1 19 19 8 8 5 5 62 36 1 28 28 18 18 12 12 63 46 1 25 25 17 17 9 9 64 44 1 21 21 15 15 8 8 65 43 1 27 27 11 11 16 16 66 40 1 19 19 12 12 13 13 67 40 1 20 20 14 14 8 8 68 46 1 17 17 11 11 14 14 69 39 1 22 22 10 10 8 8 70 44 1 26 26 11 11 7 7 71 38 1 17 17 12 12 11 11 72 39 1 15 15 6 6 6 6 73 41 1 27 27 15 15 9 9 74 39 1 25 25 14 14 14 14 75 40 1 19 19 16 16 12 12 76 44 1 18 18 16 16 8 8 77 42 1 15 15 11 11 8 8 78 46 1 29 29 15 15 12 12 79 44 1 24 24 12 12 13 13 80 37 1 24 24 13 13 11 11 81 39 1 22 22 14 14 12 12 82 40 1 22 22 12 12 13 13 83 42 1 25 25 17 17 14 14 84 37 1 21 21 11 11 9 9 85 33 1 21 21 13 13 8 8 86 35 1 18 18 9 9 8 8 87 42 1 10 10 12 12 9 9 88 36 0 18 36 10 20 14 28 89 44 0 23 46 9 18 14 28 90 45 0 24 48 11 22 14 28 91 47 0 32 64 9 18 14 28 92 40 0 24 48 16 32 9 18 93 49 0 17 34 14 28 14 28 94 48 0 30 60 24 48 8 16 95 29 0 25 50 9 18 10 20 96 45 0 23 46 11 22 11 22 97 29 0 19 38 14 28 13 26 98 41 0 21 42 12 24 9 18 99 34 0 24 48 8 16 13 26 100 38 0 23 46 5 10 16 32 101 37 0 19 38 10 20 12 24 102 48 0 27 54 15 30 4 8 103 39 0 26 52 10 20 10 20 104 34 0 26 52 18 36 14 28 105 35 0 16 32 12 24 10 20 106 41 0 27 54 13 26 9 18 107 43 0 14 28 11 22 8 16 108 41 0 18 36 12 24 9 18 109 39 0 21 42 7 14 15 30 110 36 0 22 44 17 34 8 16 111 32 0 31 62 9 18 11 22 112 46 0 23 46 10 20 12 24 113 42 0 24 48 12 24 9 18 114 42 0 19 38 10 20 13 26 115 45 0 22 44 7 14 7 14 116 39 0 24 48 13 26 10 20 117 45 0 28 56 9 18 11 22 118 48 0 24 48 9 18 8 16 119 28 0 15 30 12 24 14 28 120 35 0 21 42 11 22 9 18 121 38 0 21 42 14 28 16 32 122 42 0 13 26 8 16 11 22 123 36 0 20 40 11 22 12 24 124 37 0 22 44 11 22 8 16 125 38 0 19 38 12 24 7 14 126 43 0 26 52 20 40 13 26 127 35 0 19 38 8 16 20 40 128 36 0 20 40 11 22 11 22 129 33 0 14 28 15 30 10 20 130 39 0 17 34 12 24 16 32 131 32 0 29 58 12 24 12 24 132 45 0 21 42 12 24 8 16 133 35 0 19 38 11 22 10 20 134 38 0 17 34 9 18 11 22 135 36 0 19 38 8 16 14 28 136 42 0 17 34 12 24 10 20 137 41 0 19 38 13 26 12 24 138 47 0 21 42 17 34 11 22 139 35 0 20 40 16 32 11 22 140 43 0 20 40 11 22 14 28 141 40 0 29 58 9 18 16 32 142 46 0 23 46 11 22 9 18 143 44 0 23 46 11 22 11 22 144 35 0 19 38 13 26 9 18 145 29 0 22 44 15 30 14 28 LeadershipPreference LeaderG 1 3 3 2 4 4 3 4 4 4 4 4 5 3 3 6 4 4 7 4 4 8 5 5 9 4 4 10 4 4 11 4 4 12 5 5 13 5 5 14 4 4 15 4 4 16 4 4 17 3 3 18 5 5 19 4 4 20 4 4 21 5 5 22 4 4 23 4 4 24 3 3 25 2 2 26 4 4 27 4 4 28 3 3 29 3 3 30 4 4 31 5 5 32 2 2 33 0 0 34 4 4 35 3 3 36 4 4 37 2 2 38 4 4 39 5 5 40 3 3 41 3 3 42 4 4 43 4 4 44 4 4 45 2 2 46 5 5 47 4 4 48 3 3 49 5 5 50 4 4 51 3 3 52 5 5 53 4 4 54 4 4 55 5 5 56 3 3 57 4 4 58 4 4 59 3 3 60 3 3 61 5 5 62 4 4 63 4 4 64 4 4 65 2 2 66 5 5 67 3 3 68 3 3 69 4 4 70 4 4 71 2 2 72 4 4 73 5 5 74 3 3 75 4 4 76 4 4 77 4 4 78 5 5 79 4 4 80 4 4 81 2 2 82 3 3 83 3 3 84 3 3 85 2 2 86 4 4 87 2 2 88 2 4 89 4 8 90 4 8 91 4 8 92 4 8 93 4 8 94 5 10 95 4 8 96 5 10 97 2 4 98 4 8 99 2 4 100 2 4 101 3 6 102 5 10 103 4 8 104 4 8 105 2 4 106 3 6 107 4 8 108 3 6 109 2 4 110 4 8 111 4 8 112 4 8 113 4 8 114 2 4 115 3 6 116 4 8 117 4 8 118 5 10 119 4 8 120 2 4 121 4 8 122 4 8 123 3 6 124 4 8 125 3 6 126 4 8 127 2 4 128 4 8 129 2 4 130 4 8 131 4 8 132 3 6 133 4 8 134 3 6 135 3 6 136 3 6 137 4 8 138 3 6 139 3 6 140 3 6 141 4 8 142 4 8 143 5 10 144 3 6 145 4 8 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) G PersonalStandards 35.61971 -1.39109 0.20799 PeG ParentalExpectations PaG -0.06194 0.30477 -0.22289 Doubts DoG LeadershipPreference -0.02800 -0.14374 -0.28608 LeaderG 1.16964 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -14.5627 -2.2601 0.4778 3.2208 10.1289 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 35.61971 5.25362 6.780 3.42e-10 *** G -1.39109 6.62259 -0.210 0.834 PersonalStandards 0.20799 0.30861 0.674 0.501 PeG -0.06194 0.20972 -0.295 0.768 ParentalExpectations 0.30477 0.40508 0.752 0.453 PaG -0.22289 0.26823 -0.831 0.407 Doubts -0.02800 0.47531 -0.059 0.953 DoG -0.14374 0.31198 -0.461 0.646 LeadershipPreference -0.28608 1.41851 -0.202 0.840 LeaderG 1.16964 1.01608 1.151 0.252 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.801 on 135 degrees of freedom Multiple R-squared: 0.1299, Adjusted R-squared: 0.07193 F-statistic: 2.24 on 9 and 135 DF, p-value: 0.02301 > 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.839064147 0.32187171 0.16093585 [2,] 0.819316656 0.36136669 0.18068334 [3,] 0.718067015 0.56386597 0.28193299 [4,] 0.613031359 0.77393728 0.38696864 [5,] 0.958907349 0.08218530 0.04109265 [6,] 0.951108018 0.09778396 0.04889198 [7,] 0.933089920 0.13382016 0.06691008 [8,] 0.945430357 0.10913929 0.05456964 [9,] 0.941539424 0.11692115 0.05846058 [10,] 0.920650535 0.15869893 0.07934946 [11,] 0.886943525 0.22611295 0.11305648 [12,] 0.862599100 0.27480180 0.13740090 [13,] 0.824005102 0.35198980 0.17599490 [14,] 0.771329326 0.45734135 0.22867067 [15,] 0.794116381 0.41176724 0.20588362 [16,] 0.937538146 0.12492371 0.06246185 [17,] 0.915264735 0.16947053 0.08473527 [18,] 0.891234188 0.21753162 0.10876581 [19,] 0.858345697 0.28330861 0.14165430 [20,] 0.825006471 0.34998706 0.17499353 [21,] 0.782055732 0.43588854 0.21794427 [22,] 0.736094026 0.52781195 0.26390597 [23,] 0.723467079 0.55306584 0.27653292 [24,] 0.697365467 0.60526907 0.30263453 [25,] 0.749599473 0.50080105 0.25040053 [26,] 0.847403346 0.30519331 0.15259665 [27,] 0.824055794 0.35188841 0.17594421 [28,] 0.853131226 0.29373755 0.14686877 [29,] 0.894992164 0.21001567 0.10500784 [30,] 0.873034148 0.25393170 0.12696585 [31,] 0.843842589 0.31231482 0.15615741 [32,] 0.809525580 0.38094884 0.19047442 [33,] 0.783549968 0.43290006 0.21645003 [34,] 0.808892739 0.38221452 0.19110726 [35,] 0.770559087 0.45888183 0.22944091 [36,] 0.757919634 0.48416073 0.24208037 [37,] 0.714183969 0.57163206 0.28581603 [38,] 0.690413827 0.61917235 0.30958617 [39,] 0.731461972 0.53707606 0.26853803 [40,] 0.687398114 0.62520377 0.31260189 [41,] 0.652277298 0.69544540 0.34772270 [42,] 0.622783869 0.75443226 0.37721613 [43,] 0.649401564 0.70119687 0.35059844 [44,] 0.632986761 0.73402648 0.36701324 [45,] 0.734241182 0.53151764 0.26575882 [46,] 0.691539148 0.61692170 0.30846085 [47,] 0.762134607 0.47573079 0.23786539 [48,] 0.723716261 0.55256748 0.27628374 [49,] 0.830483417 0.33903317 0.16951658 [50,] 0.842735085 0.31452983 0.15726491 [51,] 0.837415450 0.32516910 0.16258455 [52,] 0.819823633 0.36035273 0.18017637 [53,] 0.816022609 0.36795478 0.18397739 [54,] 0.795780563 0.40843887 0.20421944 [55,] 0.759517073 0.48096585 0.24048293 [56,] 0.796827103 0.40634579 0.20317290 [57,] 0.760899179 0.47820164 0.23910082 [58,] 0.760634410 0.47873118 0.23936559 [59,] 0.719620054 0.56075989 0.28037995 [60,] 0.679779470 0.64044106 0.32022053 [61,] 0.634327048 0.73134590 0.36567295 [62,] 0.588148664 0.82370267 0.41185134 [63,] 0.582702754 0.83459449 0.41729725 [64,] 0.546866005 0.90626799 0.45313399 [65,] 0.502569774 0.99486045 0.49743023 [66,] 0.495273605 0.99054721 0.50472640 [67,] 0.471595064 0.94319013 0.52840494 [68,] 0.432770819 0.86554164 0.56722918 [69,] 0.383473995 0.76694799 0.61652600 [70,] 0.341597927 0.68319585 0.65840207 [71,] 0.301004144 0.60200829 0.69899586 [72,] 0.262401218 0.52480244 0.73759878 [73,] 0.244941677 0.48988335 0.75505832 [74,] 0.220163346 0.44032669 0.77983665 [75,] 0.202212130 0.40442426 0.79778787 [76,] 0.167808769 0.33561754 0.83219123 [77,] 0.147698993 0.29539799 0.85230101 [78,] 0.137793745 0.27558749 0.86220625 [79,] 0.144813185 0.28962637 0.85518682 [80,] 0.117114148 0.23422830 0.88288585 [81,] 0.173809770 0.34761954 0.82619023 [82,] 0.185386718 0.37077344 0.81461328 [83,] 0.333513515 0.66702703 0.66648648 [84,] 0.309353062 0.61870612 0.69064694 [85,] 0.336011752 0.67202350 0.66398825 [86,] 0.320742174 0.64148435 0.67925783 [87,] 0.305669105 0.61133821 0.69433090 [88,] 0.262837048 0.52567410 0.73716295 [89,] 0.222678304 0.44535661 0.77732170 [90,] 0.260912127 0.52182425 0.73908787 [91,] 0.222951722 0.44590344 0.77704828 [92,] 0.248934735 0.49786947 0.75106527 [93,] 0.218679282 0.43735856 0.78132072 [94,] 0.187633757 0.37526751 0.81236624 [95,] 0.157381034 0.31476207 0.84261897 [96,] 0.130206167 0.26041233 0.86979383 [97,] 0.106764809 0.21352962 0.89323519 [98,] 0.097058170 0.19411634 0.90294183 [99,] 0.200014629 0.40002926 0.79998537 [100,] 0.203653112 0.40730622 0.79634689 [101,] 0.161646527 0.32329305 0.83835347 [102,] 0.167228840 0.33445768 0.83277116 [103,] 0.153984387 0.30796877 0.84601561 [104,] 0.121653139 0.24330628 0.87834686 [105,] 0.101913036 0.20382607 0.89808696 [106,] 0.101169061 0.20233812 0.89883094 [107,] 0.238924149 0.47784830 0.76107585 [108,] 0.192392194 0.38478439 0.80760781 [109,] 0.144473351 0.28894670 0.85552665 [110,] 0.116240321 0.23248064 0.88375968 [111,] 0.085487489 0.17097498 0.91451251 [112,] 0.067999082 0.13599816 0.93200092 [113,] 0.046431818 0.09286364 0.95356818 [114,] 0.040001594 0.08000319 0.95999841 [115,] 0.023898213 0.04779643 0.97610179 [116,] 0.017392065 0.03478413 0.98260794 [117,] 0.014272220 0.02854444 0.98572778 [118,] 0.008086737 0.01617347 0.99191326 [119,] 0.022237339 0.04447468 0.97776266 [120,] 0.010189982 0.02037996 0.98981002 > postscript(file="/var/www/html/rcomp/tmp/185un1292686850.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/html/rcomp/tmp/2jfc81292686850.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/html/rcomp/tmp/3jfc81292686850.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/html/rcomp/tmp/4jfc81292686850.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/html/rcomp/tmp/5t6bt1292686850.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 = 145 Frequency = 1 1 2 3 4 5 6 0.78719820 -3.09636453 -3.13823858 2.16357032 0.86411840 1.98551373 7 8 9 10 11 12 -0.13327815 1.61087363 2.56182238 3.90215230 1.71417723 -9.47267994 13 14 15 16 17 18 -9.47267994 -2.14590292 -1.94877795 -2.02092988 -14.56273382 5.00067983 19 20 21 22 23 24 1.04491086 5.32101563 2.98296699 -2.49448417 -1.10931147 0.80968170 25 26 27 28 29 30 -1.28923488 0.70773125 5.17497435 -12.65279550 -2.28340844 -2.26012103 31 32 33 34 35 36 1.53376366 -0.47373507 -0.51051326 -1.45428544 -5.85501092 2.94383421 37 38 39 40 41 42 4.47144394 9.19900077 3.51933116 -8.18728983 -9.18728983 -2.63253656 43 44 45 46 47 48 -1.27931943 -0.25857574 -0.71305626 6.49381919 0.57463929 2.48216869 49 50 51 52 53 54 -1.06180550 2.99504791 5.90753536 -1.23355090 -1.09784770 2.17001631 55 56 57 58 59 60 -5.71676941 -2.91595095 8.58397894 1.05122205 7.49318605 1.39706744 61 62 63 64 65 66 -10.21751338 -5.26488693 4.73987897 3.31605520 4.90840917 -0.17106319 67 68 69 70 71 72 0.42753746 8.14176847 -1.42059481 2.74161640 0.42821674 -0.41428362 73 74 75 76 77 78 -1.27200981 -0.27219655 0.21324112 3.67230080 2.51981591 3.95114382 79 80 81 82 83 84 3.98229312 -3.44307594 0.70599922 1.15793840 2.48216869 -2.30112366 85 86 87 88 89 90 -5.75306285 -4.75455143 5.10701492 0.58710400 3.91920277 5.11713313 91 92 93 94 95 96 6.16233119 -0.75523509 10.12885183 5.49960373 -12.51093990 2.20156652 97 98 99 100 101 102 -6.24842568 -0.06699898 -2.51499150 2.09252627 -1.18116905 3.22082284 103 104 105 106 107 108 -2.45402314 -5.06396533 -1.22462410 1.62263529 2.06517806 2.23849326 109 110 111 112 113 114 3.22725991 -4.76151505 -9.70003370 5.42924187 0.68071050 6.18751991 115 116 117 118 119 120 4.56606339 -1.86278865 3.55225682 3.88898073 -10.98498170 -2.10160916 121 122 123 124 125 126 -0.57656104 1.67269583 -2.12425229 -4.60759667 -1.47657808 3.90257463 127 128 129 130 131 132 1.11390343 -4.49294125 -2.63338961 0.47779912 -8.79331197 5.67071549 133 134 135 136 137 138 -5.72433165 -0.46947621 -1.83222176 3.63807735 1.18867005 9.32224524 139 140 141 142 143 144 -2.73467152 5.50672221 0.04559621 4.62379374 1.20156652 -3.70458998 145 -10.15061878 > postscript(file="/var/www/html/rcomp/tmp/6t6bt1292686850.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 = 145 Frequency = 1 lag(myerror, k = 1) myerror 0 0.78719820 NA 1 -3.09636453 0.78719820 2 -3.13823858 -3.09636453 3 2.16357032 -3.13823858 4 0.86411840 2.16357032 5 1.98551373 0.86411840 6 -0.13327815 1.98551373 7 1.61087363 -0.13327815 8 2.56182238 1.61087363 9 3.90215230 2.56182238 10 1.71417723 3.90215230 11 -9.47267994 1.71417723 12 -9.47267994 -9.47267994 13 -2.14590292 -9.47267994 14 -1.94877795 -2.14590292 15 -2.02092988 -1.94877795 16 -14.56273382 -2.02092988 17 5.00067983 -14.56273382 18 1.04491086 5.00067983 19 5.32101563 1.04491086 20 2.98296699 5.32101563 21 -2.49448417 2.98296699 22 -1.10931147 -2.49448417 23 0.80968170 -1.10931147 24 -1.28923488 0.80968170 25 0.70773125 -1.28923488 26 5.17497435 0.70773125 27 -12.65279550 5.17497435 28 -2.28340844 -12.65279550 29 -2.26012103 -2.28340844 30 1.53376366 -2.26012103 31 -0.47373507 1.53376366 32 -0.51051326 -0.47373507 33 -1.45428544 -0.51051326 34 -5.85501092 -1.45428544 35 2.94383421 -5.85501092 36 4.47144394 2.94383421 37 9.19900077 4.47144394 38 3.51933116 9.19900077 39 -8.18728983 3.51933116 40 -9.18728983 -8.18728983 41 -2.63253656 -9.18728983 42 -1.27931943 -2.63253656 43 -0.25857574 -1.27931943 44 -0.71305626 -0.25857574 45 6.49381919 -0.71305626 46 0.57463929 6.49381919 47 2.48216869 0.57463929 48 -1.06180550 2.48216869 49 2.99504791 -1.06180550 50 5.90753536 2.99504791 51 -1.23355090 5.90753536 52 -1.09784770 -1.23355090 53 2.17001631 -1.09784770 54 -5.71676941 2.17001631 55 -2.91595095 -5.71676941 56 8.58397894 -2.91595095 57 1.05122205 8.58397894 58 7.49318605 1.05122205 59 1.39706744 7.49318605 60 -10.21751338 1.39706744 61 -5.26488693 -10.21751338 62 4.73987897 -5.26488693 63 3.31605520 4.73987897 64 4.90840917 3.31605520 65 -0.17106319 4.90840917 66 0.42753746 -0.17106319 67 8.14176847 0.42753746 68 -1.42059481 8.14176847 69 2.74161640 -1.42059481 70 0.42821674 2.74161640 71 -0.41428362 0.42821674 72 -1.27200981 -0.41428362 73 -0.27219655 -1.27200981 74 0.21324112 -0.27219655 75 3.67230080 0.21324112 76 2.51981591 3.67230080 77 3.95114382 2.51981591 78 3.98229312 3.95114382 79 -3.44307594 3.98229312 80 0.70599922 -3.44307594 81 1.15793840 0.70599922 82 2.48216869 1.15793840 83 -2.30112366 2.48216869 84 -5.75306285 -2.30112366 85 -4.75455143 -5.75306285 86 5.10701492 -4.75455143 87 0.58710400 5.10701492 88 3.91920277 0.58710400 89 5.11713313 3.91920277 90 6.16233119 5.11713313 91 -0.75523509 6.16233119 92 10.12885183 -0.75523509 93 5.49960373 10.12885183 94 -12.51093990 5.49960373 95 2.20156652 -12.51093990 96 -6.24842568 2.20156652 97 -0.06699898 -6.24842568 98 -2.51499150 -0.06699898 99 2.09252627 -2.51499150 100 -1.18116905 2.09252627 101 3.22082284 -1.18116905 102 -2.45402314 3.22082284 103 -5.06396533 -2.45402314 104 -1.22462410 -5.06396533 105 1.62263529 -1.22462410 106 2.06517806 1.62263529 107 2.23849326 2.06517806 108 3.22725991 2.23849326 109 -4.76151505 3.22725991 110 -9.70003370 -4.76151505 111 5.42924187 -9.70003370 112 0.68071050 5.42924187 113 6.18751991 0.68071050 114 4.56606339 6.18751991 115 -1.86278865 4.56606339 116 3.55225682 -1.86278865 117 3.88898073 3.55225682 118 -10.98498170 3.88898073 119 -2.10160916 -10.98498170 120 -0.57656104 -2.10160916 121 1.67269583 -0.57656104 122 -2.12425229 1.67269583 123 -4.60759667 -2.12425229 124 -1.47657808 -4.60759667 125 3.90257463 -1.47657808 126 1.11390343 3.90257463 127 -4.49294125 1.11390343 128 -2.63338961 -4.49294125 129 0.47779912 -2.63338961 130 -8.79331197 0.47779912 131 5.67071549 -8.79331197 132 -5.72433165 5.67071549 133 -0.46947621 -5.72433165 134 -1.83222176 -0.46947621 135 3.63807735 -1.83222176 136 1.18867005 3.63807735 137 9.32224524 1.18867005 138 -2.73467152 9.32224524 139 5.50672221 -2.73467152 140 0.04559621 5.50672221 141 4.62379374 0.04559621 142 1.20156652 4.62379374 143 -3.70458998 1.20156652 144 -10.15061878 -3.70458998 145 NA -10.15061878 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.09636453 0.78719820 [2,] -3.13823858 -3.09636453 [3,] 2.16357032 -3.13823858 [4,] 0.86411840 2.16357032 [5,] 1.98551373 0.86411840 [6,] -0.13327815 1.98551373 [7,] 1.61087363 -0.13327815 [8,] 2.56182238 1.61087363 [9,] 3.90215230 2.56182238 [10,] 1.71417723 3.90215230 [11,] -9.47267994 1.71417723 [12,] -9.47267994 -9.47267994 [13,] -2.14590292 -9.47267994 [14,] -1.94877795 -2.14590292 [15,] -2.02092988 -1.94877795 [16,] -14.56273382 -2.02092988 [17,] 5.00067983 -14.56273382 [18,] 1.04491086 5.00067983 [19,] 5.32101563 1.04491086 [20,] 2.98296699 5.32101563 [21,] -2.49448417 2.98296699 [22,] -1.10931147 -2.49448417 [23,] 0.80968170 -1.10931147 [24,] -1.28923488 0.80968170 [25,] 0.70773125 -1.28923488 [26,] 5.17497435 0.70773125 [27,] -12.65279550 5.17497435 [28,] -2.28340844 -12.65279550 [29,] -2.26012103 -2.28340844 [30,] 1.53376366 -2.26012103 [31,] -0.47373507 1.53376366 [32,] -0.51051326 -0.47373507 [33,] -1.45428544 -0.51051326 [34,] -5.85501092 -1.45428544 [35,] 2.94383421 -5.85501092 [36,] 4.47144394 2.94383421 [37,] 9.19900077 4.47144394 [38,] 3.51933116 9.19900077 [39,] -8.18728983 3.51933116 [40,] -9.18728983 -8.18728983 [41,] -2.63253656 -9.18728983 [42,] -1.27931943 -2.63253656 [43,] -0.25857574 -1.27931943 [44,] -0.71305626 -0.25857574 [45,] 6.49381919 -0.71305626 [46,] 0.57463929 6.49381919 [47,] 2.48216869 0.57463929 [48,] -1.06180550 2.48216869 [49,] 2.99504791 -1.06180550 [50,] 5.90753536 2.99504791 [51,] -1.23355090 5.90753536 [52,] -1.09784770 -1.23355090 [53,] 2.17001631 -1.09784770 [54,] -5.71676941 2.17001631 [55,] -2.91595095 -5.71676941 [56,] 8.58397894 -2.91595095 [57,] 1.05122205 8.58397894 [58,] 7.49318605 1.05122205 [59,] 1.39706744 7.49318605 [60,] -10.21751338 1.39706744 [61,] -5.26488693 -10.21751338 [62,] 4.73987897 -5.26488693 [63,] 3.31605520 4.73987897 [64,] 4.90840917 3.31605520 [65,] -0.17106319 4.90840917 [66,] 0.42753746 -0.17106319 [67,] 8.14176847 0.42753746 [68,] -1.42059481 8.14176847 [69,] 2.74161640 -1.42059481 [70,] 0.42821674 2.74161640 [71,] -0.41428362 0.42821674 [72,] -1.27200981 -0.41428362 [73,] -0.27219655 -1.27200981 [74,] 0.21324112 -0.27219655 [75,] 3.67230080 0.21324112 [76,] 2.51981591 3.67230080 [77,] 3.95114382 2.51981591 [78,] 3.98229312 3.95114382 [79,] -3.44307594 3.98229312 [80,] 0.70599922 -3.44307594 [81,] 1.15793840 0.70599922 [82,] 2.48216869 1.15793840 [83,] -2.30112366 2.48216869 [84,] -5.75306285 -2.30112366 [85,] -4.75455143 -5.75306285 [86,] 5.10701492 -4.75455143 [87,] 0.58710400 5.10701492 [88,] 3.91920277 0.58710400 [89,] 5.11713313 3.91920277 [90,] 6.16233119 5.11713313 [91,] -0.75523509 6.16233119 [92,] 10.12885183 -0.75523509 [93,] 5.49960373 10.12885183 [94,] -12.51093990 5.49960373 [95,] 2.20156652 -12.51093990 [96,] -6.24842568 2.20156652 [97,] -0.06699898 -6.24842568 [98,] -2.51499150 -0.06699898 [99,] 2.09252627 -2.51499150 [100,] -1.18116905 2.09252627 [101,] 3.22082284 -1.18116905 [102,] -2.45402314 3.22082284 [103,] -5.06396533 -2.45402314 [104,] -1.22462410 -5.06396533 [105,] 1.62263529 -1.22462410 [106,] 2.06517806 1.62263529 [107,] 2.23849326 2.06517806 [108,] 3.22725991 2.23849326 [109,] -4.76151505 3.22725991 [110,] -9.70003370 -4.76151505 [111,] 5.42924187 -9.70003370 [112,] 0.68071050 5.42924187 [113,] 6.18751991 0.68071050 [114,] 4.56606339 6.18751991 [115,] -1.86278865 4.56606339 [116,] 3.55225682 -1.86278865 [117,] 3.88898073 3.55225682 [118,] -10.98498170 3.88898073 [119,] -2.10160916 -10.98498170 [120,] -0.57656104 -2.10160916 [121,] 1.67269583 -0.57656104 [122,] -2.12425229 1.67269583 [123,] -4.60759667 -2.12425229 [124,] -1.47657808 -4.60759667 [125,] 3.90257463 -1.47657808 [126,] 1.11390343 3.90257463 [127,] -4.49294125 1.11390343 [128,] -2.63338961 -4.49294125 [129,] 0.47779912 -2.63338961 [130,] -8.79331197 0.47779912 [131,] 5.67071549 -8.79331197 [132,] -5.72433165 5.67071549 [133,] -0.46947621 -5.72433165 [134,] -1.83222176 -0.46947621 [135,] 3.63807735 -1.83222176 [136,] 1.18867005 3.63807735 [137,] 9.32224524 1.18867005 [138,] -2.73467152 9.32224524 [139,] 5.50672221 -2.73467152 [140,] 0.04559621 5.50672221 [141,] 4.62379374 0.04559621 [142,] 1.20156652 4.62379374 [143,] -3.70458998 1.20156652 [144,] -10.15061878 -3.70458998 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.09636453 0.78719820 2 -3.13823858 -3.09636453 3 2.16357032 -3.13823858 4 0.86411840 2.16357032 5 1.98551373 0.86411840 6 -0.13327815 1.98551373 7 1.61087363 -0.13327815 8 2.56182238 1.61087363 9 3.90215230 2.56182238 10 1.71417723 3.90215230 11 -9.47267994 1.71417723 12 -9.47267994 -9.47267994 13 -2.14590292 -9.47267994 14 -1.94877795 -2.14590292 15 -2.02092988 -1.94877795 16 -14.56273382 -2.02092988 17 5.00067983 -14.56273382 18 1.04491086 5.00067983 19 5.32101563 1.04491086 20 2.98296699 5.32101563 21 -2.49448417 2.98296699 22 -1.10931147 -2.49448417 23 0.80968170 -1.10931147 24 -1.28923488 0.80968170 25 0.70773125 -1.28923488 26 5.17497435 0.70773125 27 -12.65279550 5.17497435 28 -2.28340844 -12.65279550 29 -2.26012103 -2.28340844 30 1.53376366 -2.26012103 31 -0.47373507 1.53376366 32 -0.51051326 -0.47373507 33 -1.45428544 -0.51051326 34 -5.85501092 -1.45428544 35 2.94383421 -5.85501092 36 4.47144394 2.94383421 37 9.19900077 4.47144394 38 3.51933116 9.19900077 39 -8.18728983 3.51933116 40 -9.18728983 -8.18728983 41 -2.63253656 -9.18728983 42 -1.27931943 -2.63253656 43 -0.25857574 -1.27931943 44 -0.71305626 -0.25857574 45 6.49381919 -0.71305626 46 0.57463929 6.49381919 47 2.48216869 0.57463929 48 -1.06180550 2.48216869 49 2.99504791 -1.06180550 50 5.90753536 2.99504791 51 -1.23355090 5.90753536 52 -1.09784770 -1.23355090 53 2.17001631 -1.09784770 54 -5.71676941 2.17001631 55 -2.91595095 -5.71676941 56 8.58397894 -2.91595095 57 1.05122205 8.58397894 58 7.49318605 1.05122205 59 1.39706744 7.49318605 60 -10.21751338 1.39706744 61 -5.26488693 -10.21751338 62 4.73987897 -5.26488693 63 3.31605520 4.73987897 64 4.90840917 3.31605520 65 -0.17106319 4.90840917 66 0.42753746 -0.17106319 67 8.14176847 0.42753746 68 -1.42059481 8.14176847 69 2.74161640 -1.42059481 70 0.42821674 2.74161640 71 -0.41428362 0.42821674 72 -1.27200981 -0.41428362 73 -0.27219655 -1.27200981 74 0.21324112 -0.27219655 75 3.67230080 0.21324112 76 2.51981591 3.67230080 77 3.95114382 2.51981591 78 3.98229312 3.95114382 79 -3.44307594 3.98229312 80 0.70599922 -3.44307594 81 1.15793840 0.70599922 82 2.48216869 1.15793840 83 -2.30112366 2.48216869 84 -5.75306285 -2.30112366 85 -4.75455143 -5.75306285 86 5.10701492 -4.75455143 87 0.58710400 5.10701492 88 3.91920277 0.58710400 89 5.11713313 3.91920277 90 6.16233119 5.11713313 91 -0.75523509 6.16233119 92 10.12885183 -0.75523509 93 5.49960373 10.12885183 94 -12.51093990 5.49960373 95 2.20156652 -12.51093990 96 -6.24842568 2.20156652 97 -0.06699898 -6.24842568 98 -2.51499150 -0.06699898 99 2.09252627 -2.51499150 100 -1.18116905 2.09252627 101 3.22082284 -1.18116905 102 -2.45402314 3.22082284 103 -5.06396533 -2.45402314 104 -1.22462410 -5.06396533 105 1.62263529 -1.22462410 106 2.06517806 1.62263529 107 2.23849326 2.06517806 108 3.22725991 2.23849326 109 -4.76151505 3.22725991 110 -9.70003370 -4.76151505 111 5.42924187 -9.70003370 112 0.68071050 5.42924187 113 6.18751991 0.68071050 114 4.56606339 6.18751991 115 -1.86278865 4.56606339 116 3.55225682 -1.86278865 117 3.88898073 3.55225682 118 -10.98498170 3.88898073 119 -2.10160916 -10.98498170 120 -0.57656104 -2.10160916 121 1.67269583 -0.57656104 122 -2.12425229 1.67269583 123 -4.60759667 -2.12425229 124 -1.47657808 -4.60759667 125 3.90257463 -1.47657808 126 1.11390343 3.90257463 127 -4.49294125 1.11390343 128 -2.63338961 -4.49294125 129 0.47779912 -2.63338961 130 -8.79331197 0.47779912 131 5.67071549 -8.79331197 132 -5.72433165 5.67071549 133 -0.46947621 -5.72433165 134 -1.83222176 -0.46947621 135 3.63807735 -1.83222176 136 1.18867005 3.63807735 137 9.32224524 1.18867005 138 -2.73467152 9.32224524 139 5.50672221 -2.73467152 140 0.04559621 5.50672221 141 4.62379374 0.04559621 142 1.20156652 4.62379374 143 -3.70458998 1.20156652 144 -10.15061878 -3.70458998 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/74xse1292686850.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/html/rcomp/tmp/84xse1292686850.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/html/rcomp/tmp/9forz1292686850.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/html/rcomp/tmp/10forz1292686850.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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/1107qn1292686850.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12l87b1292686850.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13sr441292686850.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14li3p1292686850.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15611d1292686850.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16a1i11292686850.tab") + } > > try(system("convert tmp/185un1292686850.ps tmp/185un1292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/2jfc81292686850.ps tmp/2jfc81292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/3jfc81292686850.ps tmp/3jfc81292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/4jfc81292686850.ps tmp/4jfc81292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/5t6bt1292686850.ps tmp/5t6bt1292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/6t6bt1292686850.ps tmp/6t6bt1292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/74xse1292686850.ps tmp/74xse1292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/84xse1292686850.ps tmp/84xse1292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/9forz1292686850.ps tmp/9forz1292686850.png",intern=TRUE)) character(0) > try(system("convert tmp/10forz1292686850.ps tmp/10forz1292686850.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.214 1.808 10.782