pdf("cntygrow.pdf") cntygrow <- matrix(c( 1,74.206,80.173,92.778,113.913,131.97,139.42,139.51, 2,12.401,13.064,13.115,14.485,16.859,21.354,29.721, 3,98.633,94.067,96.826,90.581,86.915,87.888,83.083, 4,54.455,59.653,67.587,72.465,80.468,91.056,97.904, 5,18.01,20.657,22.133,22.804,24.599,28.439,30.488, 6,325.691,398.564,614.799,951.527,1327.695,1556.419,1852.81, 7,9.528,10.484,12.1,15.826,20.682,34.638,51.372, 8,43.246,46.315,82.233,113.662,138.177,144.903,171.439, 9,162.311,168.824,189.468,248.449,333.314,405.437,435.276, 10,124.67,150.203,176.547,223.859,230.184,252.437,248.253, 11,27.563,32.023,38.007,66.377,105.248,146.183,171.38, 12,11.415,11.328,11.891,14.039,17.387,24.496,31.76, 13,72.077,73.115,71.672,68.437,63.439,61.389,50.871, 14,64.623,66.317,72.903,117.348,186.54,196.966,238.912, 15,16.936,17.606,18.155,21.358,28.331,37.046,47.915, 16,19.722,26.504,59.407,60.032,60.3,67.346,68.25, 17,60.095,89.49,194.182,357.395,661.719,665.071,723.373, 18,65.455,73.37,90.648,111.351,118.078,135.282,131.556, 19,90.936,95.647,111.661,131.44,157.115,150.236,147.548, 20,77.442,107.152,149.264,168.403,188.322,245.738,311.921, 21,35.904,32.013,31.001,38.395,38.658,44.782,50.58, 22,39.79,39.598,46.214,54.635,62.864,65.15,69.166, 23,30.776,44.387,75.724,84.176,101.732,147.152,189.731, 24,15.924,15.119,15.857,17.619,23.724,36.309,58.741, 25,117.009,136.58,168.152,209.776,240.774,287.895,320.167), byrow=T,ncol=8) x1 <- matrix(seq(-3,3,1),ncol=1) x0 <- matrix(rep(1,7),ncol=1) x2 <- x1^2 x <- cbind(x0,x1,x2) y <- t(cntygrow[,2:8]) x y beta <- solve(t(x) %*% x) %*% t(x) %*% y beta dev.off()