Load libraries, read and manipulate data

library(MASS)
## Warning: package 'MASS' was built under R version 3.3.3
library(psych)
## Warning: package 'psych' was built under R version 3.3.3
library(fpp)
## Warning: package 'fpp' was built under R version 3.3.3
## Loading required package: forecast
## Warning: package 'forecast' was built under R version 3.3.3
## Loading required package: fma
## Warning: package 'fma' was built under R version 3.3.3
## 
## Attaching package: 'fma'
## The following objects are masked from 'package:MASS':
## 
##     cement, housing, petrol
## Loading required package: expsmooth
## Loading required package: lmtest
## Warning: package 'lmtest' was built under R version 3.3.3
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 3.3.3
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## Loading required package: tseries
## Warning: package 'tseries' was built under R version 3.3.3
library(forecast)

mydata=read.csv("d:/hcexp/train2.csv")  #load the data
t=seq(1:13)                             #set up a sequence.  I can use this for a trend.

str(mydata)
## 'data.frame':    13 obs. of  511 variables:
##  $ Year                     : int  1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 ...
##  $ pers_Connecticut         : num  3324 3526 3646 3835 4089 ...
##  $ pers_Maine               : num  2511 2690 2872 2972 3238 ...
##  $ pers_Massachusetts       : num  3316 3542 3789 3963 4134 ...
##  $ pers_New_Hampshire       : num  2481 2706 2792 2897 3150 ...
##  $ pers_Rhode_Island        : num  2891 3174 3365 3430 3737 ...
##  $ pers_Vermont             : num  2360 2507 2652 2793 3054 ...
##  $ pers_Delaware            : num  2878 3066 3265 3503 3696 ...
##  $ pers_District_of_Columbia: num  4647 5139 5410 5546 5646 ...
##  $ pers_Maryland            : num  2777 2951 3125 3292 3416 ...
##  $ pers_New_Jersey          : num  2972 3231 3384 3591 3786 ...
##  $ pers_New_York            : num  3202 3425 3650 3838 4025 ...
##  $ pers_Pennsylvania        : num  3010 3209 3372 3495 3693 ...
##  $ pers_Illinois            : num  2722 2919 3061 3200 3344 ...
##  $ pers_Indiana             : num  2532 2741 2918 3005 3123 ...
##  $ pers_Michigan            : num  2647 2788 2933 3092 3282 ...
##  $ pers_Ohio                : num  2706 2883 3046 3168 3331 ...
##  $ pers_Wisconsin           : num  2544 2726 2879 3020 3192 ...
##  $ pers_Iowa                : num  2559 2705 2837 2996 3139 ...
##  $ pers_Kansas              : num  2609 2778 2881 3034 3212 ...
##  $ pers_Minnesota           : num  2619 2785 2938 3146 3340 ...
##  $ pers_Missouri            : num  2522 2742 2896 3079 3195 ...
##  $ pers_Nebraska            : num  2381 2563 2688 2842 2970 ...
##  $ pers_North_Dakota        : num  2667 2859 2991 3162 3430 ...
##  $ pers_South_Dakota        : num  2452 2579 2695 2870 3079 ...
##  $ pers_Alabama             : num  2571 2743 2883 3019 3196 ...
##  $ pers_Arkansas            : num  2380 2500 2609 2735 2907 ...
##  $ pers_Florida             : num  2974 3178 3338 3465 3587 ...
##  $ pers_Georgia             : num  2540 2713 2867 2945 3097 ...
##  $ pers_Kentucky            : num  2398 2590 2715 2813 3007 ...
##  $ pers_Louisiana           : num  2646 2850 3048 3196 3323 ...
##  $ pers_Mississippi         : num  2194 2326 2499 2657 2894 ...
##  $ pers_North_Carolina      : num  2272 2460 2630 2795 2971 ...
##  $ pers_South_Carolina      : num  2278 2442 2612 2777 2924 ...
##  $ pers_Tennessee           : num  2572 2786 2972 3080 3305 ...
##  $ pers_Virginia            : num  2375 2454 2576 2694 2817 ...
##  $ pers_West_Virginia       : num  2606 2858 3065 3243 3463 ...
##  $ pers_Arizona             : num  2457 2534 2639 2695 2724 ...
##  $ pers_New_Mexico          : num  2260 2434 2521 2601 2771 ...
##  $ pers_Oklahoma            : num  2375 2543 2640 2802 3001 ...
##  $ pers_Texas               : num  2373 2556 2681 2749 2904 ...
##  $ pers_Colorado            : num  2511 2649 2698 2777 2906 ...
##  $ pers_Idaho               : num  2135 2268 2367 2420 2559 ...
##  $ pers_Montana             : num  2373 2504 2595 2660 2848 ...
##  $ pers_Utah                : num  1993 2080 2192 2231 2342 ...
##  $ pers_Wyoming             : num  2230 2297 2482 2626 2834 ...
##  $ pers_Alaska              : num  2589 2692 2816 2899 3174 ...
##  $ pers_California          : num  2677 2847 2948 3008 3069 ...
##  $ pers_Hawaii              : num  2630 2761 2959 3165 3371 ...
##  $ pers_Nevada              : num  2411 2598 2658 2775 2830 ...
##  $ pers_Oregon              : num  2324 2500 2618 2692 2838 ...
##  $ pers_Washington          : num  2538 2720 2792 2874 3018 ...
##  $ hosp_Connecticut         : num  1178 1245 1284 1319 1306 ...
##  $ hosp_Maine               : num  998 1055 1116 1178 1266 ...
##  $ hosp_Massachusetts       : num  1387 1478 1560 1591 1586 ...
##  $ hosp_New_Hampshire       : num  968 1066 1132 1100 1143 ...
##  $ hosp_Rhode_Island        : num  1159 1213 1257 1303 1396 ...
##  $ hosp_Vermont             : num  927 993 1046 1111 1211 ...
##  $ hosp_Delaware            : num  1165 1242 1351 1417 1469 ...
##  $ hosp_District_of_Columbia: num  2413 2662 2835 2852 2838 ...
##  $ hosp_Maryland            : num  1126 1192 1258 1284 1326 ...
##  $ hosp_New_Jersey          : num  1166 1266 1359 1419 1400 ...
##  $ hosp_New_York            : num  1355 1431 1512 1600 1619 ...
##  $ hosp_Pennsylvania        : num  1313 1430 1480 1483 1537 ...
##  $ hosp_Illinois            : num  1222 1301 1352 1398 1429 ...
##  $ hosp_Indiana             : num  1034 1112 1186 1215 1246 ...
##  $ hosp_Michigan            : num  1117 1176 1239 1308 1380 ...
##  $ hosp_Ohio                : num  1120 1203 1263 1304 1344 ...
##  $ hosp_Wisconsin           : num  982 1037 1082 1130 1147 ...
##  $ hosp_Iowa                : num  1078 1126 1174 1251 1304 ...
##  $ hosp_Kansas              : num  1062 1146 1177 1245 1296 ...
##  $ hosp_Minnesota           : num  920 964 975 1045 1086 ...
##  $ hosp_Missouri            : num  1152 1251 1340 1402 1423 ...
##  $ hosp_Nebraska            : num  1024 1103 1157 1216 1271 ...
##  $ hosp_North_Dakota        : num  1055 1157 1236 1333 1445 ...
##  $ hosp_South_Dakota        : num  1110 1153 1175 1247 1344 ...
##  $ hosp_Alabama             : num  1092 1201 1225 1257 1345 ...
##  $ hosp_Arkansas            : num  1008 1070 1102 1131 1190 ...
##  $ hosp_Florida             : num  1109 1169 1210 1221 1238 ...
##  $ hosp_Georgia             : num  1064 1131 1187 1203 1221 ...
##  $ hosp_Kentucky            : num  1052 1136 1175 1200 1239 ...
##  $ hosp_Louisiana           : num  1182 1255 1339 1408 1451 ...
##  $ hosp_Mississippi         : num  1001 1079 1140 1217 1343 ...
##  $ hosp_North_Carolina      : num  948 1026 1072 1123 1184 ...
##  $ hosp_South_Carolina      : num  1050 1129 1197 1272 1295 ...
##  $ hosp_Tennessee           : num  1103 1208 1261 1264 1243 ...
##  $ hosp_Virginia            : num  993 1027 1065 1082 1127 ...
##  $ hosp_West_Virginia       : num  1168 1273 1339 1395 1461 ...
##  $ hosp_Arizona             : num  902 938 950 964 956 ...
##  $ hosp_New_Mexico          : num  1013 1089 1134 1140 1147 ...
##  $ hosp_Oklahoma            : num  990 1056 1091 1135 1188 ...
##  $ hosp_Texas               : num  982 1074 1128 1126 1140 ...
##  $ hosp_Colorado            : num  964 1012 1017 1021 1056 ...
##  $ hosp_Idaho               : num  832 893 907 934 978 ...
##  $ hosp_Montana             : num  1000 1053 1082 1107 1197 ...
##  $ hosp_Utah                : num  767 819 847 852 884 ...
##  $ hosp_Wyoming             : num  1016 1016 1079 1133 1221 ...
##  $ hosp_Alaska              : num  1105 1155 1210 1251 1402 ...
##  $ hosp_California          : num  981 1038 1074 1081 1075 ...
##   [list output truncated]
describe(mydata)
##                           vars  n    mean      sd  median trimmed     mad
## Year                         1 13 1997.00    3.89 1997.00 1997.00    4.45
## pers_Connecticut             2 13 4576.84  925.61 4461.31 4541.80  976.70
## pers_Maine                   3 13 3953.33 1142.27 3771.60 3891.14 1311.31
## pers_Massachusetts           4 13 4662.25  980.55 4513.73 4612.54  941.24
## pers_New_Hampshire           5 13 3655.11  864.37 3537.86 3619.57 1071.56
## pers_Rhode_Island            6 13 4203.62  938.22 4061.30 4162.72 1019.39
## pers_Vermont                 7 13 3656.00 1065.74 3403.42 3589.66 1114.31
## pers_Delaware                8 13 4226.45 1008.77 4097.05 4169.93 1075.55
## pers_District_of_Columbia    9 13 6064.29  830.55 5953.65 6049.97  760.96
## pers_Maryland               10 13 3834.10  791.72 3716.21 3788.87  786.96
## pers_New_Jersey             11 13 4187.06  840.13 4071.17 4160.62 1010.43
## pers_New_York               12 13 4544.09  962.17 4404.18 4500.77 1016.20
## pers_Pennsylvania           13 13 4162.49  865.91 4009.98 4119.66  945.68
## pers_Illinois               14 13 3736.54  723.39 3630.81 3708.58  820.05
## pers_Indiana                15 13 3562.37  767.38 3394.72 3522.74  706.67
## pers_Michigan               16 13 3618.79  677.57 3629.37 3596.20  796.26
## pers_Ohio                   17 13 3796.96  838.92 3623.82 3748.46  856.48
## pers_Wisconsin              18 13 3732.66  919.77 3534.25 3688.49  970.80
## pers_Iowa                   19 13 3661.34  842.90 3491.14 3623.32  970.51
## pers_Kansas                 20 13 3668.24  792.20 3572.98 3635.56  910.96
## pers_Minnesota              21 13 3864.38  954.01 3658.74 3819.00 1069.19
## pers_Missouri               22 13 3670.35  829.62 3533.15 3635.39  945.23
## pers_Nebraska               23 13 3557.40  925.14 3343.73 3511.80  972.73
## pers_North_Dakota           24 13 3912.78  936.55 3750.80 3872.61 1018.71
## pers_South_Dakota           25 13 3597.55  887.13 3493.49 3553.35 1029.87
## pers_Alabama                26 13 3576.96  726.08 3589.61 3536.42  845.51
## pers_Arkansas               27 13 3321.08  721.98 3241.64 3288.16  783.10
## pers_Florida                28 13 4009.31  743.29 3906.51 3979.56  842.76
## pers_Georgia                29 13 3359.47  551.48 3312.44 3341.82  544.72
## pers_Kentucky               30 13 3561.11  884.58 3455.59 3527.95 1097.67
## pers_Louisiana              31 13 3665.27  686.04 3598.10 3640.56  656.66
## pers_Mississippi            32 13 3299.10  805.39 3271.15 3268.72  910.86
## pers_North_Carolina         33 13 3430.91  834.30 3354.14 3402.36  916.99
## pers_South_Carolina         34 13 3399.47  826.16 3319.54 3368.47  901.89
## pers_Tennessee              35 13 3682.63  767.13 3634.92 3655.71  822.38
## pers_Virginia               36 13 3240.11  691.31 3147.88 3198.53  847.75
## pers_West_Virginia          37 13 3953.05  945.03 3870.27 3918.26  929.80
## pers_Arizona                38 13 3025.00  484.66 2858.43 2984.29  403.57
## pers_New_Mexico             39 13 3172.21  687.02 3085.46 3138.32  718.85
## pers_Oklahoma               40 13 3366.98  727.16 3275.73 3332.36  726.90
## pers_Texas                  41 13 3291.42  661.97 3234.90 3268.30  721.05
## pers_Colorado               42 13 3316.52  660.96 3141.97 3273.79  658.10
## pers_Idaho                  43 13 2991.31  680.66 2874.72 2953.98  753.42
## pers_Montana                44 13 3341.80  809.19 3156.80 3294.58  832.83
## pers_Utah                   45 13 2720.78  585.55 2702.09 2685.22  698.89
## pers_Wyoming                46 13 3369.19  917.47 3223.87 3321.09 1091.72
## pers_Alaska                 47 13 3941.61 1197.59 3713.69 3859.85 1331.07
## pers_California             48 13 3374.81  532.09 3212.88 3336.06  404.54
## pers_Hawaii                 49 13 3609.67  652.35 3572.92 3585.61  605.43
## pers_Nevada                 50 13 3185.00  616.78 3008.40 3140.19  520.20
## pers_Oregon                 51 13 3310.27  767.06 3107.46 3274.02  726.21
## pers_Washington             52 13 3450.33  737.03 3198.33 3403.44  709.52
## hosp_Connecticut            53 13 1432.11  199.13 1371.22 1416.26  133.12
## hosp_Maine                  54 13 1453.56  343.96 1420.85 1434.74  360.53
## hosp_Massachusetts          55 13 1766.39  302.40 1682.34 1738.23  181.90
## hosp_New_Hampshire          56 13 1266.49  240.21 1182.77 1242.89  122.55
## hosp_Rhode_Island           57 13 1514.73  276.82 1500.35 1495.85  292.20
## hosp_Vermont                58 13 1359.60  341.56 1269.14 1334.39  331.21
## hosp_Delaware               59 13 1549.43  264.55 1532.60 1529.92  173.63
## hosp_District_of_Columbia   60 13 3021.08  313.92 3039.79 3020.56  279.07
## hosp_Maryland               61 13 1433.44  225.23 1396.37 1417.70  168.61
## hosp_New_Jersey             62 13 1471.19  194.52 1419.25 1461.41   89.21
## hosp_New_York               63 13 1715.78  241.12 1674.00 1703.01  211.87
## hosp_Pennsylvania           64 13 1596.69  192.41 1541.57 1585.21   91.22
## hosp_Illinois               65 13 1523.38  204.17 1493.87 1513.84  195.12
## hosp_Indiana                66 13 1375.61  247.17 1335.61 1362.42  222.02
## hosp_Michigan               67 13 1448.69  208.83 1460.70 1443.00  226.39
## hosp_Ohio                   68 13 1459.30  245.47 1409.29 1442.45  192.60
## hosp_Wisconsin              69 13 1356.56  307.56 1291.04 1335.21  309.23
## hosp_Iowa                   70 13 1465.29  286.98 1422.36 1454.02  325.23
## hosp_Kansas                 71 13 1370.49  195.48 1367.63 1364.85  181.55
## hosp_Minnesota              72 13 1257.50  291.95 1220.11 1236.79  291.96
## hosp_Missouri               73 13 1549.21  273.07 1495.08 1531.66  230.58
## hosp_Nebraska               74 13 1473.33  343.19 1395.94 1457.54  354.89
## hosp_North_Dakota           75 13 1630.31  389.02 1648.64 1625.56  467.28
## hosp_South_Dakota           76 13 1511.16  324.06 1477.76 1490.84  341.57
## hosp_Alabama                77 13 1381.12  162.48 1404.54 1379.81  153.45
## hosp_Arkansas               78 13 1330.16  241.35 1300.52 1318.76  250.88
## hosp_Florida                79 13 1347.66  182.37 1311.36 1335.93  150.71
## hosp_Georgia                80 13 1278.16  136.53 1247.55 1271.95   90.20
## hosp_Kentucky               81 13 1405.77  253.98 1393.80 1397.02  287.02
## hosp_Louisiana              82 13 1520.60  212.79 1502.88 1513.64  140.98
## hosp_Mississippi            83 13 1435.79  283.85 1418.42 1430.32  298.93
## hosp_North_Carolina         84 13 1309.49  247.38 1295.55 1300.19  262.54
## hosp_South_Carolina         85 13 1418.36  249.59 1408.26 1409.24  210.87
## hosp_Tennessee              86 13 1360.21  170.42 1318.01 1352.11  111.56
## hosp_Virginia               87 13 1241.55  197.60 1213.22 1227.07  195.20
## hosp_West_Virginia          88 13 1648.12  334.62 1616.45 1635.18  328.91
## hosp_Arizona                89 13 1042.28  142.37  973.39 1023.87   54.76
## hosp_New_Mexico             90 13 1281.27  185.85 1252.05 1278.04  195.48
## hosp_Oklahoma               91 13 1295.02  232.99 1240.08 1274.65  215.22
## hosp_Texas                  92 13 1257.26  200.25 1194.46 1246.03  116.25
## hosp_Colorado               93 13 1155.85  181.02 1079.15 1138.75   99.13
## hosp_Idaho                  94 13 1124.64  228.84 1077.41 1111.65  247.81
## hosp_Montana                95 13 1377.45  312.61 1320.71 1360.99  354.25
## hosp_Utah                   96 13  975.52  156.89  938.95  965.08  136.55
## hosp_Wyoming                97 13 1410.51  335.24 1346.65 1390.31  396.92
## hosp_Alaska                 98 13 1656.98  442.57 1637.86 1638.61  573.41
## hosp_California             99 13 1166.43  161.95 1081.12 1151.12   63.67
## hosp_Hawaii                100 13 1377.07  200.85 1347.17 1370.53  122.44
## hosp_Nevada                101 13 1041.65  159.67  970.04 1027.55   93.49
## hosp_Oregon                102 13 1108.57  233.15 1028.89 1095.69  178.03
## hosp_Washington            103 13 1155.87  223.57 1066.40 1136.13  155.07
## phys_Connecticut           104 13 1095.53  213.65 1068.82 1086.47  219.95
## phys_Maine                 105 13  837.66  255.75  771.38  823.51  227.65
## phys_Massachusetts         106 13 1009.26  216.26  975.46  999.52  195.11
## phys_New_Hampshire         107 13  935.22  235.03  895.32  936.24  317.91
## phys_Rhode_Island          108 13  859.99  154.01  824.78  853.88  129.86
## phys_Vermont               109 13  802.01  253.48  738.48  785.34  241.66
## phys_Delaware              110 13 1055.77  274.30  983.91 1031.08  265.36
## phys_District_of_Columbia  111 13 1224.39  170.21 1153.43 1209.77   53.84
## phys_Maryland              112 13 1033.74  177.63  979.58 1023.90  141.44
## phys_New_Jersey            113 13 1082.96  207.15 1051.33 1079.70  261.61
## phys_New_York              114 13  927.69  181.30  891.91  920.48  173.18
## phys_Pennsylvania          115 13  919.39  179.97  866.31  907.75  166.65
## phys_Illinois              116 13  898.86  179.99  850.66  889.37  159.00
## phys_Indiana               117 13  829.20  179.78  755.68  819.10  165.96
## phys_Michigan              118 13  810.04  130.60  775.79  802.81  138.14
## phys_Ohio                  119 13  868.32  171.29  796.30  854.49  105.04
## phys_Wisconsin             120 13  957.34  252.42  863.98  943.67  223.48
## phys_Iowa                  121 13  793.41  179.61  729.00  783.82  189.43
## phys_Kansas                122 13  951.49  214.62  890.24  937.55  205.98
## phys_Minnesota             123 13  991.71  242.76  927.13  989.27  235.21
## phys_Missouri              124 13  784.97  162.16  743.22  779.43  163.88
## phys_Nebraska              125 13  746.34  190.84  667.80  731.14  133.80
## phys_North_Dakota          126 13  828.17  124.45  811.01  816.80  109.69
## phys_South_Dakota          127 13  832.13  224.85  807.84  825.29  276.69
## phys_Alabama               128 13  940.72  205.43  902.08  917.32  185.45
## phys_Arkansas              129 13  794.10  150.88  754.79  781.09  116.18
## phys_Florida               130 13 1126.40  179.16 1057.14 1110.28   90.32
## phys_Georgia               131 13  907.26  148.27  899.92  903.71  188.13
## phys_Kentucky              132 13  870.89  222.89  822.34  861.05  239.03
## phys_Louisiana             133 13  865.42  179.62  799.27  854.08  158.27
## phys_Mississippi           134 13  745.24  190.07  740.44  734.68  221.23
## phys_North_Carolina        135 13  813.52  191.13  772.57  808.35  166.76
## phys_South_Carolina        136 13  781.43  206.23  739.61  769.93  206.93
## phys_Tennessee             137 13  968.43  227.37  963.47  964.48  289.39
## phys_Virginia              138 13  838.15  168.36  806.99  822.50  175.44
## phys_West_Virginia         139 13  885.26  201.53  855.36  878.59  220.86
## phys_Arizona               140 13  875.11  117.61  821.45  862.54   63.60
## phys_New_Mexico            141 13  736.27  133.15  758.59  732.76  155.34
## phys_Oklahoma              142 13  826.58  188.47  793.96  818.46  215.67
## phys_Texas                 143 13  869.84  188.53  832.98  860.97  214.20
## phys_Colorado              144 13  910.78  200.08  828.56  895.67  179.80
## phys_Idaho                 145 13  727.20  139.32  707.22  719.19  158.00
## phys_Montana               146 13  725.97  190.33  671.07  708.12  152.72
## phys_Utah                  147 13  653.81  132.10  636.22  643.64  125.06
## phys_Wyoming               148 13  784.66  246.24  698.95  768.49  183.12
## phys_Alaska                149 13 1065.58  357.96  954.64 1032.71  293.47
## phys_California            150 13 1089.59  101.99 1097.02 1085.26   63.27
## phys_Hawaii                151 13 1062.75  185.41 1135.16 1067.15  149.63
## phys_Nevada                152 13  993.97  174.72  954.07  974.69  137.12
## phys_Oregon                153 13  893.14  211.95  820.18  880.07  223.24
## phys_Washington            154 13  933.46  212.67  821.48  915.42  176.04
## prof_Connecticut           155 13  156.57   44.92  166.65  157.34   66.25
## prof_Maine                 156 13  131.36   39.65  128.80  129.99   52.92
## prof_Massachusetts         157 13  140.33   36.61  152.53  140.52   48.47
## prof_New_Hampshire         158 13  116.04   31.42  112.42  115.96   42.56
## prof_Rhode_Island          159 13  105.76   25.65  105.80  103.94   28.34
## prof_Vermont               160 13  122.71   42.48  112.03  121.51   50.88
## prof_Delaware              161 13  138.04   40.12  129.22  136.84   38.83
## prof_District_of_Columbia  162 13  127.33   21.26  131.85  129.39   16.76
## prof_Maryland              163 13  125.21   31.52  130.48  124.60   35.40
## prof_New_Jersey            164 13  156.43   30.99  163.72  156.85   32.85
## prof_New_York              165 13  134.35   39.46  123.31  133.21   45.63
## prof_Pennsylvania          166 13  135.78   34.32  137.77  136.39   45.70
## prof_Illinois              167 13  109.34   30.87  108.35  107.78   33.49
## prof_Indiana               168 13   93.78   21.92   95.91   93.61   28.81
## prof_Michigan              169 13  116.43   27.29  123.03  116.72   25.90
## prof_Ohio                  170 13  109.81   24.09  111.25  109.64   19.05
## prof_Wisconsin             171 13  110.76   29.62  118.96  111.07   30.22
## prof_Iowa                  172 13  107.37   25.14  107.11  106.11   33.33
## prof_Kansas                173 13  107.93   26.39  108.31  107.05   37.65
## prof_Minnesota             174 13  117.38   31.82  121.13  117.24   35.09
## prof_Missouri              175 13   94.13   29.79   98.64   93.72   33.94
## prof_Nebraska              176 13  101.94   34.78   98.18   99.63   39.78
## prof_North_Dakota          177 13   96.77   19.95   96.80   97.60   24.54
## prof_South_Dakota          178 13   99.84   23.35  100.82   99.38   30.85
## prof_Alabama               179 13   78.41   21.75   88.80   78.61   18.85
## prof_Arkansas              180 13   96.65   27.03  101.78   96.75   31.15
## prof_Florida               181 13  137.13   30.01  143.99  137.44   34.23
## prof_Georgia               182 13   92.96   17.60   95.18   92.49   16.57
## prof_Kentucky              183 13   92.71   29.80   93.78   92.17   39.64
## prof_Louisiana             184 13   86.75   23.22   89.84   86.34   24.02
## prof_Mississippi           185 13   60.46   16.65   58.51   59.48   15.82
## prof_North_Carolina        186 13   89.46   21.86   92.85   89.25   22.99
## prof_South_Carolina        187 13   76.79   18.60   78.27   77.14   23.05
## prof_Tennessee             188 13   96.33   25.54  101.12   96.08   24.47
## prof_Virginia              189 13   93.03   22.29   91.28   92.85   22.44
## prof_West_Virginia         190 13   87.34   28.03   81.52   86.50   29.34
## prof_Arizona               191 13  102.79   21.31  103.25  101.79   24.63
## prof_New_Mexico            192 13  108.28   26.40  107.60  107.47   38.72
## prof_Oklahoma              193 13  100.04   22.16  100.62  100.46   30.23
## prof_Texas                 194 13   96.50   22.64   99.84   96.68   32.69
## prof_Colorado              195 13  142.22   38.42  140.13  141.64   54.79
## prof_Idaho                 196 13  116.49   34.58  113.17  115.39   46.15
## prof_Montana               197 13  115.12   34.01  106.16  113.87   36.97
## prof_Utah                  198 13   93.67   25.22   98.60   94.18   25.65
## prof_Wyoming               199 13  123.12   42.74  108.50  120.82   45.16
## prof_Alaska                200 13  138.15   45.71  125.82  134.77   42.82
## prof_California            201 13  129.70   21.27  125.55  128.40   18.23
## prof_Hawaii                202 13  110.02   25.99   99.31  107.67   12.52
## prof_Nevada                203 13  115.19   16.39  112.56  114.48    8.73
## prof_Oregon                204 13  120.93   27.74  113.39  119.38   25.55
## prof_Washington            205 13  137.91   38.27  133.67  136.63   42.43
## dent_Connecticut           206 13  257.24   55.61  244.33  254.41   54.06
## dent_Maine                 207 13  182.99   47.62  175.12  181.81   55.42
## dent_Massachusetts         208 13  231.72   55.16  219.95  230.49   55.26
## dent_New_Hampshire         209 13  214.62   70.63  215.45  211.35   85.75
## dent_Rhode_Island          210 13  206.45   36.52  204.03  206.74   49.58
## dent_Vermont               211 13  206.37   58.28  194.69  204.12   62.73
## dent_Delaware              212 13  226.36   59.80  231.63  226.69   80.94
## dent_District_of_Columbia  213 13  232.84   44.70  239.23  234.35   40.19
## dent_Maryland              214 13  189.55   37.08  178.28  187.55   33.76
## dent_New_Jersey            215 13  236.23   47.53  235.16  235.65   61.16
## dent_New_York              216 13  194.64   40.40  186.18  192.57   39.88
## dent_Pennsylvania          217 13  173.17   36.31  162.96  171.28   34.15
## dent_Illinois              218 13  184.71   43.95  176.19  183.34   49.00
## dent_Indiana               219 13  166.88   46.45  158.46  165.93   54.38
## dent_Michigan              220 13  215.16   47.35  210.08  214.54   55.97
## dent_Ohio                  221 13  171.21   39.99  164.43  170.29   48.05
## dent_Wisconsin             222 13  212.57   54.87  196.20  210.66   58.14
## dent_Iowa                  223 13  166.32   38.83  162.61  164.84   41.86
## dent_Kansas                224 13  180.82   43.71  174.18  180.01   53.75
## dent_Minnesota             225 13  210.57   58.41  199.27  208.27   68.52
## dent_Missouri              226 13  153.91   37.59  146.94  153.16   44.75
## dent_Nebraska              227 13  165.49   38.71  159.12  165.12   49.60
## dent_North_Dakota          228 13  169.10   47.66  158.88  168.45   56.77
## dent_South_Dakota          229 13  161.04   44.03  150.66  159.38   38.54
## dent_Alabama               230 13  147.68   35.98  142.94  145.91   39.74
## dent_Arkansas              231 13  144.58   36.29  143.37  143.63   43.48
## dent_Florida               232 13  181.74   30.59  181.56  181.71   35.63
## dent_Georgia               233 13  172.09   41.43  162.77  171.00   44.22
## dent_Kentucky              234 13  133.17   32.64  130.00  132.40   35.93
## dent_Louisiana             235 13  140.45   30.16  150.39  141.45   37.85
## dent_Mississippi           236 13  117.95   30.92  114.66  117.21   34.55
## dent_North_Carolina        237 13  166.02   46.13  159.30  164.97   53.93
## dent_South_Carolina        238 13  154.56   42.40  148.50  153.51   54.86
## dent_Tennessee             239 13  156.39   37.49  150.21  155.38   42.16
## dent_Virginia              240 13  179.87   45.00  169.42  177.98   44.06
## dent_West_Virginia         241 13  135.83   33.60  128.66  135.76   27.99
## dent_Arizona               242 13  169.64   37.54  155.18  167.62   31.30
## dent_New_Mexico            243 13  147.31   40.02  140.17  145.65   49.30
## dent_Oklahoma              244 13  152.75   39.13  145.31  150.84   44.58
## dent_Texas                 245 13  155.68   38.51  146.64  156.34   51.78
## dent_Colorado              246 13  220.51   52.28  208.69  218.82   58.30
## dent_Idaho                 247 13  218.79   57.28  206.31  217.57   61.17
## dent_Montana               248 13  177.82   46.05  168.43  176.67   52.46
## dent_Utah                  249 13  197.84   47.95  191.81  197.71   58.96
## dent_Wyoming               250 13  178.22   42.99  169.78  177.30   49.50
## dent_Alaska                251 13  262.74   55.93  262.60  261.64   59.75
## dent_California            252 13  236.38   45.13  229.71  234.63   44.27
## dent_Hawaii                253 13  228.19   36.59  219.25  227.75   26.25
## dent_Nevada                254 13  193.00   48.49  182.11  191.12   58.34
## dent_Oregon                255 13  255.59   55.62  254.12  255.54   62.51
## dent_Washington            256 13  288.45   62.92  281.74  287.74   73.94
## home_Connecticut           257 13  177.57   42.69  200.19  182.47   10.73
## home_Maine                 258 13  128.54   34.03  134.63  131.04   30.38
## home_Massachusetts         259 13  189.44   42.95  203.79  193.03   28.95
## home_New_Hampshire         260 13  109.52   32.44  129.95  112.67    6.77
## home_Rhode_Island          261 13  105.50   17.47  106.36  107.49   13.57
## home_Vermont               262 13  115.80   28.20  125.44  116.27   20.55
## home_Delaware              263 13  108.76   31.80  113.53  109.84   20.28
## home_District_of_Columbia  264 13  104.31   23.21  110.90  106.12   17.96
## home_Maryland              265 13   85.89   15.36   91.81   87.66    5.88
## home_New_Jersey            266 13  124.11   27.60  133.08  126.41   19.95
## home_New_York              267 13  241.05   37.20  257.35  243.11   22.23
## home_Pennsylvania          268 13   97.48   22.46  105.35   99.69   13.41
## home_Illinois              269 13   86.17   15.30   89.27   87.88    9.02
## home_Indiana               270 13   70.39   16.87   72.31   71.62   10.82
## home_Michigan              271 13   99.61   23.55  106.04  101.52   13.94
## home_Ohio                  272 13  102.78   31.36  119.47  105.01   11.60
## home_Wisconsin             273 13   75.65   15.01   81.57   76.55    9.07
## home_Iowa                  274 13   82.56   26.96   90.46   83.72   22.42
## home_Kansas                275 13   75.77   20.35   81.50   76.79    9.26
## home_Minnesota             276 13   95.34   23.75  101.64   95.89   11.71
## home_Missouri              277 13  102.23   28.13  117.19  104.61   16.24
## home_Nebraska              278 13   48.63   10.32   49.00   48.97   11.93
## home_North_Dakota          279 13   30.34    5.35   31.84   30.73    5.14
## home_South_Dakota          280 13   20.34    5.56   22.41   20.79    4.25
## home_Alabama               281 13  112.78   25.78  108.87  113.97   14.20
## home_Arkansas              282 13   93.76   27.11  109.29   96.19   15.89
## home_Florida               283 13  156.09   28.69  161.60  159.23   22.64
## home_Georgia               284 13  103.39   23.98   96.09  103.71   23.51
## home_Kentucky              285 13  115.09   31.74  128.90  117.96   23.10
## home_Louisiana             286 13  125.39   48.77  112.62  124.93   31.30
## home_Mississippi           287 13  110.42   32.36  105.27  109.86   23.29
## home_North_Carolina        288 13  116.34   30.57  125.96  119.19   19.86
## home_South_Carolina        289 13   96.31   27.51  106.21   97.97    8.81
## home_Tennessee             290 13  131.82   32.72  120.33  130.20   30.67
## home_Virginia              291 13   69.66   15.52   75.34   71.08    9.67
## home_West_Virginia         292 13  108.76   29.92  105.60  109.98   22.29
## home_Arizona               293 13   77.06   18.96   83.61   78.62   13.74
## home_New_Mexico            294 13  123.71   89.76  111.48  112.63   69.36
## home_Oklahoma              295 13  117.78   46.86  115.52  117.47   28.42
## home_Texas                 296 13  128.34   41.04  126.87  128.69   35.68
## home_Colorado              297 13   74.56   18.18   78.70   75.87   16.17
## home_Idaho                 298 13   64.49   18.63   64.61   65.85   21.22
## home_Montana               299 13   79.26   19.05   83.33   80.37   16.13
## home_Utah                  300 13   63.88   20.63   69.34   64.45   19.46
## home_Wyoming               301 13   50.77   15.28   51.89   51.52   11.20
## home_Alaska                302 13   23.96   13.87   20.50   22.28   10.31
## home_California            303 13   81.18   27.92   77.35   79.91   21.89
## home_Hawaii                304 13   53.84   26.19   63.97   54.25   31.10
## home_Nevada                305 13   91.57   28.18   88.77   92.31   25.76
## home_Oregon                306 13   51.70    9.56   54.09   52.24    7.32
## home_Washington            307 13   69.66   10.88   71.42   70.76   10.06
## pres_Connecticut           308 13  496.21  200.93  433.26  479.42  201.90
## pres_Maine                 309 13  410.05  174.30  379.70  394.77  194.57
## pres_Massachusetts         310 13  460.40  181.60  404.71  448.45  170.71
## pres_New_Hampshire         311 13  426.90  146.90  378.57  414.52  137.85
## pres_Rhode_Island          312 13  509.60  218.69  439.82  494.55  223.45
## pres_Vermont               313 13  386.15  154.70  327.57  373.73  131.44
## pres_Delaware              314 13  506.79  206.83  437.89  491.87  190.60
## pres_District_of_Columbia  315 13  368.85  111.85  343.14  359.15  116.50
## pres_Maryland              316 13  467.57  183.62  412.52  453.11  155.98
## pres_New_Jersey            317 13  529.37  207.63  475.82  516.36  224.59
## pres_New_York              318 13  472.00  197.21  421.37  455.73  206.15
## pres_Pennsylvania          319 13  507.65  199.94  458.90  493.01  216.99
## pres_Illinois              320 13  415.90  145.87  384.86  408.39  175.50
## pres_Indiana               321 13  451.13  164.17  400.61  438.76  147.75
## pres_Michigan              322 13  451.68  155.43  413.39  441.31  153.99
## pres_Ohio                  323 13  453.10  176.63  417.17  441.18  201.81
## pres_Wisconsin             324 13  419.39  156.75  375.88  412.57  184.77
## pres_Iowa                  325 13  398.80  147.09  348.51  384.58  122.45
## pres_Kansas                326 13  407.49  154.65  347.16  394.54  110.43
## pres_Minnesota             327 13  406.71  161.99  360.88  397.16  166.65
## pres_Missouri              328 13  437.45  189.60  351.86  421.24  127.27
## pres_Nebraska              329 13  427.33  156.85  380.56  417.29  168.15
## pres_North_Dakota          330 13  427.77  199.39  347.50  410.35  149.30
## pres_South_Dakota          331 13  354.05  131.33  315.80  341.57  121.23
## pres_Alabama               332 13  486.15  188.69  436.21  470.49  183.04
## pres_Arkansas              333 13  402.55  141.04  366.05  390.89  150.77
## pres_Florida               334 13  515.73  201.22  472.26  508.73  251.52
## pres_Georgia               335 13  416.66  136.32  378.37  405.33  133.54
## pres_Kentucky              336 13  478.96  206.13  399.35  463.77  165.78
## pres_Louisiana             337 13  446.88  162.33  395.79  435.02  152.29
## pres_Mississippi           338 13  414.75  155.49  360.41  401.84  135.17
## pres_North_Carolina        339 13  448.46  188.91  377.42  432.33  151.67
## pres_South_Carolina        340 13  425.61  175.45  373.39  411.75  169.21
## pres_Tennessee             341 13  501.42  213.36  425.75  479.94  168.26
## pres_Virginia              342 13  419.78  146.28  382.94  409.75  159.84
## pres_West_Virginia         343 13  488.62  176.34  445.86  472.53  177.11
## pres_Arizona               344 13  394.52  118.34  344.83  386.62  110.37
## pres_New_Mexico            345 13  365.92  114.93  318.08  357.78   95.23
## pres_Oklahoma              346 13  402.44  136.80  351.74  391.84  118.07
## pres_Texas                 347 13  391.16  117.89  361.21  383.22  123.86
## pres_Colorado              348 13  350.88   96.92  327.53  345.49  106.05
## pres_Idaho                 349 13  335.28  116.72  306.44  322.99  102.04
## pres_Montana               350 13  360.68  100.11  335.76  352.43  104.19
## pres_Utah                  351 13  386.24  143.33  357.09  375.68  149.23
## pres_Wyoming               352 13  351.78  117.43  331.70  342.64  134.39
## pres_Alaska                353 13  373.44  121.96  339.37  363.65  124.84
## pres_California            354 13  343.75  110.44  298.34  331.32   70.59
## pres_Hawaii                355 13  414.70  113.79  371.25  401.58   78.46
## pres_Nevada                356 13  472.01  164.56  431.60  461.85  168.50
## pres_Oregon                357 13  377.16  119.80  354.74  370.18  142.15
## pres_Washington            358 13  396.94  118.86  363.43  388.97  122.43
## dura_Connecticut           359 13   70.28   17.90   70.44   70.33   27.24
## dura_Maine                 360 13   55.20   11.85   52.17   54.71   13.48
## dura_Massachusetts         361 13   70.10   16.07   68.27   69.70   23.31
## dura_New_Hampshire         362 13   74.75   21.54   75.67   74.74   31.08
## dura_Rhode_Island          363 13   49.51   11.86   46.47   48.90   13.37
## dura_Vermont               364 13   55.65   13.19   53.17   55.34   17.52
## dura_Delaware              365 13  111.73   28.56  114.70  112.41   40.23
## dura_District_of_Columbia  366 13   80.25   17.75   84.84   80.57   19.66
## dura_Maryland              367 13   65.56   16.35   63.21   65.14   22.52
## dura_New_Jersey            368 13   85.41   26.91   78.56   84.58   32.58
## dura_New_York              369 13   59.89   15.60   60.51   59.78   21.13
## dura_Pennsylvania          370 13   70.64   17.79   67.35   70.29   22.93
## dura_Illinois              371 13   57.48   13.49   55.51   57.32   18.34
## dura_Indiana               372 13   81.84   17.92   79.91   81.64   26.80
## dura_Michigan              373 13  100.32   22.48   99.82  100.13   32.13
## dura_Ohio                  374 13   65.98   15.58   60.62   65.36   17.07
## dura_Wisconsin             375 13   62.03    9.84   61.71   61.94   12.83
## dura_Iowa                  376 13   76.86   15.36   70.86   76.32   14.08
## dura_Kansas                377 13   63.20   16.26   61.50   62.86   24.99
## dura_Minnesota             378 13   84.03   15.39   88.96   84.56   14.39
## dura_Missouri              379 13   55.81   13.98   56.13   55.86   19.78
## dura_Nebraska              380 13   93.73   19.05   90.27   93.25   22.95
## dura_North_Dakota          381 13   78.48   19.88   81.05   78.94   26.37
## dura_South_Dakota          382 13   66.95   12.48   73.06   67.37   11.20
## dura_Alabama               383 13   69.25   19.73   60.71   68.21   15.40
## dura_Arkansas              384 13   50.24   14.92   42.41   49.29    9.93
## dura_Florida               385 13  131.96   24.52  133.54  131.46   31.94
## dura_Georgia               386 13   73.88   15.13   72.29   73.58   22.01
## dura_Kentucky              387 13   68.27   16.25   61.77   67.46   13.21
## dura_Louisiana             388 13   56.28   12.55   51.52   55.70   11.10
## dura_Mississippi           389 13   69.90   20.77   68.07   69.67   31.16
## dura_North_Carolina        390 13   74.14   15.38   79.54   74.51   16.95
## dura_South_Carolina        391 13   73.34   19.02   70.67   72.69   25.00
## dura_Tennessee             392 13   63.41   17.58   57.57   62.50   19.44
## dura_Virginia              393 13   69.09   18.09   67.80   68.90   27.19
## dura_West_Virginia         394 13   82.88   20.34   74.20   82.03   16.26
## dura_Arizona               395 13   89.41   13.60   87.42   88.65   17.85
## dura_New_Mexico            396 13  100.13   26.63   98.55   99.88   41.24
## dura_Oklahoma              397 13   68.55   14.82   69.70   68.73   20.02
## dura_Texas                 398 13   70.04   13.99   67.21   69.90   18.45
## dura_Colorado              399 13   93.77   17.97   88.33   93.22   19.22
## dura_Idaho                 400 13   81.11   13.08   80.36   80.93   15.64
## dura_Montana               401 13   82.61   25.26   75.45   81.62   30.01
## dura_Utah                  402 13   88.08   14.35   86.72   87.80   20.57
## dura_Wyoming               403 13   78.04   19.32   85.80   78.72   16.25
## dura_Alaska                404 13   68.66   15.29   67.48   68.34   22.53
## dura_California            405 13   48.79   10.14   48.74   48.63   13.51
## dura_Hawaii                406 13   85.52   23.40   93.03   86.36   26.39
## dura_Nevada                407 13   80.05   21.20   79.95   79.56   27.05
## dura_Oregon                408 13   60.03   16.22   54.43   59.43   15.61
## dura_Washington            409 13   73.96   16.54   67.32   73.10   14.22
## nurs_Connecticut           410 13  576.22  102.67  596.69  576.89  146.29
## nurs_Maine                 411 13  351.63   43.00  350.26  350.15   57.02
## nurs_Massachusetts         412 13  482.63   75.57  500.81  481.83   88.08
## nurs_New_Hampshire         413 13  315.51   63.33  341.71  317.42   66.06
## nurs_Rhode_Island          414 13  434.46   78.09  422.62  434.24   80.43
## nurs_Vermont               415 13  291.55   52.73  300.24  289.94   83.07
## nurs_Delaware              416 13  286.01   67.74  272.69  284.71   86.87
## nurs_District_of_Columbia  417 13  434.85   69.70  427.22  432.94   89.33
## nurs_Maryland              418 13  283.63   69.43  279.72  281.76   81.29
## nurs_New_Jersey            419 13  318.76   62.25  331.15  319.26   63.23
## nurs_New_York              420 13  397.58   84.48  384.09  395.65  107.47
## nurs_Pennsylvania          421 13  390.52  100.01  398.43  388.39  145.51
## nurs_Illinois              422 13  271.98   43.69  271.34  271.79   61.06
## nurs_Indiana               423 13  332.05   42.43  331.45  331.31   55.09
## nurs_Michigan              424 13  230.25   45.84  231.71  229.10   65.27
## nurs_Ohio                  425 13  378.77   79.83  376.15  377.11  104.36
## nurs_Wisconsin             426 13  334.86   47.29  348.96  335.16   55.32
## nurs_Iowa                  427 13  358.02   66.16  348.60  356.50   85.05
## nurs_Kansas                428 13  303.75   51.15  310.79  302.61   73.83
## nurs_Minnesota             429 13  384.06   29.25  372.66  383.04   21.42
## nurs_Missouri              430 13  313.81   58.91  338.88  314.98   66.20
## nurs_Nebraska              431 13  341.63   78.03  346.19  341.85   95.26
## nurs_North_Dakota          432 13  377.12   69.84  352.29  371.72   66.55
## nurs_South_Dakota          433 13  341.60   79.54  343.20  338.33   91.74
## nurs_Alabama               434 13  218.98   59.55  228.68  218.93   84.02
## nurs_Arkansas              435 13  250.75   54.05  263.50  250.15   57.71
## nurs_Florida               436 13  270.09   53.15  287.80  271.10   52.02
## nurs_Georgia               437 13  177.74   32.24  190.06  178.10   36.05
## nurs_Kentucky              438 13  265.69   53.99  288.79  266.76   48.17
## nurs_Louisiana             439 13  207.97   30.89  198.39  206.03   21.53
## nurs_Mississippi           440 13  199.08   48.90  196.83  197.30   63.66
## nurs_North_Carolina        441 13  244.19   57.24  257.80  243.87   55.52
## nurs_South_Carolina        442 13  183.02   50.19  180.82  182.18   61.37
## nurs_Tennessee             443 13  259.21   57.93  290.60  262.85   30.66
## nurs_Virginia              444 13  210.91   55.75  216.49  210.52   80.91
## nurs_West_Virginia         445 13  270.04   55.15  276.01  269.43   73.43
## nurs_Arizona               446 13  159.27   18.47  169.72  160.87    4.60
## nurs_New_Mexico            447 13  135.25   26.15  122.35  133.11   19.66
## nurs_Oklahoma              448 13  230.71   35.71  236.16  229.86   50.67
## nurs_Texas                 449 13  171.02   26.32  178.05  171.31   31.00
## nurs_Colorado              450 13  198.85   29.03  208.52  198.93   36.54
## nurs_Idaho                 451 13  177.97   24.81  173.11  177.35   26.51
## nurs_Montana               452 13  249.92   44.19  249.61  248.99   40.12
## nurs_Utah                  453 13  120.77   14.58  120.75  120.35   19.36
## nurs_Wyoming               454 13  203.38   36.94  208.05  202.60   31.87
## nurs_Alaska                455 13   98.34   28.76   82.00   96.20   16.87
## nurs_California            456 13  162.83   31.61  159.29  162.30   45.19
## nurs_Hawaii                457 13  157.70   31.21  151.66  154.42   30.81
## nurs_Nevada                458 13  101.73   19.66   93.08  100.26   12.50
## nurs_Oregon                459 13  199.05   30.74  197.40  198.75   44.75
## nurs_Washington            460 13  238.70   29.29  244.17  239.18   30.47
## othe_Connecticut           461 13  315.11   75.49  298.97  314.47  107.94
## othe_Maine                 462 13  402.34  216.93  323.37  387.20  217.21
## othe_Massachusetts         463 13  311.99   79.97  314.38  310.76   73.47
## othe_New_Hampshire         464 13  196.07   56.04  199.07  197.81   67.39
## othe_Rhode_Island          465 13  417.63  137.21  379.00  415.81  152.84
## othe_Vermont               466 13  316.17  130.11  278.81  309.03  130.47
## othe_Delaware              467 13  243.56   72.33  246.68  243.31   89.62
## othe_District_of_Columbia  468 13  470.39  108.30  458.29  474.86  137.96
## othe_Maryland              469 13  149.52   47.81  157.27  147.44   50.54
## othe_New_Jersey            470 13  182.60   53.76  186.42  180.44   63.26
## othe_New_York              471 13  401.13  138.69  397.41  397.40  153.31
## othe_Pennsylvania          472 13  271.16   98.88  257.96  267.68  129.54
## othe_Illinois              473 13  188.73   57.16  185.64  188.04   69.20
## othe_Indiana               474 13  161.50   46.36  143.33  156.99   28.45
## othe_Michigan              475 13  146.61   31.99  151.54  147.17   35.77
## othe_Ohio                  476 13  187.69   68.87  162.03  182.48   54.19
## othe_Wisconsin             477 13  203.50   59.76  188.09  201.66   59.70
## othe_Iowa                  478 13  212.71   67.54  207.30  210.98   81.74
## othe_Kansas                479 13  207.29   89.62  207.25  206.09  124.74
## othe_Minnesota             480 13  317.08  112.74  286.32  307.46  106.26
## othe_Missouri              481 13  178.83   58.46  174.27  179.35   67.08
## othe_Nebraska              482 13  158.97   67.63  147.89  155.56   79.41
## othe_North_Dakota          483 13  274.73   80.34  243.01  270.38   86.38
## othe_South_Dakota          484 13  210.43   52.79  201.57  210.04   61.38
## othe_Alabama               485 13  141.88   42.20  142.25  140.06   52.20
## othe_Arkansas              486 13  158.31   43.38  158.82  160.34   66.40
## othe_Florida               487 13  142.51   42.93  135.11  141.92   50.77
## othe_Georgia               488 13  137.33   36.65  139.96  137.45   39.91
## othe_Kentucky              489 13  130.55   53.25  118.07  128.37   55.02
## othe_Louisiana             490 13  215.53   38.98  205.36  215.51   40.00
## othe_Mississippi           491 13  145.51   64.74  137.21  143.43   75.01
## othe_North_Carolina        492 13  169.28   53.10  172.01  169.50   70.28
## othe_South_Carolina        493 13  190.06   57.49  182.62  190.77   74.17
## othe_Tennessee             494 13  145.43   52.98  144.41  145.32   71.24
## othe_Virginia              495 13  118.07   34.63  114.06  117.57   47.14
## othe_West_Virginia         496 13  246.21   93.88  244.11  244.52   80.52
## othe_Arizona               497 13  114.93   20.35  115.17  113.78   24.11
## othe_New_Mexico            498 13  174.08   59.92  171.92  170.97   71.28
## othe_Oklahoma              499 13  173.12   57.32  163.64  172.11   69.61
## othe_Texas                 500 13  151.58   44.09  156.24  150.71   51.00
## othe_Colorado              501 13  169.09   44.94  158.61  164.40   50.26
## othe_Idaho                 502 13  145.33   58.84  124.68  142.33   53.54
## othe_Montana               503 13  172.97   55.20  154.61  170.08   39.51
## othe_Utah                  504 13  140.97   43.22  119.69  138.06   28.95
## othe_Wyoming               505 13  188.72   79.49  198.25  187.40   85.74
## othe_Alaska                506 13  253.76  126.72  214.70  241.85  104.48
## othe_California            507 13  116.16   35.25  114.39  114.49   38.24
## othe_Hawaii                508 13  119.89   42.65  116.54  116.58   48.26
## othe_Nevada                509 13   95.82   26.06   87.73   94.91   23.88
## othe_Oregon                510 13  244.10   71.96  218.80  242.43   90.31
## othe_Washington            511 13  155.38   42.11  146.60  154.61   50.70
##                               min     max   range  skew kurtosis     se
## Year                      1991.00 2003.00   12.00  0.00    -1.48   1.08
## pers_Connecticut          3324.20 6214.96 2890.76  0.33    -1.30 256.72
## pers_Maine                2510.88 6079.92 3569.04  0.42    -1.25 316.81
## pers_Massachusetts        3315.81 6555.52 3239.71  0.46    -1.03 271.96
## pers_New_Hampshire        2481.08 5220.14 2739.06  0.30    -1.33 239.73
## pers_Rhode_Island         2890.90 5966.29 3075.39  0.40    -1.14 260.21
## pers_Vermont              2359.76 5682.02 3322.26  0.50    -1.19 295.58
## pers_Delaware             2878.12 6196.42 3318.30  0.44    -1.08 279.78
## pers_District_of_Columbia 4646.99 7639.15 2992.16  0.22    -0.89 230.35
## pers_Maryland             2777.20 5388.60 2611.40  0.52    -0.99 219.58
## pers_New_Jersey           2972.28 5692.65 2720.37  0.33    -1.21 233.01
## pers_New_York             3201.97 6362.65 3160.68  0.38    -1.14 266.86
## pers_Pennsylvania         3010.04 5786.05 2776.01  0.44    -1.19 240.16
## pers_Illinois             2722.24 5058.38 2336.14  0.37    -1.20 200.63
## pers_Indiana              2532.47 5028.22 2495.75  0.48    -1.13 212.83
## pers_Michigan             2646.65 4839.39 2192.74  0.24    -1.24 187.93
## pers_Ohio                 2705.58 5421.82 2716.23  0.53    -1.04 232.67
## pers_Wisconsin            2543.50 5407.66 2864.16  0.44    -1.26 255.10
## pers_Iowa                 2559.15 5181.65 2622.50  0.35    -1.34 233.78
## pers_Kansas               2609.10 5086.91 2477.81  0.35    -1.30 219.72
## pers_Minnesota            2618.72 5609.31 2990.58  0.40    -1.25 264.60
## pers_Missouri             2522.18 5203.07 2680.89  0.39    -1.19 230.09
## pers_Nebraska             2380.50 5235.87 2855.37  0.44    -1.29 256.59
## pers_North_Dakota         2666.52 5600.95 2934.43  0.39    -1.23 259.75
## pers_South_Dakota         2452.27 5228.97 2776.70  0.36    -1.27 246.05
## pers_Alabama              2570.60 5029.25 2458.65  0.43    -0.95 201.38
## pers_Arkansas             2379.71 4624.61 2244.90  0.37    -1.27 200.24
## pers_Florida              2974.05 5371.82 2397.77  0.39    -1.21 206.15
## pers_Georgia              2539.77 4373.37 1833.60  0.32    -1.10 152.95
## pers_Kentucky             2397.64 5089.39 2691.75  0.34    -1.39 245.34
## pers_Louisiana            2646.34 4956.02 2309.68  0.32    -1.10 190.27
## pers_Mississippi          2194.05 4738.38 2544.33  0.31    -1.25 223.38
## pers_North_Carolina       2272.45 4903.46 2631.01  0.32    -1.31 231.39
## pers_South_Carolina       2278.31 4861.66 2583.35  0.34    -1.31 229.14
## pers_Tennessee            2572.15 5089.28 2517.13  0.31    -1.19 212.76
## pers_Virginia             2375.33 4562.30 2186.97  0.45    -1.17 191.73
## pers_West_Virginia        2606.17 5682.71 3076.53  0.33    -1.19 262.11
## pers_Arizona              2457.09 4040.63 1583.54  0.75    -0.75 134.42
## pers_New_Mexico           2260.30 4456.92 2196.62  0.43    -1.17 190.55
## pers_Oklahoma             2375.36 4739.41 2364.05  0.39    -1.14 201.68
## pers_Texas                2372.78 4464.40 2091.62  0.35    -1.27 183.60
## pers_Colorado             2510.69 4592.29 2081.60  0.52    -1.17 183.32
## pers_Idaho                2134.78 4258.45 2123.67  0.48    -1.19 188.78
## pers_Montana              2373.02 4829.96 2456.94  0.48    -1.31 224.43
## pers_Utah                 1993.21 3839.52 1846.31  0.51    -1.10 162.40
## pers_Wyoming              2230.13 5037.36 2807.22  0.41    -1.26 254.46
## pers_Alaska               2588.93 6193.63 3604.71  0.56    -1.17 332.15
## pers_California           2677.22 4498.64 1821.42  0.68    -0.72 147.58
## pers_Hawaii               2630.49 4853.52 2223.02  0.24    -0.98 180.93
## pers_Nevada               2411.06 4451.87 2040.81  0.71    -0.80 171.06
## pers_Oregon               2324.12 4695.13 2371.00  0.43    -1.31 212.74
## pers_Washington           2538.24 4878.24 2340.00  0.57    -1.11 204.41
## hosp_Connecticut          1178.36 1860.27  681.91  0.80    -0.57  55.23
## hosp_Maine                 997.92 2116.13 1118.21  0.40    -1.12  95.40
## hosp_Massachusetts        1387.26 2455.17 1067.91  0.90    -0.28  83.87
## hosp_New_Hampshire         967.53 1825.05  857.52  0.99    -0.11  66.62
## hosp_Rhode_Island         1158.94 2078.18  919.23  0.59    -0.84  76.78
## hosp_Vermont               927.41 2069.14 1141.73  0.60    -0.87  94.73
## hosp_Delaware             1165.06 2148.41  983.35  0.67    -0.23  73.37
## hosp_District_of_Columbia 2413.49 3634.38 1220.89  0.01    -0.48  87.07
## hosp_Maryland             1126.12 1913.96  787.84  0.68    -0.60  62.47
## hosp_New_Jersey           1166.48 1883.47  716.99  0.63    -0.44  53.95
## hosp_New_York             1355.08 2216.95  861.87  0.50    -0.66  66.88
## hosp_Pennsylvania         1312.63 2006.98  694.35  0.72    -0.53  53.37
## hosp_Illinois             1221.96 1929.74  707.79  0.49    -0.87  56.63
## hosp_Indiana              1034.00 1862.33  828.33  0.48    -1.04  68.55
## hosp_Michigan             1116.70 1843.34  726.63  0.14    -0.98  57.92
## hosp_Ohio                 1120.38 1983.54  863.16  0.70    -0.55  68.08
## hosp_Wisconsin             981.94 1965.97  984.03  0.60    -1.00  85.30
## hosp_Iowa                 1078.44 1976.09  897.65  0.31    -1.31  79.59
## hosp_Kansas               1061.81 1741.14  679.33  0.26    -0.99  54.22
## hosp_Minnesota             919.67 1823.17  903.50  0.61    -1.05  80.97
## hosp_Missouri             1152.09 2139.38  987.29  0.63    -0.52  75.74
## hosp_Nebraska             1024.43 2095.93 1071.50  0.46    -1.24  95.18
## hosp_North_Dakota         1054.66 2258.19 1203.53  0.20    -1.28 107.89
## hosp_South_Dakota         1109.84 2136.04 1026.20  0.49    -1.08  89.88
## hosp_Alabama              1092.02 1684.55  592.53  0.07    -0.83  45.06
## hosp_Arkansas             1007.95 1777.80  769.85  0.44    -1.14  66.94
## hosp_Florida              1108.95 1715.50  606.54  0.68    -0.83  50.58
## hosp_Georgia              1063.92 1560.77  496.85  0.53    -0.62  37.87
## hosp_Kentucky             1051.88 1855.92  804.04  0.36    -1.27  70.44
## hosp_Louisiana            1181.95 1935.89  753.93  0.31    -0.82  59.02
## hosp_Mississippi          1001.42 1930.36  928.95  0.14    -1.20  78.73
## hosp_North_Carolina        948.20 1773.04  824.84  0.31    -1.15  68.61
## hosp_South_Carolina       1050.42 1886.53  836.10  0.37    -1.07  69.22
## hosp_Tennessee            1102.53 1707.04  604.51  0.59    -0.77  47.27
## hosp_Virginia              993.17 1649.18  656.00  0.58    -0.89  54.81
## hosp_West_Virginia        1168.44 2270.11 1101.67  0.35    -1.17  92.81
## hosp_Arizona               901.56 1385.51  483.95  1.21     0.20  39.49
## hosp_New_Mexico           1013.00 1585.06  572.06  0.30    -1.42  51.55
## hosp_Oklahoma              989.77 1824.33  834.56  0.77    -0.34  64.62
## hosp_Texas                 981.76 1656.20  674.44  0.71    -0.76  55.54
## hosp_Colorado              963.51 1536.29  572.78  0.89    -0.73  50.21
## hosp_Idaho                 832.25 1559.96  727.71  0.49    -1.14  63.47
## hosp_Montana               999.84 1936.13  936.29  0.39    -1.43  86.70
## hosp_Utah                  766.80 1299.13  532.33  0.63    -0.79  43.51
## hosp_Wyoming              1015.50 2027.70 1012.19  0.43    -1.26  92.98
## hosp_Alaska               1105.46 2410.61 1305.15  0.35    -1.40 122.75
## hosp_California            981.17 1520.18  539.01  0.93    -0.54  44.92
## hosp_Hawaii               1050.81 1775.17  724.36  0.31    -0.76  55.71
## hosp_Nevada                866.24 1372.20  505.96  0.99    -0.49  44.28
## hosp_Oregon                808.28 1550.55  742.27  0.61    -1.08  64.67
## hosp_Washington            889.12 1639.69  750.58  0.83    -0.62  62.01
## phys_Connecticut           817.68 1473.07  655.39  0.36    -1.26  59.26
## phys_Maine                 525.94 1305.08  779.14  0.51    -1.30  70.93
## phys_Massachusetts         713.53 1412.16  698.63  0.49    -1.08  59.98
## phys_New_Hampshire         593.36 1265.87  672.52  0.01    -1.70  65.19
## phys_Rhode_Island          636.58 1150.59  514.01  0.40    -1.03  42.71
## phys_Vermont               513.42 1274.01  760.59  0.58    -1.21  70.30
## phys_Delaware              742.61 1640.51  897.89  0.72    -0.78  76.08
## phys_District_of_Columbia 1015.36 1594.27  578.91  1.02    -0.33  47.21
## phys_Maryland              789.83 1385.84  596.01  0.54    -0.94  49.27
## phys_New_Jersey            774.54 1427.20  652.66  0.31    -1.29  57.45
## phys_New_York              659.93 1274.67  614.74  0.42    -1.03  50.28
## phys_Pennsylvania          696.11 1270.77  574.66  0.54    -1.11  49.92
## phys_Illinois              656.18 1245.86  589.67  0.51    -1.03  49.92
## phys_Indiana               594.91 1174.60  579.69  0.55    -1.13  49.86
## phys_Michigan              646.24 1053.41  407.17  0.47    -1.22  36.22
## phys_Ohio                  673.22 1215.59  542.36  0.80    -0.85  47.51
## phys_Wisconsin             633.92 1431.08  797.16  0.61    -1.09  70.01
## phys_Iowa                  549.07 1143.31  594.24  0.44    -1.15  49.81
## phys_Kansas                679.91 1376.46  696.55  0.55    -1.04  59.52
## phys_Minnesota             630.71 1379.50  748.79  0.12    -1.47  67.33
## phys_Missouri              560.72 1070.09  509.37  0.42    -1.25  44.98
## phys_Nebraska              521.83 1138.08  616.25  0.75    -0.87  52.93
## phys_North_Dakota          664.59 1116.73  452.14  0.87    -0.11  34.52
## phys_South_Dakota          534.56 1204.95  670.39  0.23    -1.55  62.36
## phys_Alabama               711.43 1427.36  715.93  0.90    -0.09  56.97
## phys_Arkansas              627.75 1103.54  475.79  0.71    -0.90  41.85
## phys_Florida               918.19 1511.94  593.75  0.88    -0.64  49.69
## phys_Georgia               689.55 1163.93  474.37  0.28    -1.18  41.12
## phys_Kentucky              579.73 1270.36  690.63  0.39    -1.35  61.82
## phys_Louisiana             645.77 1209.79  564.02  0.50    -1.29  49.82
## phys_Mississippi           514.35 1092.25  577.90  0.48    -1.22  52.72
## phys_North_Carolina        550.72 1133.25  582.53  0.43    -1.30  53.01
## phys_South_Carolina        521.88 1167.44  645.56  0.51    -1.18  57.20
## phys_Tennessee             640.77 1339.55  698.77  0.12    -1.44  63.06
## phys_Virginia              646.09 1202.37  556.27  0.73    -0.67  46.69
## phys_West_Virginia         599.94 1243.95  644.01  0.42    -1.20  55.89
## phys_Arizona               764.92 1123.55  358.63  1.03    -0.42  32.62
## phys_New_Mexico            528.38  982.79  454.41  0.15    -1.17  36.93
## phys_Oklahoma              584.83 1157.62  572.79  0.43    -1.35  52.27
## phys_Texas                 635.31 1201.94  566.63  0.46    -1.29  52.29
## phys_Colorado              675.94 1311.78  635.84  0.58    -1.11  55.49
## phys_Idaho                 554.79  987.70  432.91  0.47    -1.20  38.64
## phys_Montana               536.02 1112.30  576.29  0.78    -0.88  52.79
## phys_Utah                  497.56  921.83  424.27  0.65    -0.89  36.64
## phys_Wyoming               509.14 1238.03  728.89  0.58    -1.22  68.30
## phys_Alaska                708.91 1783.85 1074.94  0.77    -0.86  99.28
## phys_California            908.93 1317.83  408.90  0.38    -0.06  28.29
## phys_Hawaii                745.73 1331.38  585.64 -0.48    -1.25  51.42
## phys_Nevada                796.57 1403.49  606.92  0.99    -0.14  48.46
## phys_Oregon                628.34 1301.74  673.41  0.47    -1.24  58.78
## phys_Washington            702.74 1362.67  659.93  0.71    -0.97  58.98
## prof_Connecticut            82.10  222.58  140.48 -0.05    -1.54  12.46
## prof_Maine                  76.20  201.66  125.46  0.21    -1.37  11.00
## prof_Massachusetts          82.95  195.58  112.62 -0.11    -1.52  10.15
## prof_New_Hampshire          67.78  165.18   97.40  0.05    -1.54   8.71
## prof_Rhode_Island           73.23  158.30   85.07  0.56    -0.84   7.11
## prof_Vermont                67.11  191.49  124.37  0.25    -1.59  11.78
## prof_Delaware               81.25  207.97  126.72  0.43    -1.18  11.13
## prof_District_of_Columbia   75.58  156.41   80.83 -0.83     0.18   5.90
## prof_Maryland               77.40  179.68  102.27  0.16    -1.23   8.74
## prof_New_Jersey            106.58  201.73   95.15 -0.20    -1.48   8.59
## prof_New_York               84.40  196.83  112.43  0.31    -1.58  10.94
## prof_Pennsylvania           80.35  184.48  104.12 -0.14    -1.50   9.52
## prof_Illinois               64.91  170.85  105.94  0.38    -0.96   8.56
## prof_Indiana                58.97  130.53   71.56  0.02    -1.24   6.08
## prof_Michigan               68.59  161.10   92.51 -0.20    -1.07   7.57
## prof_Ohio                   69.78  151.71   81.93  0.04    -1.04   6.68
## prof_Wisconsin              63.64  154.40   90.77 -0.20    -1.50   8.22
## prof_Iowa                   74.55  154.04   79.48  0.23    -1.24   6.97
## prof_Kansas                 71.39  154.14   82.74  0.19    -1.43   7.32
## prof_Minnesota              69.95  166.33   96.38 -0.07    -1.57   8.82
## prof_Missouri               51.76  141.01   89.25  0.01    -1.54   8.26
## prof_Nebraska               57.88  171.43  113.56  0.55    -1.02   9.65
## prof_North_Dakota           60.74  123.64   62.91 -0.37    -1.22   5.53
## prof_South_Dakota           64.24  140.46   76.22  0.03    -1.35   6.48
## prof_Alabama                44.79  109.83   65.04 -0.25    -1.60   6.03
## prof_Arkansas               55.27  136.94   81.67 -0.07    -1.58   7.50
## prof_Florida                84.82  186.01  101.19 -0.07    -1.18   8.32
## prof_Georgia                63.31  127.80   64.49  0.30    -0.74   4.88
## prof_Kentucky               49.33  142.09   92.76  0.10    -1.43   8.27
## prof_Louisiana              48.38  129.69   81.31  0.13    -0.96   6.44
## prof_Mississippi            38.52   93.12   54.60  0.53    -0.86   4.62
## prof_North_Carolina         53.01  128.13   75.12  0.00    -1.10   6.06
## prof_South_Carolina         45.66  104.04   58.38 -0.16    -1.39   5.16
## prof_Tennessee              57.67  137.70   80.03 -0.07    -1.35   7.08
## prof_Virginia               57.74  130.26   72.52  0.08    -1.27   6.18
## prof_West_Virginia          48.85  135.08   86.23  0.38    -1.28   7.77
## prof_Arizona                73.40  143.16   69.76  0.38    -1.01   5.91
## prof_New_Mexico             72.32  153.11   80.79  0.13    -1.33   7.32
## prof_Oklahoma               63.17  132.34   69.17 -0.21    -1.51   6.15
## prof_Texas                  63.32  127.69   64.37 -0.02    -1.66   6.28
## prof_Colorado               89.44  201.37  111.92  0.13    -1.49  10.66
## prof_Idaho                  67.84  177.28  109.44  0.18    -1.39   9.59
## prof_Montana                71.64  172.45  100.80  0.39    -1.53   9.43
## prof_Utah                   53.03  128.67   75.63 -0.29    -1.52   6.99
## prof_Wyoming                69.16  202.30  133.14  0.38    -1.33  11.85
## prof_Alaska                 87.52  225.96  138.43  0.63    -1.18  12.68
## prof_California            101.09  172.61   71.52  0.63    -0.84   5.90
## prof_Hawaii                 82.09  163.82   81.73  1.00    -0.52   7.21
## prof_Nevada                 88.00  150.20   62.20  0.62    -0.22   4.55
## prof_Oregon                 84.75  174.14   89.39  0.57    -1.09   7.69
## prof_Washington             86.60  203.26  116.66  0.27    -1.40  10.61
## dent_Connecticut           192.79  352.75  159.95  0.52    -1.32  15.42
## dent_Maine                 117.08  261.93  144.85  0.29    -1.47  13.21
## dent_Massachusetts         156.35  320.57  164.22  0.30    -1.48  15.30
## dent_New_Hampshire         124.12  341.10  216.98  0.44    -1.24  19.59
## dent_Rhode_Island          150.76  258.85  108.08 -0.11    -1.62  10.13
## dent_Vermont               131.42  305.99  174.57  0.40    -1.38  16.16
## dent_Delaware              131.60  317.49  185.88 -0.07    -1.46  16.59
## dent_District_of_Columbia  155.15  293.92  138.77 -0.30    -1.31  12.40
## dent_Maryland              142.33  258.80  116.47  0.60    -1.02  10.28
## dent_New_Jersey            168.69  310.19  141.49  0.15    -1.38  13.18
## dent_New_York              143.34  268.71  125.37  0.55    -1.14  11.21
## dent_Pennsylvania          127.12  240.08  112.95  0.53    -1.17  10.07
## dent_Illinois              124.86  259.55  134.68  0.39    -1.33  12.19
## dent_Indiana               101.34  242.89  141.55  0.30    -1.40  12.88
## dent_Michigan              148.69  288.50  139.81  0.31    -1.42  13.13
## dent_Ohio                  115.91  236.66  120.75  0.30    -1.40  11.09
## dent_Wisconsin             140.12  306.04  165.91  0.32    -1.47  15.22
## dent_Iowa                  115.64  233.38  117.74  0.44    -1.30  10.77
## dent_Kansas                119.67  250.92  131.25  0.22    -1.50  12.12
## dent_Minnesota             132.66  313.74  181.08  0.39    -1.32  16.20
## dent_Missouri              102.32  213.78  111.46  0.30    -1.42  10.42
## dent_Nebraska              109.17  225.83  116.66  0.17    -1.43  10.74
## dent_North_Dakota           99.06  246.22  147.16  0.18    -1.39  13.22
## dent_South_Dakota           99.22  241.07  141.85  0.44    -1.19  12.21
## dent_Alabama                97.69  217.09  119.41  0.43    -1.09   9.98
## dent_Arkansas               93.10  206.49  113.39  0.23    -1.37  10.07
## dent_Florida               132.63  231.28   98.64  0.12    -1.33   8.48
## dent_Georgia               115.22  240.96  125.74  0.36    -1.40  11.49
## dent_Kentucky               87.92  186.96   99.04  0.38    -1.32   9.05
## dent_Louisiana              89.71  180.16   90.45 -0.25    -1.53   8.37
## dent_Mississippi            72.75  171.36   98.61  0.28    -1.33   8.58
## dent_North_Carolina        103.31  240.34  137.03  0.32    -1.43  12.80
## dent_South_Carolina        100.36  220.24  119.88  0.33    -1.53  11.76
## dent_Tennessee             102.38  221.43  119.05  0.33    -1.31  10.40
## dent_Virginia              123.81  256.72  132.91  0.47    -1.38  12.48
## dent_West_Virginia          80.68  191.86  111.18  0.33    -1.12   9.32
## dent_Arizona               123.56  237.84  114.28  0.54    -1.26  10.41
## dent_New_Mexico             95.52  217.31  121.78  0.39    -1.34  11.10
## dent_Oklahoma              101.23  225.26  124.02  0.43    -1.26  10.85
## dent_Texas                  99.68  204.39  104.72  0.04    -1.77  10.68
## dent_Colorado              151.41  308.31  156.89  0.34    -1.39  14.50
## dent_Idaho                 136.55  314.43  177.88  0.35    -1.27  15.89
## dent_Montana               116.02  252.35  136.33  0.30    -1.49  12.77
## dent_Utah                  128.18  268.96  140.77  0.14    -1.55  13.30
## dent_Wyoming               118.97  247.64  128.68  0.29    -1.38  11.92
## dent_Alaska                178.93  358.57  179.64  0.22    -1.27  15.51
## dent_California            172.01  319.96  147.95  0.38    -1.11  12.52
## dent_Hawaii                167.56  293.60  126.04  0.33    -0.91  10.15
## dent_Nevada                130.11  276.64  146.53  0.34    -1.41  13.45
## dent_Oregon                174.27  337.42  163.15  0.09    -1.48  15.43
## dent_Washington            194.74  390.08  195.34  0.24    -1.36  17.45
## home_Connecticut            90.39  210.94  120.55 -1.02    -0.73  11.84
## home_Maine                  59.53  169.94  110.41 -0.70    -0.84   9.44
## home_Massachusetts          98.27  241.07  142.79 -0.88    -0.56  11.91
## home_New_Hampshire          48.52  135.85   87.33 -0.79    -1.18   9.00
## home_Rhode_Island           63.32  125.85   62.53 -0.96     0.19   4.85
## home_Vermont                63.62  162.84   99.22 -0.33    -0.94   7.82
## home_Delaware               49.37  156.35  106.98 -0.43    -0.93   8.82
## home_District_of_Columbia   54.84  133.81   78.97 -0.74    -0.59   6.44
## home_Maryland               51.45  100.82   49.37 -1.01    -0.41   4.26
## home_New_Jersey             66.42  156.43   90.01 -0.80    -0.75   7.66
## home_New_York              167.44  292.01  124.56 -0.67    -0.94  10.32
## home_Pennsylvania           51.44  119.25   67.81 -0.88    -0.83   6.23
## home_Illinois               49.20  104.38   55.18 -1.07     0.17   4.24
## home_Indiana                33.59   93.76   60.17 -0.64    -0.40   4.68
## home_Michigan               49.95  128.29   78.34 -0.80    -0.62   6.53
## home_Ohio                   44.35  136.68   92.33 -0.79    -1.11   8.70
## home_Wisconsin              47.03   94.43   47.39 -0.64    -1.16   4.16
## home_Iowa                   35.13  117.24   82.11 -0.42    -1.34   7.48
## home_Kansas                 34.44  105.92   71.48 -0.54    -0.65   5.64
## home_Minnesota              47.43  137.15   89.73 -0.42    -0.53   6.59
## home_Missouri               46.12  132.27   86.15 -0.79    -0.96   7.80
## home_Nebraska               28.52   65.00   36.47 -0.17    -0.95   2.86
## home_North_Dakota           19.24   37.10   17.86 -0.64    -0.86   1.48
## home_South_Dakota            8.91   26.75   17.84 -0.81    -0.68   1.54
## home_Alabama                61.77  150.72   88.95 -0.20    -0.80   7.15
## home_Arkansas               40.74  120.00   79.27 -0.72    -1.10   7.52
## home_Florida                87.97  189.59  101.62 -1.04     0.11   7.96
## home_Georgia                64.02  139.34   75.32  0.10    -1.50   6.65
## home_Kentucky               53.65  144.99   91.33 -0.79    -1.05   8.80
## home_Louisiana              45.72  210.11  164.39  0.31    -0.95  13.53
## home_Mississippi            59.88  167.20  107.32  0.38    -0.95   8.98
## home_North_Carolina         54.29  147.11   92.82 -0.86    -0.83   8.48
## home_South_Carolina         42.74  131.67   88.93 -0.65    -0.80   7.63
## home_Tennessee              97.18  184.18   87.00  0.44    -1.58   9.07
## home_Virginia               37.87   85.86   47.98 -0.93    -0.70   4.30
## home_West_Virginia          48.62  155.54  106.92 -0.33    -0.64   8.30
## home_Arizona                39.38   97.54   58.16 -0.79    -0.84   5.26
## home_New_Mexico             28.93  340.33  311.40  1.15     0.28  24.90
## home_Oklahoma               40.81  198.16  157.35  0.10    -1.08  13.00
## home_Texas                  54.52  198.27  143.75 -0.17    -0.97  11.38
## home_Colorado               37.40   97.27   59.88 -0.75    -0.79   5.04
## home_Idaho                  27.44   86.67   59.24 -0.59    -0.89   5.17
## home_Montana                43.25  103.05   59.80 -0.67    -1.01   5.28
## home_Utah                   26.80   94.78   67.98 -0.38    -1.14   5.72
## home_Wyoming                21.95   71.35   49.39 -0.47    -0.87   4.24
## home_Alaska                  6.76   59.70   52.94  1.13     0.84   3.85
## home_California             38.02  138.37  100.35  0.41    -0.69   7.74
## home_Hawaii                 14.44   88.76   74.32 -0.26    -1.53   7.26
## home_Nevada                 42.81  132.19   89.37  0.10    -1.33   7.82
## home_Oregon                 31.96   65.50   33.54 -0.59    -0.62   2.65
## home_Washington             45.94   81.30   35.35 -0.80    -0.43   3.02
## pres_Connecticut           286.75  890.39  603.64  0.60    -1.10  55.73
## pres_Maine                 231.56  756.69  525.13  0.61    -1.04  48.34
## pres_Massachusetts         261.07  791.17  530.10  0.54    -1.30  50.37
## pres_New_Hampshire         280.04  709.88  429.84  0.56    -1.22  40.74
## pres_Rhode_Island          258.05  926.63  668.58  0.54    -1.19  60.65
## pres_Vermont               237.78  671.15  433.37  0.55    -1.32  42.91
## pres_Delaware              306.37  871.36  565.00  0.52    -1.41  57.36
## pres_District_of_Columbia  253.65  590.76  337.11  0.51    -1.24  31.02
## pres_Maryland              277.81  816.30  538.50  0.68    -1.10  50.93
## pres_New_Jersey            298.70  903.12  604.41  0.44    -1.41  57.59
## pres_New_York              267.16  855.87  588.71  0.59    -1.15  54.70
## pres_Pennsylvania          300.80  875.52  574.72  0.50    -1.32  55.45
## pres_Illinois              249.01  665.40  416.39  0.37    -1.49  40.46
## pres_Indiana               276.20  762.09  485.89  0.62    -1.17  45.53
## pres_Michigan              273.20  744.23  471.03  0.54    -1.22  43.11
## pres_Ohio                  260.21  777.16  516.95  0.51    -1.25  48.99
## pres_Wisconsin             236.28  677.49  441.21  0.35    -1.58  43.47
## pres_Iowa                  255.55  698.46  442.91  0.73    -0.95  40.80
## pres_Kansas                262.72  694.72  431.99  0.67    -1.20  42.89
## pres_Minnesota             228.80  689.66  460.87  0.46    -1.43  44.93
## pres_Missouri              260.13  793.12  532.99  0.66    -1.25  52.59
## pres_Nebraska              260.19  704.93  444.73  0.46    -1.45  43.50
## pres_North_Dakota          230.70  816.49  585.79  0.65    -1.17  55.30
## pres_South_Dakota          224.84  620.55  395.71  0.71    -0.96  36.42
## pres_Alabama               295.97  848.56  552.59  0.61    -1.17  52.33
## pres_Arkansas              260.26  673.06  412.80  0.61    -1.12  39.12
## pres_Florida               282.65  825.75  543.09  0.24    -1.70  55.81
## pres_Georgia               279.19  678.83  399.64  0.59    -1.19  37.81
## pres_Kentucky              278.14  846.78  568.64  0.61    -1.31  57.17
## pres_Louisiana             282.86  741.28  458.42  0.55    -1.35  45.02
## pres_Mississippi           262.19  709.24  447.05  0.62    -1.22  43.13
## pres_North_Carolina        266.02  808.30  542.28  0.67    -1.20  52.39
## pres_South_Carolina        249.73  753.99  504.26  0.58    -1.28  48.66
## pres_Tennessee             298.28  940.78  642.50  0.78    -0.90  59.17
## pres_Virginia              263.78  686.10  422.31  0.53    -1.28  40.57
## pres_West_Virginia         310.52  843.70  533.18  0.71    -0.94  48.91
## pres_Arizona               267.83  608.04  340.20  0.46    -1.46  32.82
## pres_New_Mexico            247.93  573.38  325.45  0.57    -1.36  31.88
## pres_Oklahoma              271.71  649.73  378.03  0.58    -1.34  37.94
## pres_Texas                 266.63  603.06  336.44  0.47    -1.43  32.70
## pres_Colorado              247.41  513.63  266.22  0.38    -1.59  26.88
## pres_Idaho                 229.54  576.27  346.73  0.81    -0.80  32.37
## pres_Montana               263.60  548.51  284.91  0.52    -1.34  27.76
## pres_Utah                  237.70  650.84  413.13  0.60    -1.18  39.75
## pres_Wyoming               235.21  568.86  333.65  0.53    -1.28  32.57
## pres_Alaska                252.41  602.16  349.76  0.55    -1.26  33.83
## pres_California            250.68  573.49  322.81  0.82    -0.85  30.63
## pres_Hawaii                312.87  660.87  348.00  0.90    -0.59  31.56
## pres_Nevada                285.69  770.15  484.47  0.49    -1.33  45.64
## pres_Oregon                248.66  582.39  333.73  0.43    -1.42  33.23
## pres_Washington            272.53  609.03  336.49  0.49    -1.40  32.96
## dura_Connecticut            48.20   91.83   43.63  0.00    -1.85   4.96
## dura_Maine                  41.13   74.58   33.45  0.32    -1.58   3.29
## dura_Massachusetts          50.53   94.06   43.53  0.14    -1.73   4.46
## dura_New_Hampshire          44.44  105.22   60.78 -0.02    -1.76   5.97
## dura_Rhode_Island           37.03   68.73   31.70  0.29    -1.70   3.29
## dura_Vermont                40.35   74.36   34.01  0.17    -1.78   3.66
## dura_Delaware               71.02  144.95   73.93 -0.15    -1.81   7.92
## dura_District_of_Columbia   55.20  101.78   46.58 -0.23    -1.79   4.92
## dura_Maryland               46.27   89.53   43.27  0.18    -1.72   4.54
## dura_New_Jersey             54.41  125.61   71.21  0.22    -1.75   7.46
## dura_New_York               39.01   81.96   42.95  0.01    -1.72   4.33
## dura_Pennsylvania           49.28   95.93   46.65  0.18    -1.74   4.93
## dura_Illinois               40.52   76.14   35.62  0.10    -1.75   3.74
## dura_Indiana                59.77  106.13   46.36  0.09    -1.80   4.97
## dura_Michigan               71.17  131.56   60.39  0.04    -1.79   6.24
## dura_Ohio                   46.99   91.84   44.84  0.30    -1.61   4.32
## dura_Wisconsin              48.61   76.45   27.84  0.06    -1.73   2.73
## dura_Iowa                   60.07   99.69   39.61  0.31    -1.73   4.26
## dura_Kansas                 43.60   86.55   42.95  0.12    -1.75   4.51
## dura_Minnesota              60.15  102.06   41.91 -0.33    -1.67   4.27
## dura_Missouri               36.82   74.23   37.41 -0.03    -1.73   3.88
## dura_Nebraska               71.09  121.63   50.54  0.18    -1.75   5.28
## dura_North_Dakota           49.84  102.06   52.22 -0.17    -1.76   5.51
## dura_South_Dakota           48.34   81.04   32.69 -0.36    -1.71   3.46
## dura_Alabama                49.28  100.58   51.30  0.43    -1.62   5.47
## dura_Arkansas               35.71   75.22   39.52  0.48    -1.58   4.14
## dura_Florida                98.72  170.69   71.97  0.11    -1.62   6.80
## dura_Georgia                55.51   95.54   40.03  0.11    -1.76   4.20
## dura_Kentucky               51.01   94.44   43.43  0.42    -1.61   4.51
## dura_Louisiana              42.85   76.04   33.18  0.35    -1.71   3.48
## dura_Mississippi            42.54   99.73   57.19  0.08    -1.74   5.76
## dura_North_Carolina         52.91   91.41   38.50 -0.25    -1.81   4.26
## dura_South_Carolina         49.93  103.84   53.91  0.23    -1.63   5.28
## dura_Tennessee              43.68   93.07   49.39  0.35    -1.56   4.87
## dura_Virginia               45.88   94.37   48.50  0.08    -1.78   5.02
## dura_West_Virginia          61.48  113.57   52.09  0.34    -1.75   5.64
## dura_Arizona                74.27  112.88   38.61  0.37    -1.50   3.77
## dura_New_Mexico             67.85  135.16   67.31  0.08    -1.81   7.39
## dura_Oklahoma               47.62   87.54   39.92 -0.10    -1.77   4.11
## dura_Texas                  52.09   89.58   37.49  0.14    -1.75   3.88
## dura_Colorado               74.79  118.79   44.00  0.24    -1.83   4.98
## dura_Idaho                  62.64  101.57   38.93  0.14    -1.61   3.63
## dura_Montana                54.73  121.39   66.66  0.31    -1.66   7.00
## dura_Utah                   70.92  108.31   37.38  0.10    -1.85   3.98
## dura_Wyoming                49.53   99.10   49.56 -0.32    -1.76   5.36
## dura_Alaska                 49.70   91.05   41.35  0.12    -1.70   4.24
## dura_California             35.44   63.88   28.44  0.04    -1.71   2.81
## dura_Hawaii                 50.89  110.95   60.06 -0.28    -1.75   6.49
## dura_Nevada                 51.15  114.38   63.23  0.06    -1.59   5.88
## dura_Oregon                 41.79   84.83   43.04  0.38    -1.64   4.50
## dura_Washington             56.96  100.43   43.47  0.40    -1.64   4.59
## nurs_Connecticut           422.55  722.50  299.96 -0.12    -1.55  28.48
## nurs_Maine                 289.95  429.58  139.63  0.27    -1.25  11.93
## nurs_Massachusetts         375.19  598.90  223.71 -0.03    -1.53  20.96
## nurs_New_Hampshire         203.60  406.43  202.82 -0.38    -1.26  17.56
## nurs_Rhode_Island          305.91  565.43  259.52  0.12    -1.29  21.66
## nurs_Vermont               220.99  379.73  158.74  0.13    -1.39  14.63
## nurs_Delaware              201.50  384.85  183.35  0.19    -1.63  18.79
## nurs_District_of_Columbia  333.15  557.57  224.42  0.20    -1.31  19.33
## nurs_Maryland              185.39  402.37  216.98  0.17    -1.39  19.26
## nurs_New_Jersey            219.25  412.70  193.44 -0.15    -1.47  17.26
## nurs_New_York              284.43  531.89  247.45  0.18    -1.59  23.43
## nurs_Pennsylvania          250.15  554.27  304.12  0.08    -1.52  27.74
## nurs_Illinois              209.98  336.06  126.08  0.08    -1.63  12.12
## nurs_Indiana               265.56  406.65  141.10  0.24    -1.20  11.77
## nurs_Michigan              165.93  307.16  141.24  0.18    -1.44  12.71
## nurs_Ohio                  268.78  506.92  238.13  0.13    -1.56  22.14
## nurs_Wisconsin             260.61  405.89  145.28 -0.18    -1.46  13.11
## nurs_Iowa                  270.20  462.57  192.38  0.16    -1.61  18.35
## nurs_Kansas                235.97  384.10  148.13  0.07    -1.60  14.19
## nurs_Minnesota             339.28  440.10  100.83  0.53    -0.90   8.11
## nurs_Missouri              224.47  390.34  165.87 -0.24    -1.66  16.34
## nurs_Nebraska              222.88  458.06  235.19 -0.12    -1.48  21.64
## nurs_North_Dakota          304.91  508.73  203.82  0.57    -1.24  19.37
## nurs_South_Dakota          233.03  486.20  253.17  0.14    -1.33  22.06
## nurs_Alabama               131.34  307.12  175.78 -0.03    -1.61  16.52
## nurs_Arkansas              170.66  337.34  166.68 -0.05    -1.49  14.99
## nurs_Florida               182.01  346.98  164.97 -0.31    -1.43  14.74
## nurs_Georgia               128.04  223.45   95.40 -0.23    -1.55   8.94
## nurs_Kentucky              177.04  342.59  165.55 -0.29    -1.51  14.97
## nurs_Louisiana             164.03  273.34  109.31  0.68    -0.65   8.57
## nurs_Mississippi           131.52  286.18  154.66  0.22    -1.42  13.56
## nurs_North_Carolina        153.69  338.27  184.57 -0.08    -1.34  15.88
## nurs_South_Carolina        112.17  263.14  150.97  0.10    -1.55  13.92
## nurs_Tennessee             158.36  320.12  161.77 -0.55    -1.49  16.07
## nurs_Virginia              135.78  290.41  154.63 -0.02    -1.71  15.46
## nurs_West_Virginia         188.10  358.73  170.63  0.00    -1.51  15.30
## nurs_Arizona               124.37  176.57   52.20 -0.86    -1.06   5.12
## nurs_New_Mexico            109.09  184.96   75.87  0.61    -1.20   7.25
## nurs_Oklahoma              181.35  289.38  108.03  0.06    -1.43   9.91
## nurs_Texas                 128.91  209.87   80.96 -0.18    -1.51   7.30
## nurs_Colorado              153.11  243.82   90.71 -0.13    -1.47   8.05
## nurs_Idaho                 139.81  223.03   83.21  0.24    -1.24   6.88
## nurs_Montana               182.18  327.89  145.71  0.08    -1.16  12.26
## nurs_Utah                  100.01  146.16   46.15  0.31    -1.32   4.04
## nurs_Wyoming               142.54  272.79  130.24  0.05    -0.82  10.25
## nurs_Alaska                 69.30  150.91   81.61  0.74    -1.16   7.98
## nurs_California            118.06  213.43   95.37  0.11    -1.55   8.77
## nurs_Hawaii                128.89  222.60   93.71  0.88    -0.65   8.66
## nurs_Nevada                 80.66  138.91   58.25  0.68    -1.22   5.45
## nurs_Oregon                160.99  240.43   79.43  0.04    -1.80   8.53
## nurs_Washington            183.75  288.35  104.60 -0.22    -0.90   8.12
## othe_Connecticut           204.83  432.38  227.54  0.03    -1.59  20.94
## othe_Maine                 171.57  799.63  628.06  0.51    -1.29  60.17
## othe_Massachusetts         190.66  446.85  256.19 -0.08    -1.20  22.18
## othe_New_Hampshire         107.43  265.57  158.14 -0.26    -1.57  15.54
## othe_Rhode_Island          206.65  648.57  441.92  0.24    -1.35  38.05
## othe_Vermont               156.51  554.35  397.84  0.48    -1.23  36.09
## othe_Delaware              126.35  363.47  237.11 -0.09    -1.37  20.06
## othe_District_of_Columbia  290.57  601.11  310.53 -0.13    -1.62  30.04
## othe_Maryland               80.60  241.38  160.78  0.13    -1.13  13.26
## othe_New_Jersey            111.47  277.43  165.96  0.23    -1.30  14.91
## othe_New_York              199.56  643.76  444.20  0.13    -1.36  38.46
## othe_Pennsylvania          141.46  439.08  297.63  0.24    -1.50  27.42
## othe_Illinois              105.62  279.44  173.82  0.17    -1.40  15.85
## othe_Indiana               108.13  264.49  156.36  0.88    -0.46  12.86
## othe_Michigan               98.20  188.85   90.65 -0.22    -1.67   8.87
## othe_Ohio                  105.96  326.66  220.70  0.65    -0.98  19.10
## othe_Wisconsin             131.35  295.92  164.57  0.36    -1.56  16.57
## othe_Iowa                  120.48  323.87  203.38  0.08    -1.48  18.73
## othe_Kansas                 96.73  331.06  234.33  0.06    -1.80  24.86
## othe_Minnesota             178.65  561.42  382.77  0.71    -0.57  31.27
## othe_Missouri               87.75  264.18  176.43 -0.03    -1.38  16.21
## othe_Nebraska               84.52  270.98  186.46  0.39    -1.50  18.76
## othe_North_Dakota          180.29  417.03  236.74  0.33    -1.48  22.28
## othe_South_Dakota          129.28  295.85  166.56  0.09    -1.26  14.64
## othe_Alabama                86.33  217.44  131.11  0.25    -1.42  11.70
## othe_Arkansas               88.27  206.01  117.74 -0.27    -1.59  12.03
## othe_Florida                78.10  213.47  135.38  0.17    -1.27  11.91
## othe_Georgia                80.34  192.99  112.65  0.02    -1.31  10.17
## othe_Kentucky               68.94  216.09  147.15  0.31    -1.62  14.77
## othe_Louisiana             145.07  286.22  141.15  0.02    -0.92  10.81
## othe_Mississippi            63.00  250.86  187.86  0.39    -1.40  17.96
## othe_North_Carolina         90.30  245.84  155.53 -0.09    -1.56  14.73
## othe_South_Carolina        105.41  266.95  161.55  0.04    -1.62  15.95
## othe_Tennessee              68.84  223.21  154.37 -0.10    -1.46  14.69
## othe_Virginia               71.21  170.38   99.18  0.16    -1.56   9.60
## othe_West_Virginia          95.19  415.73  320.54 -0.02    -1.03  26.04
## othe_Arizona                86.92  155.55   68.63  0.31    -1.03   5.64
## othe_New_Mexico             96.91  285.54  188.63  0.34    -1.14  16.62
## othe_Oklahoma               94.45  262.86  168.41  0.17    -1.56  15.90
## othe_Texas                  90.57  222.24  131.67  0.06    -1.51  12.23
## othe_Colorado              117.11  272.75  155.64  0.74    -0.33  12.46
## othe_Idaho                  83.90  239.77  155.87  0.46    -1.53  16.32
## othe_Montana               105.73  272.00  166.26  0.56    -1.30  15.31
## othe_Utah                   93.06  220.85  127.79  0.65    -1.20  11.99
## othe_Wyoming                66.45  325.47  259.03  0.09    -1.25  22.05
## othe_Alaska                127.76  510.81  383.05  0.73    -0.96  35.15
## othe_California             71.82  178.89  107.07  0.33    -1.32   9.78
## othe_Hawaii                 69.80  206.38  136.58  0.55    -0.97  11.83
## othe_Nevada                 61.94  139.69   77.75  0.41    -1.34   7.23
## othe_Oregon                145.08  361.47  216.39  0.29    -1.45  19.96
## othe_Washington            105.86  213.31  107.45  0.19    -1.83  11.68

Make all the variables of interest into time series.

z=matrix(rep(0,51*13), nrow=13)  #initialize a matrix with 13 rows, 1 for each yearly observation

for (i in 1:51){                 #populate the matrix
  myts=ts(mydata[,i+1], frequency=1)
  z[,i]=myts
  }

z=as.ts(z)                       #define it as a time series.

Build the first models. Let’s do automatic ETS fitting, and submit ETS only.

myets=list()   #I set up a list to store all the results
myetsf=list()  #I set up a list for storing forecasts
forecasts=matrix(rep(0,6*51), nrow=51)  #create a matrix for storing the forecasts

for (i in 1:51){   
  myname=paste('state', i, sep="")
  tmp=ets(z[,i])                      
  myets[[myname]]=tmp                 
  myetsf[[myname]]=forecast(tmp,h=6)
  forecasts[i,1:6]=forecast(tmp,h=6)$mean
}

colnames(forecasts)=c("Y2004","Y2005","Y2006","Y2007","Y2008","Y2009")
write.csv(forecasts, "D:/hcexp/ets.csv")   #output the forecasts for upload

#looking at the forecasts
par(mfrow=c(3,3))
for (i in 1:51){
  myname=paste('state', i, sep="")
  plot(myetsf[[myname]], main=myname)
}

##Next, let’s fit ARIMA models (automatically). We will submit these, too!

myarima=list()   #I set up a list to store all the results
myarimaf=list()  #I set up a list for storing forecasts
forecasts2=matrix(rep(0,6*51), nrow=51)  #create a matrix for storing the forecasts

for (i in 1:51){   
  myname=paste('state', i, sep="")
  tmp=auto.arima(z[,i])                      
  myarima[[myname]]=tmp                 
  myarimaf[[myname]]=forecast(tmp,h=6)
  forecasts2[i,1:6]=forecast(tmp,h=6)$mean
}

colnames(forecasts2)=c("Y2004","Y2005","Y2006","Y2007","Y2008","Y2009")
write.csv(forecasts2, "D:/hcexp/arima.csv")   #output the forecasts for upload

par(mfrow=c(3,3))
for (i in 1:51){
  myname=paste('state', i, sep="")
  plot(myarimaf[[myname]], main=myname)
}

Finally, for my third trick, I will combine the means of the two separate models, ensembling them. This will be my third and final model (called an ensemble model).

myensemble=matrix(rep(0,6*51), nrow=51)

for (i in 1:51){
  for (j in 1:6){
    myensemble[i,j]=mean(forecasts[i,j], forecasts2[i,j])
  }
    
}

colnames(myensemble)=c("Y2004","Y2005","Y2006","Y2007","Y2008","Y2009")
write.csv(myensemble, "D:/hcexp/ensemble.csv")   #output the forecasts for upload

And for giggles, let’s do a neural net!

mynn=list()   #I set up a list to store all the results
mynnf=list()  #I set up a list for storing forecasts
forecasts3=matrix(rep(0,6*51), nrow=51)  #create a matrix for storing the forecasts

for (i in 1:51){   
  myname=paste('state', i, sep="")
  tmp=nnetar(z[,i],size=1,p=1, repeats=500, lambda=0, scale.inputs=TRUE)                      
  mynn[[myname]]=tmp                 
  mynnf[[myname]]=forecast(tmp,h=6)
  forecasts3[i,1:6]=forecast(tmp,h=6)$mean
}

colnames(forecasts3)=c("Y2004","Y2005","Y2006","Y2007","Y2008","Y2009")
write.csv(forecasts3, "D:/hcexp/mynn.csv")   #output the forecasts for upload