R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(2 + ,24 + ,48 + ,14 + ,28 + ,11 + ,22 + ,12 + ,24 + ,24 + ,48 + ,26 + ,52 + ,1 + ,25 + ,25 + ,11 + ,11 + ,7 + ,7 + ,8 + ,8 + ,25 + ,25 + ,23 + ,23 + ,1 + ,17 + ,17 + ,6 + ,6 + ,17 + ,17 + ,8 + ,8 + ,30 + ,30 + ,25 + ,25 + ,1 + ,18 + ,18 + ,12 + ,12 + ,10 + ,10 + ,8 + ,8 + ,19 + ,19 + ,23 + ,23 + ,1 + ,18 + ,18 + ,8 + ,8 + ,12 + ,12 + ,9 + ,9 + ,22 + ,22 + ,19 + ,19 + ,1 + ,16 + ,16 + ,10 + ,10 + ,12 + ,12 + ,7 + ,7 + ,22 + ,22 + ,29 + ,29 + ,2 + ,20 + ,40 + ,10 + ,20 + ,11 + ,22 + ,4 + ,8 + ,25 + ,50 + ,25 + ,50 + ,2 + ,16 + ,32 + ,11 + ,22 + ,11 + ,22 + ,11 + ,22 + ,23 + ,46 + ,21 + ,42 + ,1 + ,18 + ,18 + ,16 + ,16 + ,12 + ,12 + ,7 + ,7 + ,17 + ,17 + ,22 + ,22 + ,1 + ,17 + ,17 + ,11 + ,11 + ,13 + ,13 + ,7 + ,7 + ,21 + ,21 + ,25 + ,25 + ,1 + ,23 + ,23 + ,13 + ,13 + ,14 + ,14 + ,12 + ,12 + ,19 + ,19 + ,24 + ,24 + ,2 + ,30 + ,60 + ,12 + ,24 + ,16 + ,32 + ,10 + ,20 + ,19 + ,38 + ,18 + ,36 + ,2 + ,23 + ,46 + ,8 + ,16 + ,11 + ,22 + ,10 + ,20 + ,15 + ,30 + ,22 + ,44 + ,2 + ,18 + ,36 + ,12 + ,24 + ,10 + ,20 + ,8 + ,16 + ,16 + ,32 + ,15 + ,30 + ,1 + ,15 + ,15 + ,11 + ,11 + ,11 + ,11 + ,8 + ,8 + ,23 + ,23 + ,22 + ,22 + ,2 + ,12 + ,24 + ,4 + ,8 + ,15 + ,30 + ,4 + ,8 + ,27 + ,54 + ,28 + ,56 + ,1 + ,21 + ,21 + ,9 + ,9 + ,9 + ,9 + ,9 + ,9 + ,22 + ,22 + ,20 + ,20 + ,1 + ,15 + ,15 + ,8 + ,8 + ,11 + ,11 + ,8 + ,8 + ,14 + ,14 + ,12 + ,12 + ,2 + ,20 + ,40 + ,8 + ,16 + ,17 + ,34 + ,7 + ,14 + ,22 + ,44 + ,24 + ,48 + ,2 + ,31 + ,62 + ,14 + ,28 + ,17 + ,34 + ,11 + ,22 + ,23 + ,46 + ,20 + ,40 + ,1 + ,27 + ,27 + ,15 + ,15 + ,11 + ,11 + ,9 + ,9 + ,23 + ,23 + ,21 + ,21 + ,2 + ,34 + ,68 + ,16 + ,32 + ,18 + ,36 + ,11 + ,22 + ,21 + ,42 + ,20 + ,40 + ,2 + ,21 + ,42 + ,9 + ,18 + ,14 + ,28 + ,13 + ,26 + ,19 + ,38 + ,21 + ,42 + ,1 + ,31 + ,31 + ,14 + ,14 + ,10 + ,10 + ,8 + ,8 + ,18 + ,18 + ,23 + ,23 + ,2 + ,19 + ,38 + ,11 + ,22 + ,11 + ,22 + ,8 + ,16 + ,20 + ,40 + ,28 + ,56 + ,2 + ,16 + ,32 + ,8 + ,16 + ,15 + ,30 + ,9 + ,18 + ,23 + ,46 + ,24 + ,48 + ,2 + ,20 + ,40 + ,9 + ,18 + ,15 + ,30 + ,6 + ,12 + ,25 + ,50 + ,24 + ,48 + ,2 + ,21 + ,42 + ,9 + ,18 + ,13 + ,26 + ,9 + ,18 + ,19 + ,38 + ,24 + ,48 + ,1 + ,22 + ,22 + ,9 + ,9 + ,16 + ,16 + ,9 + ,9 + ,24 + ,24 + ,23 + ,23 + ,2 + ,17 + ,34 + ,9 + ,18 + ,13 + ,26 + ,6 + ,12 + ,22 + ,44 + ,23 + ,46 + ,2 + ,24 + ,48 + ,10 + ,20 + ,9 + ,18 + ,6 + ,12 + ,25 + ,50 + ,29 + ,58 + ,2 + ,25 + ,50 + ,16 + ,32 + ,18 + ,36 + ,16 + ,32 + ,26 + ,52 + ,24 + ,48 + ,1 + ,26 + ,26 + ,11 + ,11 + ,18 + ,18 + ,5 + ,5 + ,29 + ,29 + ,18 + ,18 + ,2 + ,25 + ,50 + ,8 + ,16 + ,12 + ,24 + ,7 + ,14 + ,32 + ,64 + ,25 + ,50 + ,1 + ,17 + ,17 + ,9 + ,9 + ,17 + ,17 + ,9 + ,9 + ,25 + ,25 + ,21 + ,21 + ,1 + ,32 + ,32 + ,16 + ,16 + ,9 + ,9 + ,6 + ,6 + ,29 + ,29 + ,26 + ,26 + ,1 + ,33 + ,33 + ,11 + ,11 + ,9 + ,9 + ,6 + ,6 + ,28 + ,28 + ,22 + ,22 + ,1 + ,13 + ,13 + ,16 + ,16 + ,12 + ,12 + ,5 + ,5 + ,17 + ,17 + ,22 + ,22 + ,1 + ,32 + ,32 + ,12 + ,12 + ,18 + ,18 + ,12 + ,12 + ,28 + ,28 + ,22 + ,22 + ,2 + ,25 + ,50 + ,12 + ,24 + ,12 + ,24 + ,7 + ,14 + ,29 + ,58 + ,23 + ,46 + ,2 + ,29 + ,58 + ,14 + ,28 + ,18 + ,36 + ,10 + ,20 + ,26 + ,52 + ,30 + ,60 + ,1 + ,22 + ,22 + ,9 + ,9 + ,14 + ,14 + ,9 + ,9 + ,25 + ,25 + ,23 + ,23 + ,2 + ,18 + ,36 + ,10 + ,20 + ,15 + ,30 + ,8 + ,16 + ,14 + ,28 + ,17 + ,34 + ,2 + ,17 + ,34 + ,9 + ,18 + ,16 + ,32 + ,5 + ,10 + ,25 + ,50 + ,23 + ,46 + ,1 + ,20 + ,20 + ,10 + ,10 + ,10 + ,10 + ,8 + ,8 + ,26 + ,26 + ,23 + ,23 + ,1 + ,15 + ,15 + ,12 + ,12 + ,11 + ,11 + ,8 + ,8 + ,20 + ,20 + ,25 + ,25 + ,2 + ,20 + ,40 + ,14 + ,28 + ,14 + ,28 + ,10 + ,20 + ,18 + ,36 + ,24 + ,48 + ,1 + ,33 + ,33 + ,14 + ,14 + ,9 + ,9 + ,6 + ,6 + ,32 + ,32 + ,24 + ,24 + ,1 + ,29 + ,29 + ,10 + ,10 + ,12 + ,12 + ,8 + ,8 + ,25 + ,25 + ,23 + ,23 + ,1 + ,23 + ,23 + ,14 + ,14 + ,17 + ,17 + ,7 + ,7 + ,25 + ,25 + ,21 + ,21 + ,2 + ,26 + ,52 + ,16 + ,32 + ,5 + ,10 + ,4 + ,8 + ,23 + ,46 + ,24 + ,48 + ,2 + ,18 + ,36 + ,9 + ,18 + ,12 + ,24 + ,8 + ,16 + ,21 + ,42 + ,24 + ,48 + ,2 + ,20 + ,40 + ,10 + ,20 + ,12 + ,24 + ,8 + ,16 + ,20 + ,40 + ,28 + ,56 + ,2 + ,11 + ,22 + ,6 + ,12 + ,6 + ,12 + ,4 + ,8 + ,15 + ,30 + ,16 + ,32 + ,2 + ,28 + ,56 + ,8 + ,16 + ,24 + ,48 + ,20 + ,40 + ,30 + ,60 + ,20 + ,40 + ,1 + ,26 + ,26 + ,13 + ,13 + ,12 + ,12 + ,8 + ,8 + ,24 + ,24 + ,29 + ,29 + ,1 + ,22 + ,22 + ,10 + ,10 + ,12 + ,12 + ,8 + ,8 + ,26 + ,26 + ,27 + ,27 + ,2 + ,17 + ,34 + ,8 + ,16 + ,14 + ,28 + ,6 + ,12 + ,24 + ,48 + ,22 + ,44 + ,2 + ,12 + ,24 + ,7 + ,14 + ,7 + ,14 + ,4 + ,8 + ,22 + ,44 + ,28 + ,56 + ,2 + ,14 + ,28 + ,15 + ,30 + ,13 + ,26 + ,8 + ,16 + ,14 + ,28 + ,16 + ,32 + ,1 + ,17 + ,17 + ,9 + ,9 + ,12 + ,12 + ,9 + ,9 + ,24 + ,24 + ,25 + ,25 + ,2 + ,21 + ,42 + ,10 + ,20 + ,13 + ,26 + ,6 + ,12 + ,24 + ,48 + ,24 + ,48 + ,1 + ,19 + ,19 + ,12 + ,12 + ,14 + ,14 + ,7 + ,7 + ,24 + ,24 + ,28 + ,28 + ,2 + ,18 + ,36 + ,13 + ,26 + ,8 + ,16 + ,9 + ,18 + ,24 + ,48 + ,24 + ,48 + ,1 + ,10 + ,10 + ,10 + ,10 + ,11 + ,11 + ,5 + ,5 + ,19 + ,19 + ,23 + ,23 + ,1 + ,29 + ,29 + ,11 + ,11 + ,9 + ,9 + ,5 + ,5 + ,31 + ,31 + ,30 + ,30 + ,1 + ,31 + ,31 + ,8 + ,8 + ,11 + ,11 + ,8 + ,8 + ,22 + ,22 + ,24 + ,24 + ,1 + ,19 + ,19 + ,9 + ,9 + ,13 + ,13 + ,8 + ,8 + ,27 + ,27 + ,21 + ,21 + ,1 + ,9 + ,9 + ,13 + ,13 + ,10 + ,10 + ,6 + ,6 + ,19 + ,19 + ,25 + ,25 + ,2 + ,20 + ,40 + ,11 + ,22 + ,11 + ,22 + ,8 + ,16 + ,25 + ,50 + ,25 + ,50 + ,2 + ,28 + ,56 + ,8 + ,16 + ,12 + ,24 + ,7 + ,14 + ,20 + ,40 + ,22 + ,44 + ,2 + ,19 + ,38 + ,9 + ,18 + ,9 + ,18 + ,7 + ,14 + ,21 + ,42 + ,23 + ,46 + ,2 + ,30 + ,60 + ,9 + ,18 + ,15 + ,30 + ,9 + ,18 + ,27 + ,54 + ,26 + ,52 + ,2 + ,29 + ,58 + ,15 + ,30 + ,18 + ,36 + ,11 + ,22 + ,23 + ,46 + ,23 + ,46 + ,2 + ,26 + ,52 + ,9 + ,18 + ,15 + ,30 + ,6 + ,12 + ,25 + ,50 + ,25 + ,50 + ,1 + ,23 + ,23 + ,10 + ,10 + ,12 + ,12 + ,8 + ,8 + ,20 + ,20 + ,21 + ,21 + ,2 + ,13 + ,26 + ,14 + ,28 + ,13 + ,26 + ,6 + ,12 + ,21 + ,42 + ,25 + ,50 + ,1 + ,21 + ,21 + ,12 + ,12 + ,14 + ,14 + ,9 + ,9 + ,22 + ,22 + ,24 + ,24 + ,2 + ,19 + ,38 + ,12 + ,24 + ,10 + ,20 + ,8 + ,16 + ,23 + ,46 + ,29 + ,58 + ,2 + ,28 + ,56 + ,11 + ,22 + ,13 + ,26 + ,6 + ,12 + ,25 + ,50 + ,22 + ,44 + ,2 + ,23 + ,46 + ,14 + ,28 + ,13 + ,26 + ,10 + ,20 + ,25 + ,50 + ,27 + ,54 + ,1 + ,18 + ,18 + ,6 + ,6 + ,11 + ,11 + ,8 + ,8 + ,17 + ,17 + ,26 + ,26 + ,2 + ,21 + ,42 + ,12 + ,24 + ,13 + ,26 + ,8 + ,16 + ,19 + ,38 + ,22 + ,44 + ,1 + ,20 + ,20 + ,8 + ,8 + ,16 + ,16 + ,10 + ,10 + ,25 + ,25 + ,24 + ,24 + ,2 + ,23 + ,46 + ,14 + ,28 + ,8 + ,16 + ,5 + ,10 + ,19 + ,38 + ,27 + ,54 + ,2 + ,21 + ,42 + ,11 + ,22 + ,16 + ,32 + ,7 + ,14 + ,20 + ,40 + ,24 + ,48 + ,2 + ,21 + ,42 + ,10 + ,20 + ,11 + ,22 + ,5 + ,10 + ,26 + ,52 + ,24 + ,48 + ,1 + ,15 + ,15 + ,14 + ,14 + ,9 + ,9 + ,8 + ,8 + ,23 + ,23 + ,29 + ,29 + ,1 + ,28 + ,28 + ,12 + ,12 + ,16 + ,16 + ,14 + ,14 + ,27 + ,27 + ,22 + ,22 + ,2 + ,19 + ,38 + ,10 + ,20 + ,12 + ,24 + ,7 + ,14 + ,17 + ,34 + ,21 + ,42 + ,2 + ,26 + ,52 + ,14 + ,28 + ,14 + ,28 + ,8 + ,16 + ,17 + ,34 + ,24 + ,48 + ,2 + ,10 + ,20 + ,5 + ,10 + ,8 + ,16 + ,6 + ,12 + ,19 + ,38 + ,24 + ,48 + ,1 + ,16 + ,16 + ,11 + ,11 + ,9 + ,9 + ,5 + ,5 + ,17 + ,17 + ,23 + ,23 + ,2 + ,22 + ,44 + ,10 + ,20 + ,15 + ,30 + ,6 + ,12 + ,22 + ,44 + ,20 + ,40 + ,2 + ,19 + ,38 + ,9 + ,18 + ,11 + ,22 + ,10 + ,20 + ,21 + ,42 + ,27 + ,54 + ,2 + ,31 + ,62 + ,10 + ,20 + ,21 + ,42 + ,12 + ,24 + ,32 + ,64 + ,26 + ,52 + ,2 + ,31 + ,62 + ,16 + ,32 + ,14 + ,28 + ,9 + ,18 + ,21 + ,42 + ,25 + ,50 + ,1 + ,29 + ,29 + ,13 + ,13 + ,18 + ,18 + ,12 + ,12 + ,21 + ,21 + ,21 + ,21 + ,1 + ,19 + ,19 + ,9 + ,9 + ,12 + ,12 + ,7 + ,7 + ,18 + ,18 + ,21 + ,21 + ,1 + ,22 + ,22 + ,10 + ,10 + ,13 + ,13 + ,8 + ,8 + ,18 + ,18 + ,19 + ,19 + ,2 + ,23 + ,46 + ,10 + ,20 + ,15 + ,30 + ,10 + ,20 + ,23 + ,46 + ,21 + ,42 + ,1 + ,15 + ,15 + ,7 + ,7 + ,12 + ,12 + ,6 + ,6 + ,19 + ,19 + ,21 + ,21 + ,2 + ,20 + ,40 + ,9 + ,18 + ,19 + ,38 + ,10 + ,20 + ,20 + ,40 + ,16 + ,32 + ,2 + ,18 + ,36 + ,8 + ,16 + ,15 + ,30 + ,10 + ,20 + ,21 + ,42 + ,22 + ,44 + ,1 + ,23 + ,23 + ,14 + ,14 + ,11 + ,11 + ,10 + ,10 + ,20 + ,20 + ,29 + ,29 + ,1 + ,25 + ,25 + ,14 + ,14 + ,11 + ,11 + ,5 + ,5 + ,17 + ,17 + ,15 + ,15 + ,2 + ,21 + ,42 + ,8 + ,16 + ,10 + ,20 + ,7 + ,14 + ,18 + ,36 + ,17 + ,34 + ,2 + ,24 + ,48 + ,9 + ,18 + ,13 + ,26 + ,10 + ,20 + ,19 + ,38 + ,15 + ,30 + ,1 + ,25 + ,25 + ,14 + ,14 + ,15 + ,15 + ,11 + ,11 + ,22 + ,22 + ,21 + ,21 + ,2 + ,17 + ,34 + ,14 + ,28 + ,12 + ,24 + ,6 + ,12 + ,15 + ,30 + ,21 + ,42 + ,2 + ,13 + ,26 + ,8 + ,16 + ,12 + ,24 + ,7 + ,14 + ,14 + ,28 + ,19 + ,38 + ,2 + ,28 + ,56 + ,8 + ,16 + ,16 + ,32 + ,12 + ,24 + ,18 + ,36 + ,24 + ,48 + ,2 + ,21 + ,42 + ,8 + ,16 + ,9 + ,18 + ,11 + ,22 + ,24 + ,48 + ,20 + ,40 + ,2 + ,25 + ,50 + ,7 + ,14 + ,18 + ,36 + ,11 + ,22 + ,35 + ,70 + ,17 + ,34 + ,2 + ,9 + ,18 + ,6 + ,12 + ,8 + ,16 + ,11 + ,22 + ,29 + ,58 + ,23 + ,46 + ,1 + ,16 + ,16 + ,8 + ,8 + ,13 + ,13 + ,5 + ,5 + ,21 + ,21 + ,24 + ,24 + ,2 + ,19 + ,38 + ,6 + ,12 + ,17 + ,34 + ,8 + ,16 + ,25 + ,50 + ,14 + ,28 + ,2 + ,17 + ,34 + ,11 + ,22 + ,9 + ,18 + ,6 + ,12 + ,20 + ,40 + ,19 + ,38 + ,2 + ,25 + ,50 + ,14 + ,28 + ,15 + ,30 + ,9 + ,18 + ,22 + ,44 + ,24 + ,48 + ,2 + ,20 + ,40 + ,11 + ,22 + ,8 + ,16 + ,4 + ,8 + ,13 + ,26 + ,13 + ,26 + ,2 + ,29 + ,58 + ,11 + ,22 + ,7 + ,14 + ,4 + ,8 + ,26 + ,52 + ,22 + ,44 + ,1 + ,14 + ,14 + ,11 + ,11 + ,12 + ,12 + ,7 + ,7 + ,17 + ,17 + ,16 + ,16 + ,1 + ,22 + ,22 + ,14 + ,14 + ,14 + ,14 + ,11 + ,11 + ,25 + ,25 + ,19 + ,19 + ,1 + ,15 + ,15 + ,8 + ,8 + ,6 + ,6 + ,6 + ,6 + ,20 + ,20 + ,25 + ,25 + ,1 + ,19 + ,19 + ,20 + ,20 + ,8 + ,8 + ,7 + ,7 + ,19 + ,19 + ,25 + ,25 + ,2 + ,20 + ,40 + ,11 + ,22 + ,17 + ,34 + ,8 + ,16 + ,21 + ,42 + ,23 + ,46 + ,2 + ,15 + ,30 + ,8 + ,16 + ,10 + ,20 + ,4 + ,8 + ,22 + ,44 + ,24 + ,48 + ,1 + ,20 + ,20 + ,11 + ,11 + ,11 + ,11 + ,8 + ,8 + ,24 + ,24 + ,26 + ,26 + ,2 + ,18 + ,36 + ,10 + ,20 + ,14 + ,28 + ,9 + ,18 + ,21 + ,42 + ,26 + ,52 + ,2 + ,33 + ,66 + ,14 + ,28 + ,11 + ,22 + ,8 + ,16 + ,26 + ,52 + ,25 + ,50 + ,2 + ,22 + ,44 + ,11 + ,22 + ,13 + ,26 + ,11 + ,22 + ,24 + ,48 + ,18 + ,36 + ,1 + ,16 + ,16 + ,9 + ,9 + ,12 + ,12 + ,8 + ,8 + ,16 + ,16 + ,21 + ,21 + ,1 + ,17 + ,17 + ,9 + ,9 + ,11 + ,11 + ,5 + ,5 + ,23 + ,23 + ,26 + ,26 + ,1 + ,16 + ,16 + ,8 + ,8 + ,9 + ,9 + ,4 + ,4 + ,18 + ,18 + ,23 + ,23 + ,2 + ,21 + ,42 + ,10 + ,20 + ,12 + ,24 + ,8 + ,16 + ,16 + ,32 + ,23 + ,46 + ,1 + ,26 + ,26 + ,13 + ,13 + ,20 + ,20 + ,10 + ,10 + ,26 + ,26 + ,22 + ,22 + ,1 + ,18 + ,18 + ,13 + ,13 + ,12 + ,12 + ,6 + ,6 + ,19 + ,19 + ,20 + ,20 + ,1 + ,18 + ,18 + ,12 + ,12 + ,13 + ,13 + ,9 + ,9 + ,21 + ,21 + ,13 + ,13 + ,2 + ,17 + ,34 + ,8 + ,16 + ,12 + ,24 + ,9 + ,18 + ,21 + ,42 + ,24 + ,48 + ,2 + ,22 + ,44 + ,13 + ,26 + ,12 + ,24 + ,13 + ,26 + ,22 + ,44 + ,15 + ,30 + ,2 + ,30 + ,60 + ,14 + ,28 + ,9 + ,18 + ,9 + ,18 + ,23 + ,46 + ,14 + ,28 + ,1 + ,30 + ,30 + ,12 + ,12 + ,15 + ,15 + ,10 + ,10 + ,29 + ,29 + ,22 + ,22 + ,1 + ,24 + ,24 + ,14 + ,14 + ,24 + ,24 + ,20 + ,20 + ,21 + ,21 + ,10 + ,10 + ,1 + ,21 + ,21 + ,15 + ,15 + ,7 + ,7 + ,5 + ,5 + ,21 + ,21 + ,24 + ,24 + ,1 + ,21 + ,21 + ,13 + ,13 + ,17 + ,17 + ,11 + ,11 + ,23 + ,23 + ,22 + ,22 + ,2 + ,29 + ,58 + ,16 + ,32 + ,11 + ,22 + ,6 + ,12 + ,27 + ,54 + ,24 + ,48 + ,2 + ,31 + ,62 + ,9 + ,18 + ,17 + ,34 + ,9 + ,18 + ,25 + ,50 + ,19 + ,38 + ,1 + ,20 + ,20 + ,9 + ,9 + ,11 + ,11 + ,7 + ,7 + ,21 + ,21 + ,20 + ,20 + ,1 + ,16 + ,16 + ,9 + ,9 + ,12 + ,12 + ,9 + ,9 + ,10 + ,10 + ,13 + ,13 + ,1 + ,22 + ,22 + ,8 + ,8 + ,14 + ,14 + ,10 + ,10 + ,20 + ,20 + ,20 + ,20 + ,2 + ,20 + ,40 + ,7 + ,14 + ,11 + ,22 + ,9 + ,18 + ,26 + ,52 + ,22 + ,44 + ,2 + ,28 + ,56 + ,16 + ,32 + ,16 + ,32 + ,8 + ,16 + ,24 + ,48 + ,24 + ,48 + ,2 + ,38 + ,76 + ,11 + ,22 + ,21 + ,42 + ,7 + ,14 + ,29 + ,58 + ,29 + ,58 + ,1 + ,22 + ,22 + ,9 + ,9 + ,14 + ,14 + ,6 + ,6 + ,19 + ,19 + ,12 + ,12 + ,2 + ,20 + ,40 + ,11 + ,22 + ,20 + ,40 + ,13 + ,26 + ,24 + ,48 + ,20 + ,40 + ,2 + ,17 + ,34 + ,9 + ,18 + ,13 + ,26 + ,6 + ,12 + ,19 + ,38 + ,21 + ,42 + ,2 + ,28 + ,56 + ,14 + ,28 + ,11 + ,22 + ,8 + ,16 + ,24 + ,48 + ,24 + ,48 + ,2 + ,22 + ,44 + ,13 + ,26 + ,15 + ,30 + ,10 + ,20 + ,22 + ,44 + ,22 + ,44 + ,1 + ,31 + ,31 + ,16 + ,16 + ,19 + ,19 + ,16 + ,16 + ,17 + ,17 + ,20 + ,20) + ,dim=c(13 + ,159) + ,dimnames=list(c('Gender' + ,'ConcernoverMistakes' + ,'C*G' + ,'Doubtsaboutactions' + ,'D*G' + ,'ParentalExpectations' + ,'PE*G' + ,'ParentalCriticism' + ,'PC*G' + ,'PersonalStandards' + ,'PS*G' + ,'Organization' + ,'O*G') + ,1:159)) > y <- array(NA,dim=c(13,159),dimnames=list(c('Gender','ConcernoverMistakes','C*G','Doubtsaboutactions','D*G','ParentalExpectations','PE*G','ParentalCriticism','PC*G','PersonalStandards','PS*G','Organization','O*G'),1:159)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '6' > 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 ParentalExpectations Gender ConcernoverMistakes C*G Doubtsaboutactions D*G 1 11 2 24 48 14 28 2 7 1 25 25 11 11 3 17 1 17 17 6 6 4 10 1 18 18 12 12 5 12 1 18 18 8 8 6 12 1 16 16 10 10 7 11 2 20 40 10 20 8 11 2 16 32 11 22 9 12 1 18 18 16 16 10 13 1 17 17 11 11 11 14 1 23 23 13 13 12 16 2 30 60 12 24 13 11 2 23 46 8 16 14 10 2 18 36 12 24 15 11 1 15 15 11 11 16 15 2 12 24 4 8 17 9 1 21 21 9 9 18 11 1 15 15 8 8 19 17 2 20 40 8 16 20 17 2 31 62 14 28 21 11 1 27 27 15 15 22 18 2 34 68 16 32 23 14 2 21 42 9 18 24 10 1 31 31 14 14 25 11 2 19 38 11 22 26 15 2 16 32 8 16 27 15 2 20 40 9 18 28 13 2 21 42 9 18 29 16 1 22 22 9 9 30 13 2 17 34 9 18 31 9 2 24 48 10 20 32 18 2 25 50 16 32 33 18 1 26 26 11 11 34 12 2 25 50 8 16 35 17 1 17 17 9 9 36 9 1 32 32 16 16 37 9 1 33 33 11 11 38 12 1 13 13 16 16 39 18 1 32 32 12 12 40 12 2 25 50 12 24 41 18 2 29 58 14 28 42 14 1 22 22 9 9 43 15 2 18 36 10 20 44 16 2 17 34 9 18 45 10 1 20 20 10 10 46 11 1 15 15 12 12 47 14 2 20 40 14 28 48 9 1 33 33 14 14 49 12 1 29 29 10 10 50 17 1 23 23 14 14 51 5 2 26 52 16 32 52 12 2 18 36 9 18 53 12 2 20 40 10 20 54 6 2 11 22 6 12 55 24 2 28 56 8 16 56 12 1 26 26 13 13 57 12 1 22 22 10 10 58 14 2 17 34 8 16 59 7 2 12 24 7 14 60 13 2 14 28 15 30 61 12 1 17 17 9 9 62 13 2 21 42 10 20 63 14 1 19 19 12 12 64 8 2 18 36 13 26 65 11 1 10 10 10 10 66 9 1 29 29 11 11 67 11 1 31 31 8 8 68 13 1 19 19 9 9 69 10 1 9 9 13 13 70 11 2 20 40 11 22 71 12 2 28 56 8 16 72 9 2 19 38 9 18 73 15 2 30 60 9 18 74 18 2 29 58 15 30 75 15 2 26 52 9 18 76 12 1 23 23 10 10 77 13 2 13 26 14 28 78 14 1 21 21 12 12 79 10 2 19 38 12 24 80 13 2 28 56 11 22 81 13 2 23 46 14 28 82 11 1 18 18 6 6 83 13 2 21 42 12 24 84 16 1 20 20 8 8 85 8 2 23 46 14 28 86 16 2 21 42 11 22 87 11 2 21 42 10 20 88 9 1 15 15 14 14 89 16 1 28 28 12 12 90 12 2 19 38 10 20 91 14 2 26 52 14 28 92 8 2 10 20 5 10 93 9 1 16 16 11 11 94 15 2 22 44 10 20 95 11 2 19 38 9 18 96 21 2 31 62 10 20 97 14 2 31 62 16 32 98 18 1 29 29 13 13 99 12 1 19 19 9 9 100 13 1 22 22 10 10 101 15 2 23 46 10 20 102 12 1 15 15 7 7 103 19 2 20 40 9 18 104 15 2 18 36 8 16 105 11 1 23 23 14 14 106 11 1 25 25 14 14 107 10 2 21 42 8 16 108 13 2 24 48 9 18 109 15 1 25 25 14 14 110 12 2 17 34 14 28 111 12 2 13 26 8 16 112 16 2 28 56 8 16 113 9 2 21 42 8 16 114 18 2 25 50 7 14 115 8 2 9 18 6 12 116 13 1 16 16 8 8 117 17 2 19 38 6 12 118 9 2 17 34 11 22 119 15 2 25 50 14 28 120 8 2 20 40 11 22 121 7 2 29 58 11 22 122 12 1 14 14 11 11 123 14 1 22 22 14 14 124 6 1 15 15 8 8 125 8 1 19 19 20 20 126 17 2 20 40 11 22 127 10 2 15 30 8 16 128 11 1 20 20 11 11 129 14 2 18 36 10 20 130 11 2 33 66 14 28 131 13 2 22 44 11 22 132 12 1 16 16 9 9 133 11 1 17 17 9 9 134 9 1 16 16 8 8 135 12 2 21 42 10 20 136 20 1 26 26 13 13 137 12 1 18 18 13 13 138 13 1 18 18 12 12 139 12 2 17 34 8 16 140 12 2 22 44 13 26 141 9 2 30 60 14 28 142 15 1 30 30 12 12 143 24 1 24 24 14 14 144 7 1 21 21 15 15 145 17 1 21 21 13 13 146 11 2 29 58 16 32 147 17 2 31 62 9 18 148 11 1 20 20 9 9 149 12 1 16 16 9 9 150 14 1 22 22 8 8 151 11 2 20 40 7 14 152 16 2 28 56 16 32 153 21 2 38 76 11 22 154 14 1 22 22 9 9 155 20 2 20 40 11 22 156 13 2 17 34 9 18 157 11 2 28 56 14 28 158 15 2 22 44 13 26 159 19 1 31 31 16 16 PE*G ParentalCriticism PC*G PersonalStandards PS*G Organization O*G 1 22 12 24 24 48 26 52 2 7 8 8 25 25 23 23 3 17 8 8 30 30 25 25 4 10 8 8 19 19 23 23 5 12 9 9 22 22 19 19 6 12 7 7 22 22 29 29 7 22 4 8 25 50 25 50 8 22 11 22 23 46 21 42 9 12 7 7 17 17 22 22 10 13 7 7 21 21 25 25 11 14 12 12 19 19 24 24 12 32 10 20 19 38 18 36 13 22 10 20 15 30 22 44 14 20 8 16 16 32 15 30 15 11 8 8 23 23 22 22 16 30 4 8 27 54 28 56 17 9 9 9 22 22 20 20 18 11 8 8 14 14 12 12 19 34 7 14 22 44 24 48 20 34 11 22 23 46 20 40 21 11 9 9 23 23 21 21 22 36 11 22 21 42 20 40 23 28 13 26 19 38 21 42 24 10 8 8 18 18 23 23 25 22 8 16 20 40 28 56 26 30 9 18 23 46 24 48 27 30 6 12 25 50 24 48 28 26 9 18 19 38 24 48 29 16 9 9 24 24 23 23 30 26 6 12 22 44 23 46 31 18 6 12 25 50 29 58 32 36 16 32 26 52 24 48 33 18 5 5 29 29 18 18 34 24 7 14 32 64 25 50 35 17 9 9 25 25 21 21 36 9 6 6 29 29 26 26 37 9 6 6 28 28 22 22 38 12 5 5 17 17 22 22 39 18 12 12 28 28 22 22 40 24 7 14 29 58 23 46 41 36 10 20 26 52 30 60 42 14 9 9 25 25 23 23 43 30 8 16 14 28 17 34 44 32 5 10 25 50 23 46 45 10 8 8 26 26 23 23 46 11 8 8 20 20 25 25 47 28 10 20 18 36 24 48 48 9 6 6 32 32 24 24 49 12 8 8 25 25 23 23 50 17 7 7 25 25 21 21 51 10 4 8 23 46 24 48 52 24 8 16 21 42 24 48 53 24 8 16 20 40 28 56 54 12 4 8 15 30 16 32 55 48 20 40 30 60 20 40 56 12 8 8 24 24 29 29 57 12 8 8 26 26 27 27 58 28 6 12 24 48 22 44 59 14 4 8 22 44 28 56 60 26 8 16 14 28 16 32 61 12 9 9 24 24 25 25 62 26 6 12 24 48 24 48 63 14 7 7 24 24 28 28 64 16 9 18 24 48 24 48 65 11 5 5 19 19 23 23 66 9 5 5 31 31 30 30 67 11 8 8 22 22 24 24 68 13 8 8 27 27 21 21 69 10 6 6 19 19 25 25 70 22 8 16 25 50 25 50 71 24 7 14 20 40 22 44 72 18 7 14 21 42 23 46 73 30 9 18 27 54 26 52 74 36 11 22 23 46 23 46 75 30 6 12 25 50 25 50 76 12 8 8 20 20 21 21 77 26 6 12 21 42 25 50 78 14 9 9 22 22 24 24 79 20 8 16 23 46 29 58 80 26 6 12 25 50 22 44 81 26 10 20 25 50 27 54 82 11 8 8 17 17 26 26 83 26 8 16 19 38 22 44 84 16 10 10 25 25 24 24 85 16 5 10 19 38 27 54 86 32 7 14 20 40 24 48 87 22 5 10 26 52 24 48 88 9 8 8 23 23 29 29 89 16 14 14 27 27 22 22 90 24 7 14 17 34 21 42 91 28 8 16 17 34 24 48 92 16 6 12 19 38 24 48 93 9 5 5 17 17 23 23 94 30 6 12 22 44 20 40 95 22 10 20 21 42 27 54 96 42 12 24 32 64 26 52 97 28 9 18 21 42 25 50 98 18 12 12 21 21 21 21 99 12 7 7 18 18 21 21 100 13 8 8 18 18 19 19 101 30 10 20 23 46 21 42 102 12 6 6 19 19 21 21 103 38 10 20 20 40 16 32 104 30 10 20 21 42 22 44 105 11 10 10 20 20 29 29 106 11 5 5 17 17 15 15 107 20 7 14 18 36 17 34 108 26 10 20 19 38 15 30 109 15 11 11 22 22 21 21 110 24 6 12 15 30 21 42 111 24 7 14 14 28 19 38 112 32 12 24 18 36 24 48 113 18 11 22 24 48 20 40 114 36 11 22 35 70 17 34 115 16 11 22 29 58 23 46 116 13 5 5 21 21 24 24 117 34 8 16 25 50 14 28 118 18 6 12 20 40 19 38 119 30 9 18 22 44 24 48 120 16 4 8 13 26 13 26 121 14 4 8 26 52 22 44 122 12 7 7 17 17 16 16 123 14 11 11 25 25 19 19 124 6 6 6 20 20 25 25 125 8 7 7 19 19 25 25 126 34 8 16 21 42 23 46 127 20 4 8 22 44 24 48 128 11 8 8 24 24 26 26 129 28 9 18 21 42 26 52 130 22 8 16 26 52 25 50 131 26 11 22 24 48 18 36 132 12 8 8 16 16 21 21 133 11 5 5 23 23 26 26 134 9 4 4 18 18 23 23 135 24 8 16 16 32 23 46 136 20 10 10 26 26 22 22 137 12 6 6 19 19 20 20 138 13 9 9 21 21 13 13 139 24 9 18 21 42 24 48 140 24 13 26 22 44 15 30 141 18 9 18 23 46 14 28 142 15 10 10 29 29 22 22 143 24 20 20 21 21 10 10 144 7 5 5 21 21 24 24 145 17 11 11 23 23 22 22 146 22 6 12 27 54 24 48 147 34 9 18 25 50 19 38 148 11 7 7 21 21 20 20 149 12 9 9 10 10 13 13 150 14 10 10 20 20 20 20 151 22 9 18 26 52 22 44 152 32 8 16 24 48 24 48 153 42 7 14 29 58 29 58 154 14 6 6 19 19 12 12 155 40 13 26 24 48 20 40 156 26 6 12 19 38 21 42 157 22 8 16 24 48 24 48 158 30 10 20 22 44 22 44 159 19 16 16 17 17 20 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Gender ConcernoverMistakes 7.56408 -4.02282 -0.04971 `C*G` Doubtsaboutactions `D*G` 0.01392 -0.05843 0.04117 `PE*G` ParentalCriticism `PC*G` 0.55437 0.76259 -0.41336 PersonalStandards `PS*G` Organization 0.22960 -0.11795 -0.20580 `O*G` 0.10185 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -2.53172 -0.31898 -0.02347 0.32396 2.48734 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.56408 1.56347 4.838 3.30e-06 *** Gender -4.02282 0.95019 -4.234 4.05e-05 *** ConcernoverMistakes -0.04971 0.04408 -1.128 0.261255 `C*G` 0.01392 0.02709 0.514 0.608083 Doubtsaboutactions -0.05843 0.07543 -0.775 0.439833 `D*G` 0.04117 0.04733 0.870 0.385808 `PE*G` 0.55437 0.01288 43.034 < 2e-16 *** ParentalCriticism 0.76259 0.07857 9.706 < 2e-16 *** `PC*G` -0.41336 0.04720 -8.758 4.56e-15 *** PersonalStandards 0.22960 0.05786 3.968 0.000113 *** `PS*G` -0.11795 0.03458 -3.411 0.000837 *** Organization -0.20580 0.05417 -3.800 0.000212 *** `O*G` 0.10185 0.03327 3.061 0.002626 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.7141 on 146 degrees of freedom Multiple R-squared: 0.9603, Adjusted R-squared: 0.957 F-statistic: 294.3 on 12 and 146 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.7899628 4.200743e-01 2.100372e-01 [2,] 0.7087776 5.824448e-01 2.912224e-01 [3,] 0.6181370 7.637261e-01 3.818630e-01 [4,] 0.9247172 1.505655e-01 7.528276e-02 [5,] 0.8792576 2.414848e-01 1.207424e-01 [6,] 0.8902136 2.195728e-01 1.097864e-01 [7,] 0.9041427 1.917146e-01 9.585732e-02 [8,] 0.8596297 2.807406e-01 1.403703e-01 [9,] 0.8894693 2.210615e-01 1.105307e-01 [10,] 0.8882977 2.234045e-01 1.117023e-01 [11,] 0.8666692 2.666616e-01 1.333308e-01 [12,] 0.8208806 3.582387e-01 1.791194e-01 [13,] 0.7660818 4.678364e-01 2.339182e-01 [14,] 0.8716476 2.567048e-01 1.283524e-01 [15,] 0.8333240 3.333520e-01 1.666760e-01 [16,] 0.8885978 2.228045e-01 1.114022e-01 [17,] 0.8706720 2.586559e-01 1.293280e-01 [18,] 0.9936268 1.274644e-02 6.373220e-03 [19,] 0.9962974 7.405254e-03 3.702627e-03 [20,] 0.9980370 3.925979e-03 1.962990e-03 [21,] 0.9989774 2.045231e-03 1.022615e-03 [22,] 0.9992254 1.549269e-03 7.746344e-04 [23,] 0.9992645 1.471008e-03 7.355041e-04 [24,] 0.9996759 6.481687e-04 3.240843e-04 [25,] 0.9995349 9.302651e-04 4.651325e-04 [26,] 0.9994626 1.074834e-03 5.374172e-04 [27,] 0.9991469 1.706262e-03 8.531310e-04 [28,] 0.9988854 2.229230e-03 1.114615e-03 [29,] 0.9986899 2.620145e-03 1.310073e-03 [30,] 0.9997051 5.898370e-04 2.949185e-04 [31,] 0.9995702 8.596179e-04 4.298089e-04 [32,] 0.9993246 1.350772e-03 6.753860e-04 [33,] 0.9998023 3.953465e-04 1.976733e-04 [34,] 0.9997518 4.963954e-04 2.481977e-04 [35,] 0.9999876 2.482127e-05 1.241063e-05 [36,] 0.9999908 1.839747e-05 9.198733e-06 [37,] 0.9999841 3.185106e-05 1.592553e-05 [38,] 0.9999723 5.530953e-05 2.765476e-05 [39,] 0.9999647 7.063255e-05 3.531628e-05 [40,] 0.9999406 1.188661e-04 5.943307e-05 [41,] 0.9999220 1.559011e-04 7.795055e-05 [42,] 0.9998742 2.516020e-04 1.258010e-04 [43,] 0.9998069 3.861291e-04 1.930646e-04 [44,] 0.9997222 5.556898e-04 2.778449e-04 [45,] 0.9996256 7.488569e-04 3.744284e-04 [46,] 0.9995875 8.250367e-04 4.125184e-04 [47,] 0.9993643 1.271492e-03 6.357460e-04 [48,] 0.9998151 3.698916e-04 1.849458e-04 [49,] 0.9997714 4.572463e-04 2.286231e-04 [50,] 0.9997624 4.751618e-04 2.375809e-04 [51,] 0.9997285 5.429327e-04 2.714663e-04 [52,] 0.9998702 2.595299e-04 1.297649e-04 [53,] 0.9998417 3.165333e-04 1.582666e-04 [54,] 0.9998850 2.300859e-04 1.150429e-04 [55,] 0.9998206 3.588200e-04 1.794100e-04 [56,] 0.9997290 5.420740e-04 2.710370e-04 [57,] 0.9996163 7.673078e-04 3.836539e-04 [58,] 0.9994062 1.187530e-03 5.937651e-04 [59,] 0.9991729 1.654272e-03 8.271360e-04 [60,] 0.9987850 2.429987e-03 1.214993e-03 [61,] 0.9985271 2.945812e-03 1.472906e-03 [62,] 0.9980744 3.851102e-03 1.925551e-03 [63,] 0.9979014 4.197124e-03 2.098562e-03 [64,] 0.9969950 6.009989e-03 3.004995e-03 [65,] 0.9956409 8.718184e-03 4.359092e-03 [66,] 0.9937807 1.243866e-02 6.219330e-03 [67,] 0.9920071 1.598582e-02 7.992912e-03 [68,] 0.9888758 2.224845e-02 1.112422e-02 [69,] 0.9887447 2.251063e-02 1.125532e-02 [70,] 0.9848352 3.032957e-02 1.516478e-02 [71,] 0.9814339 3.713212e-02 1.856606e-02 [72,] 0.9749862 5.002750e-02 2.501375e-02 [73,] 0.9785890 4.282200e-02 2.141100e-02 [74,] 0.9885135 2.297297e-02 1.148649e-02 [75,] 0.9840991 3.180182e-02 1.590091e-02 [76,] 0.9786601 4.267985e-02 2.133992e-02 [77,] 0.9721576 5.568478e-02 2.784239e-02 [78,] 0.9639193 7.216139e-02 3.608069e-02 [79,] 0.9541915 9.161706e-02 4.580853e-02 [80,] 0.9423136 1.153728e-01 5.768641e-02 [81,] 0.9281540 1.436919e-01 7.184597e-02 [82,] 0.9086517 1.826966e-01 9.134832e-02 [83,] 0.9363803 1.272395e-01 6.361973e-02 [84,] 0.9216146 1.567709e-01 7.838543e-02 [85,] 0.9034384 1.931232e-01 9.656162e-02 [86,] 0.8787995 2.424010e-01 1.212005e-01 [87,] 0.8654605 2.690790e-01 1.345395e-01 [88,] 0.8462128 3.075744e-01 1.537872e-01 [89,] 0.8127072 3.745856e-01 1.872928e-01 [90,] 0.7860633 4.278733e-01 2.139367e-01 [91,] 0.7465908 5.068185e-01 2.534092e-01 [92,] 0.7074576 5.850847e-01 2.925424e-01 [93,] 0.6622635 6.754729e-01 3.377365e-01 [94,] 0.6134204 7.731592e-01 3.865796e-01 [95,] 0.5644487 8.711026e-01 4.355513e-01 [96,] 0.5107946 9.784108e-01 4.892054e-01 [97,] 0.4568453 9.136905e-01 5.431547e-01 [98,] 0.4407431 8.814862e-01 5.592569e-01 [99,] 0.3915859 7.831719e-01 6.084141e-01 [100,] 0.3679316 7.358633e-01 6.320684e-01 [101,] 0.5604106 8.791788e-01 4.395894e-01 [102,] 0.5333623 9.332755e-01 4.666377e-01 [103,] 0.4747681 9.495362e-01 5.252319e-01 [104,] 0.4153185 8.306371e-01 5.846815e-01 [105,] 0.3659622 7.319244e-01 6.340378e-01 [106,] 0.3258788 6.517577e-01 6.741212e-01 [107,] 0.2981127 5.962255e-01 7.018873e-01 [108,] 0.3050381 6.100763e-01 6.949619e-01 [109,] 0.6100258 7.799483e-01 3.899742e-01 [110,] 0.5841931 8.316137e-01 4.158069e-01 [111,] 0.5387895 9.224211e-01 4.612105e-01 [112,] 0.4698291 9.396583e-01 5.301709e-01 [113,] 0.4935460 9.870920e-01 5.064540e-01 [114,] 0.4217282 8.434563e-01 5.782718e-01 [115,] 0.3836726 7.673452e-01 6.163274e-01 [116,] 0.3140078 6.280157e-01 6.859922e-01 [117,] 0.2490584 4.981168e-01 7.509416e-01 [118,] 0.1978787 3.957573e-01 8.021213e-01 [119,] 0.1500273 3.000546e-01 8.499727e-01 [120,] 0.1125493 2.250986e-01 8.874507e-01 [121,] 0.6352727 7.294545e-01 3.647273e-01 [122,] 0.7484534 5.030932e-01 2.515466e-01 [123,] 0.7235066 5.529868e-01 2.764934e-01 [124,] 0.6289477 7.421046e-01 3.710523e-01 [125,] 0.5147412 9.705177e-01 4.852588e-01 [126,] 0.3938825 7.877651e-01 6.061175e-01 [127,] 0.3401855 6.803710e-01 6.598145e-01 [128,] 0.9950881 9.823881e-03 4.911941e-03 > postscript(file="/var/wessaorg/rcomp/tmp/1vbt71322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2xour1322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3xuxd1322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4n84x1322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5mcxr1322161093.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 = 159 Frequency = 1 1 2 3 4 5 6 0.45041929 -2.53171769 1.20159056 -0.75814137 -1.03592279 0.66497490 7 8 9 10 11 12 -0.05024465 0.26633144 0.67076503 0.85951886 -0.07239221 -0.09071249 13 14 15 16 17 18 0.37877472 0.14592298 -0.98771597 -0.49780784 -2.14424037 -1.07407131 19 20 21 22 23 24 -0.48342394 -0.13193076 -0.94238491 -0.23546333 0.20036745 -0.14670460 25 26 27 28 29 30 0.13534113 -0.21886603 -0.33512271 0.05887485 1.09950086 -0.20420238 31 32 33 34 35 36 0.39132562 -0.07179002 2.48734386 0.23455964 1.04663251 -0.73994283 37 38 39 40 41 42 -1.09459727 1.19028588 0.80216067 0.11587585 -0.30871618 0.09658055 43 44 45 46 47 48 -0.35833269 -0.57567833 -1.50268668 -0.32363670 -0.13342543 -1.28154548 49 50 51 52 53 54 -0.17766525 2.04613826 0.57525155 0.05046350 0.07237707 0.31055438 55 56 57 58 59 60 -0.19406832 0.50210095 -0.12405064 -0.27855069 0.26892577 -0.34995284 61 62 63 64 65 66 -0.65407274 -0.12597911 1.37086392 0.47277231 0.41435460 -0.39190224 67 68 69 70 71 72 -0.14732041 -0.53839712 -0.15661793 0.18236127 0.21841740 0.33231653 73 74 75 76 77 78 0.09267930 -0.30202177 -0.20183696 -0.04201038 -0.41330023 0.55149561 79 80 81 82 83 84 0.24112849 0.00526780 0.09120581 0.11908406 -0.08116619 0.65372018 85 86 87 88 89 90 0.27652181 -0.43712063 0.03994206 -1.09955428 -0.81906702 -0.04714279 91 92 93 94 95 96 -0.13677902 0.26528857 -0.02159860 -0.34254229 0.31560657 -0.33796090 97 98 99 100 101 102 0.01610571 1.38970707 0.37011995 0.38324919 -0.05578095 0.43001726 103 104 105 106 107 108 -0.56175355 -0.12777226 -0.28547320 0.41195898 0.25978607 0.16974657 109 110 111 112 113 114 0.16449331 -0.26320815 -0.15357116 0.09572531 0.66904764 -0.13533497 115 116 117 118 119 120 0.60094112 1.36646356 -0.39542870 0.16197570 -0.17181372 0.15146858 121 122 123 124 125 126 0.55758587 -0.18238928 -0.93137461 -1.92237292 -0.91839571 -0.49940126 127 128 129 130 131 132 -0.02397617 -0.50463319 -0.12260042 0.40117313 0.18005226 0.13683453 133 134 135 136 137 138 0.51283363 0.16419361 0.05861756 2.41773125 0.53700246 -1.03328190 139 140 141 142 143 144 0.11663449 0.35037090 0.57527497 -0.01950325 -0.03548773 -1.00755236 145 146 147 148 149 150 0.88763058 0.14183322 -0.13016795 -0.47864317 -0.37404469 -0.02347335 151 152 153 154 155 156 0.34212440 -0.31432347 -0.54203384 0.67078692 -0.49239078 -0.22725518 157 158 159 0.27717695 -0.15356247 0.90444863 > postscript(file="/var/wessaorg/rcomp/tmp/6fpwn1322161093.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 0.45041929 NA 1 -2.53171769 0.45041929 2 1.20159056 -2.53171769 3 -0.75814137 1.20159056 4 -1.03592279 -0.75814137 5 0.66497490 -1.03592279 6 -0.05024465 0.66497490 7 0.26633144 -0.05024465 8 0.67076503 0.26633144 9 0.85951886 0.67076503 10 -0.07239221 0.85951886 11 -0.09071249 -0.07239221 12 0.37877472 -0.09071249 13 0.14592298 0.37877472 14 -0.98771597 0.14592298 15 -0.49780784 -0.98771597 16 -2.14424037 -0.49780784 17 -1.07407131 -2.14424037 18 -0.48342394 -1.07407131 19 -0.13193076 -0.48342394 20 -0.94238491 -0.13193076 21 -0.23546333 -0.94238491 22 0.20036745 -0.23546333 23 -0.14670460 0.20036745 24 0.13534113 -0.14670460 25 -0.21886603 0.13534113 26 -0.33512271 -0.21886603 27 0.05887485 -0.33512271 28 1.09950086 0.05887485 29 -0.20420238 1.09950086 30 0.39132562 -0.20420238 31 -0.07179002 0.39132562 32 2.48734386 -0.07179002 33 0.23455964 2.48734386 34 1.04663251 0.23455964 35 -0.73994283 1.04663251 36 -1.09459727 -0.73994283 37 1.19028588 -1.09459727 38 0.80216067 1.19028588 39 0.11587585 0.80216067 40 -0.30871618 0.11587585 41 0.09658055 -0.30871618 42 -0.35833269 0.09658055 43 -0.57567833 -0.35833269 44 -1.50268668 -0.57567833 45 -0.32363670 -1.50268668 46 -0.13342543 -0.32363670 47 -1.28154548 -0.13342543 48 -0.17766525 -1.28154548 49 2.04613826 -0.17766525 50 0.57525155 2.04613826 51 0.05046350 0.57525155 52 0.07237707 0.05046350 53 0.31055438 0.07237707 54 -0.19406832 0.31055438 55 0.50210095 -0.19406832 56 -0.12405064 0.50210095 57 -0.27855069 -0.12405064 58 0.26892577 -0.27855069 59 -0.34995284 0.26892577 60 -0.65407274 -0.34995284 61 -0.12597911 -0.65407274 62 1.37086392 -0.12597911 63 0.47277231 1.37086392 64 0.41435460 0.47277231 65 -0.39190224 0.41435460 66 -0.14732041 -0.39190224 67 -0.53839712 -0.14732041 68 -0.15661793 -0.53839712 69 0.18236127 -0.15661793 70 0.21841740 0.18236127 71 0.33231653 0.21841740 72 0.09267930 0.33231653 73 -0.30202177 0.09267930 74 -0.20183696 -0.30202177 75 -0.04201038 -0.20183696 76 -0.41330023 -0.04201038 77 0.55149561 -0.41330023 78 0.24112849 0.55149561 79 0.00526780 0.24112849 80 0.09120581 0.00526780 81 0.11908406 0.09120581 82 -0.08116619 0.11908406 83 0.65372018 -0.08116619 84 0.27652181 0.65372018 85 -0.43712063 0.27652181 86 0.03994206 -0.43712063 87 -1.09955428 0.03994206 88 -0.81906702 -1.09955428 89 -0.04714279 -0.81906702 90 -0.13677902 -0.04714279 91 0.26528857 -0.13677902 92 -0.02159860 0.26528857 93 -0.34254229 -0.02159860 94 0.31560657 -0.34254229 95 -0.33796090 0.31560657 96 0.01610571 -0.33796090 97 1.38970707 0.01610571 98 0.37011995 1.38970707 99 0.38324919 0.37011995 100 -0.05578095 0.38324919 101 0.43001726 -0.05578095 102 -0.56175355 0.43001726 103 -0.12777226 -0.56175355 104 -0.28547320 -0.12777226 105 0.41195898 -0.28547320 106 0.25978607 0.41195898 107 0.16974657 0.25978607 108 0.16449331 0.16974657 109 -0.26320815 0.16449331 110 -0.15357116 -0.26320815 111 0.09572531 -0.15357116 112 0.66904764 0.09572531 113 -0.13533497 0.66904764 114 0.60094112 -0.13533497 115 1.36646356 0.60094112 116 -0.39542870 1.36646356 117 0.16197570 -0.39542870 118 -0.17181372 0.16197570 119 0.15146858 -0.17181372 120 0.55758587 0.15146858 121 -0.18238928 0.55758587 122 -0.93137461 -0.18238928 123 -1.92237292 -0.93137461 124 -0.91839571 -1.92237292 125 -0.49940126 -0.91839571 126 -0.02397617 -0.49940126 127 -0.50463319 -0.02397617 128 -0.12260042 -0.50463319 129 0.40117313 -0.12260042 130 0.18005226 0.40117313 131 0.13683453 0.18005226 132 0.51283363 0.13683453 133 0.16419361 0.51283363 134 0.05861756 0.16419361 135 2.41773125 0.05861756 136 0.53700246 2.41773125 137 -1.03328190 0.53700246 138 0.11663449 -1.03328190 139 0.35037090 0.11663449 140 0.57527497 0.35037090 141 -0.01950325 0.57527497 142 -0.03548773 -0.01950325 143 -1.00755236 -0.03548773 144 0.88763058 -1.00755236 145 0.14183322 0.88763058 146 -0.13016795 0.14183322 147 -0.47864317 -0.13016795 148 -0.37404469 -0.47864317 149 -0.02347335 -0.37404469 150 0.34212440 -0.02347335 151 -0.31432347 0.34212440 152 -0.54203384 -0.31432347 153 0.67078692 -0.54203384 154 -0.49239078 0.67078692 155 -0.22725518 -0.49239078 156 0.27717695 -0.22725518 157 -0.15356247 0.27717695 158 0.90444863 -0.15356247 159 NA 0.90444863 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2.53171769 0.45041929 [2,] 1.20159056 -2.53171769 [3,] -0.75814137 1.20159056 [4,] -1.03592279 -0.75814137 [5,] 0.66497490 -1.03592279 [6,] -0.05024465 0.66497490 [7,] 0.26633144 -0.05024465 [8,] 0.67076503 0.26633144 [9,] 0.85951886 0.67076503 [10,] -0.07239221 0.85951886 [11,] -0.09071249 -0.07239221 [12,] 0.37877472 -0.09071249 [13,] 0.14592298 0.37877472 [14,] -0.98771597 0.14592298 [15,] -0.49780784 -0.98771597 [16,] -2.14424037 -0.49780784 [17,] -1.07407131 -2.14424037 [18,] -0.48342394 -1.07407131 [19,] -0.13193076 -0.48342394 [20,] -0.94238491 -0.13193076 [21,] -0.23546333 -0.94238491 [22,] 0.20036745 -0.23546333 [23,] -0.14670460 0.20036745 [24,] 0.13534113 -0.14670460 [25,] -0.21886603 0.13534113 [26,] -0.33512271 -0.21886603 [27,] 0.05887485 -0.33512271 [28,] 1.09950086 0.05887485 [29,] -0.20420238 1.09950086 [30,] 0.39132562 -0.20420238 [31,] -0.07179002 0.39132562 [32,] 2.48734386 -0.07179002 [33,] 0.23455964 2.48734386 [34,] 1.04663251 0.23455964 [35,] -0.73994283 1.04663251 [36,] -1.09459727 -0.73994283 [37,] 1.19028588 -1.09459727 [38,] 0.80216067 1.19028588 [39,] 0.11587585 0.80216067 [40,] -0.30871618 0.11587585 [41,] 0.09658055 -0.30871618 [42,] -0.35833269 0.09658055 [43,] -0.57567833 -0.35833269 [44,] -1.50268668 -0.57567833 [45,] -0.32363670 -1.50268668 [46,] -0.13342543 -0.32363670 [47,] -1.28154548 -0.13342543 [48,] -0.17766525 -1.28154548 [49,] 2.04613826 -0.17766525 [50,] 0.57525155 2.04613826 [51,] 0.05046350 0.57525155 [52,] 0.07237707 0.05046350 [53,] 0.31055438 0.07237707 [54,] -0.19406832 0.31055438 [55,] 0.50210095 -0.19406832 [56,] -0.12405064 0.50210095 [57,] -0.27855069 -0.12405064 [58,] 0.26892577 -0.27855069 [59,] -0.34995284 0.26892577 [60,] -0.65407274 -0.34995284 [61,] -0.12597911 -0.65407274 [62,] 1.37086392 -0.12597911 [63,] 0.47277231 1.37086392 [64,] 0.41435460 0.47277231 [65,] -0.39190224 0.41435460 [66,] -0.14732041 -0.39190224 [67,] -0.53839712 -0.14732041 [68,] -0.15661793 -0.53839712 [69,] 0.18236127 -0.15661793 [70,] 0.21841740 0.18236127 [71,] 0.33231653 0.21841740 [72,] 0.09267930 0.33231653 [73,] -0.30202177 0.09267930 [74,] -0.20183696 -0.30202177 [75,] -0.04201038 -0.20183696 [76,] -0.41330023 -0.04201038 [77,] 0.55149561 -0.41330023 [78,] 0.24112849 0.55149561 [79,] 0.00526780 0.24112849 [80,] 0.09120581 0.00526780 [81,] 0.11908406 0.09120581 [82,] -0.08116619 0.11908406 [83,] 0.65372018 -0.08116619 [84,] 0.27652181 0.65372018 [85,] -0.43712063 0.27652181 [86,] 0.03994206 -0.43712063 [87,] -1.09955428 0.03994206 [88,] -0.81906702 -1.09955428 [89,] -0.04714279 -0.81906702 [90,] -0.13677902 -0.04714279 [91,] 0.26528857 -0.13677902 [92,] -0.02159860 0.26528857 [93,] -0.34254229 -0.02159860 [94,] 0.31560657 -0.34254229 [95,] -0.33796090 0.31560657 [96,] 0.01610571 -0.33796090 [97,] 1.38970707 0.01610571 [98,] 0.37011995 1.38970707 [99,] 0.38324919 0.37011995 [100,] -0.05578095 0.38324919 [101,] 0.43001726 -0.05578095 [102,] -0.56175355 0.43001726 [103,] -0.12777226 -0.56175355 [104,] -0.28547320 -0.12777226 [105,] 0.41195898 -0.28547320 [106,] 0.25978607 0.41195898 [107,] 0.16974657 0.25978607 [108,] 0.16449331 0.16974657 [109,] -0.26320815 0.16449331 [110,] -0.15357116 -0.26320815 [111,] 0.09572531 -0.15357116 [112,] 0.66904764 0.09572531 [113,] -0.13533497 0.66904764 [114,] 0.60094112 -0.13533497 [115,] 1.36646356 0.60094112 [116,] -0.39542870 1.36646356 [117,] 0.16197570 -0.39542870 [118,] -0.17181372 0.16197570 [119,] 0.15146858 -0.17181372 [120,] 0.55758587 0.15146858 [121,] -0.18238928 0.55758587 [122,] -0.93137461 -0.18238928 [123,] -1.92237292 -0.93137461 [124,] -0.91839571 -1.92237292 [125,] -0.49940126 -0.91839571 [126,] -0.02397617 -0.49940126 [127,] -0.50463319 -0.02397617 [128,] -0.12260042 -0.50463319 [129,] 0.40117313 -0.12260042 [130,] 0.18005226 0.40117313 [131,] 0.13683453 0.18005226 [132,] 0.51283363 0.13683453 [133,] 0.16419361 0.51283363 [134,] 0.05861756 0.16419361 [135,] 2.41773125 0.05861756 [136,] 0.53700246 2.41773125 [137,] -1.03328190 0.53700246 [138,] 0.11663449 -1.03328190 [139,] 0.35037090 0.11663449 [140,] 0.57527497 0.35037090 [141,] -0.01950325 0.57527497 [142,] -0.03548773 -0.01950325 [143,] -1.00755236 -0.03548773 [144,] 0.88763058 -1.00755236 [145,] 0.14183322 0.88763058 [146,] -0.13016795 0.14183322 [147,] -0.47864317 -0.13016795 [148,] -0.37404469 -0.47864317 [149,] -0.02347335 -0.37404469 [150,] 0.34212440 -0.02347335 [151,] -0.31432347 0.34212440 [152,] -0.54203384 -0.31432347 [153,] 0.67078692 -0.54203384 [154,] -0.49239078 0.67078692 [155,] -0.22725518 -0.49239078 [156,] 0.27717695 -0.22725518 [157,] -0.15356247 0.27717695 [158,] 0.90444863 -0.15356247 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2.53171769 0.45041929 2 1.20159056 -2.53171769 3 -0.75814137 1.20159056 4 -1.03592279 -0.75814137 5 0.66497490 -1.03592279 6 -0.05024465 0.66497490 7 0.26633144 -0.05024465 8 0.67076503 0.26633144 9 0.85951886 0.67076503 10 -0.07239221 0.85951886 11 -0.09071249 -0.07239221 12 0.37877472 -0.09071249 13 0.14592298 0.37877472 14 -0.98771597 0.14592298 15 -0.49780784 -0.98771597 16 -2.14424037 -0.49780784 17 -1.07407131 -2.14424037 18 -0.48342394 -1.07407131 19 -0.13193076 -0.48342394 20 -0.94238491 -0.13193076 21 -0.23546333 -0.94238491 22 0.20036745 -0.23546333 23 -0.14670460 0.20036745 24 0.13534113 -0.14670460 25 -0.21886603 0.13534113 26 -0.33512271 -0.21886603 27 0.05887485 -0.33512271 28 1.09950086 0.05887485 29 -0.20420238 1.09950086 30 0.39132562 -0.20420238 31 -0.07179002 0.39132562 32 2.48734386 -0.07179002 33 0.23455964 2.48734386 34 1.04663251 0.23455964 35 -0.73994283 1.04663251 36 -1.09459727 -0.73994283 37 1.19028588 -1.09459727 38 0.80216067 1.19028588 39 0.11587585 0.80216067 40 -0.30871618 0.11587585 41 0.09658055 -0.30871618 42 -0.35833269 0.09658055 43 -0.57567833 -0.35833269 44 -1.50268668 -0.57567833 45 -0.32363670 -1.50268668 46 -0.13342543 -0.32363670 47 -1.28154548 -0.13342543 48 -0.17766525 -1.28154548 49 2.04613826 -0.17766525 50 0.57525155 2.04613826 51 0.05046350 0.57525155 52 0.07237707 0.05046350 53 0.31055438 0.07237707 54 -0.19406832 0.31055438 55 0.50210095 -0.19406832 56 -0.12405064 0.50210095 57 -0.27855069 -0.12405064 58 0.26892577 -0.27855069 59 -0.34995284 0.26892577 60 -0.65407274 -0.34995284 61 -0.12597911 -0.65407274 62 1.37086392 -0.12597911 63 0.47277231 1.37086392 64 0.41435460 0.47277231 65 -0.39190224 0.41435460 66 -0.14732041 -0.39190224 67 -0.53839712 -0.14732041 68 -0.15661793 -0.53839712 69 0.18236127 -0.15661793 70 0.21841740 0.18236127 71 0.33231653 0.21841740 72 0.09267930 0.33231653 73 -0.30202177 0.09267930 74 -0.20183696 -0.30202177 75 -0.04201038 -0.20183696 76 -0.41330023 -0.04201038 77 0.55149561 -0.41330023 78 0.24112849 0.55149561 79 0.00526780 0.24112849 80 0.09120581 0.00526780 81 0.11908406 0.09120581 82 -0.08116619 0.11908406 83 0.65372018 -0.08116619 84 0.27652181 0.65372018 85 -0.43712063 0.27652181 86 0.03994206 -0.43712063 87 -1.09955428 0.03994206 88 -0.81906702 -1.09955428 89 -0.04714279 -0.81906702 90 -0.13677902 -0.04714279 91 0.26528857 -0.13677902 92 -0.02159860 0.26528857 93 -0.34254229 -0.02159860 94 0.31560657 -0.34254229 95 -0.33796090 0.31560657 96 0.01610571 -0.33796090 97 1.38970707 0.01610571 98 0.37011995 1.38970707 99 0.38324919 0.37011995 100 -0.05578095 0.38324919 101 0.43001726 -0.05578095 102 -0.56175355 0.43001726 103 -0.12777226 -0.56175355 104 -0.28547320 -0.12777226 105 0.41195898 -0.28547320 106 0.25978607 0.41195898 107 0.16974657 0.25978607 108 0.16449331 0.16974657 109 -0.26320815 0.16449331 110 -0.15357116 -0.26320815 111 0.09572531 -0.15357116 112 0.66904764 0.09572531 113 -0.13533497 0.66904764 114 0.60094112 -0.13533497 115 1.36646356 0.60094112 116 -0.39542870 1.36646356 117 0.16197570 -0.39542870 118 -0.17181372 0.16197570 119 0.15146858 -0.17181372 120 0.55758587 0.15146858 121 -0.18238928 0.55758587 122 -0.93137461 -0.18238928 123 -1.92237292 -0.93137461 124 -0.91839571 -1.92237292 125 -0.49940126 -0.91839571 126 -0.02397617 -0.49940126 127 -0.50463319 -0.02397617 128 -0.12260042 -0.50463319 129 0.40117313 -0.12260042 130 0.18005226 0.40117313 131 0.13683453 0.18005226 132 0.51283363 0.13683453 133 0.16419361 0.51283363 134 0.05861756 0.16419361 135 2.41773125 0.05861756 136 0.53700246 2.41773125 137 -1.03328190 0.53700246 138 0.11663449 -1.03328190 139 0.35037090 0.11663449 140 0.57527497 0.35037090 141 -0.01950325 0.57527497 142 -0.03548773 -0.01950325 143 -1.00755236 -0.03548773 144 0.88763058 -1.00755236 145 0.14183322 0.88763058 146 -0.13016795 0.14183322 147 -0.47864317 -0.13016795 148 -0.37404469 -0.47864317 149 -0.02347335 -0.37404469 150 0.34212440 -0.02347335 151 -0.31432347 0.34212440 152 -0.54203384 -0.31432347 153 0.67078692 -0.54203384 154 -0.49239078 0.67078692 155 -0.22725518 -0.49239078 156 0.27717695 -0.22725518 157 -0.15356247 0.27717695 158 0.90444863 -0.15356247 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7uwhi1322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/84s1z1322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/94u711322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10j1tg1322161093.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/11wquk1322161093.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12zyim1322161093.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/13bfdq1322161093.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/145ad01322161093.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/156vja1322161093.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16nkas1322161093.tab") + } > > try(system("convert tmp/1vbt71322161093.ps tmp/1vbt71322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/2xour1322161093.ps tmp/2xour1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/3xuxd1322161093.ps tmp/3xuxd1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/4n84x1322161093.ps tmp/4n84x1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/5mcxr1322161093.ps tmp/5mcxr1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/6fpwn1322161093.ps tmp/6fpwn1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/7uwhi1322161093.ps tmp/7uwhi1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/84s1z1322161093.ps tmp/84s1z1322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/94u711322161093.ps tmp/94u711322161093.png",intern=TRUE)) character(0) > try(system("convert tmp/10j1tg1322161093.ps tmp/10j1tg1322161093.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.804 0.602 6.494