{"id":199,"date":"2012-07-25T04:21:12","date_gmt":"2012-07-25T01:21:12","guid":{"rendered":"http:\/\/ekqvist.goeuropeinfo.com\/rbloggerqvist\/?p=199"},"modified":"2012-07-25T04:21:12","modified_gmt":"2012-07-25T01:21:12","slug":"linear-programming-for-the-malmquist-productivity-growth-index","status":"publish","type":"post","link":"https:\/\/science.ekqvist.fi\/blogi\/dea\/linear-programming-for-the-malmquist-productivity-growth-index\/","title":{"rendered":"Linear Programming for the Malmquist Productivity Growth Index"},"content":{"rendered":"<h1>Data Envelopment Analysis<\/h1>\n<p>Within couple of days I have been testing DEA modelling (Data Envelopment Analysis) with different R-package. Finally,&#8230;. I have found such a comprehensive way to calculate Malmquist indices.<\/p>\n<figure id=\"attachment_200\" aria-describedby=\"caption-attachment-200\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-200\" title=\"Productivity 1991_2009_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-200\" class=\"wp-caption-text\">Chart 1<\/figcaption><\/figure>\n<p>My primary purpose is to show how to use nonparametric methods for measuring efficiency and productivity by using R-programs <em>nonparaeff<\/em> -package.<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/productivity_1991_2002.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-245\" title=\"productivity_1991_2002\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/productivity_1991_2002.jpg\" alt=\"\" width=\"448\" height=\"252\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/productivity_1991_2002.jpg 798w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/productivity_1991_2002-300x169.jpg 300w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/productivity_1991_2002-768x433.jpg 768w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/productivity_1991_2002-795x448.jpg 795w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/a><\/p>\n<p>At this same time I will show you how to present Malmquist indices within<em> googleVis<\/em> -world map and finally I will introduse how to make forecast chart for productivity (Chart 1), effectiveness and technical effectiveness indices. In this work I used R-program forecast -library.<\/p>\n<p>Used R-library documentation:<br \/>\n<a href=\"http:\/\/cran.r-project.org\/web\/packages\/nonparaeff\/nonparaeff.pdf\">nonparaeff<\/a><br \/>\n<a href=\" http:\/\/cran.r-project.org\/web\/packages\/googleVis\/googleVis.pdf\">googleVis<\/a><br \/>\n<a href=\" http:\/\/cran.r-project.org\/web\/packages\/forecast\/forecast.pdf\">forecast<\/a><\/p>\n<p>First of all I would like to thank Author Dong-hyun Oh for nice work with this nonparaeff-package.<\/p>\n<p>In this working paper I will use example of <em>faremalm2<\/em>. Like nonpraeff -package documentation we calculate Malmquist productivity growth index of OECD countries<br \/>\n(productivity, technical efficiency and efficiency). As data source we have used Penn World Table (like original sources) with following version:<br \/>\nOECD Timeseries 1980-1990\u00a0 version pwt5.6<br \/>\nOECD Timeseries 1990-2009\u00a0 version pwt7.0<br \/>\nIn pwt7.0 I cannot find capital stock data, so I downloaded it from here (<a href=\"http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap\" target=\"_blank\">http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap<\/a>)<\/p>\n<p>Productivity calculation 1980-1990 As output variables is used\u00a0 Total GDP of a country. This variables\u00a0 is calculated using GDP per capita (rgdpl)<br \/>\nand amount of total population (pop). As input variables is used Total labor force (gdp\/rgdpwok) and Total capital stock\u00a0 (kapw * labor)<\/p>\n<p>In second productivity computing calculation 1990-2009 I only use one input and one output variables (labor and gdp). This is because there is no<br \/>\ncapital stock data available in pwt7.0 (please correct this If I missed something). I will re-calculate this period asap when I get capital data from all countries.<\/p>\n<p>In third productivity computing 1992-2002 I use pwt7.0 and get capital stock data from different OECD datasource<br \/>\n(<a href=\"http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap\" target=\"_blank\">http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap<\/a>). As input I used labor and capital variables and as output variables gdp.<\/p>\n<p>When use <em>faremalm2<\/em> function you will get the following outputs:<br \/>\npc.c &#8211;&gt; Productivity growth for each country<br \/>\npc.y\u00a0 &#8211;&gt; A trend of productivity growth of SELECTED countries (in this work we use OECD)<\/p>\n<p>tc.c &#8211;&gt; Technical efficiency\u00a0 for each country<br \/>\ntc.y &#8211;&gt; A trend of technical efficiency growth of SELECTED countries<\/p>\n<p>ec.c &#8211;&gt; Efficiency change for each country<br \/>\nec.y &#8211;&gt; A trend of efficiency change of SELECTED countries<\/p>\n<h2>Useage of faremalm2<\/h2>\n<p>faremalm2(dat = NULL, noutput = 1, id = &#8220;id&#8221;, year = &#8220;year&#8221;)<br \/>\ndat &#8211;&gt; The format of this data frame is data.frame(id, year, outputs, inputs).<br \/>\nnoutput &#8211;&gt; number of outputs<br \/>\nid &#8211;&gt; column name for DMU:s<br \/>\nyear &#8211;&gt; column name for the time index<\/p>\n<p><code>## Malmquist productivity growth index of OECD countries<br \/>\n#First install data from OECD<br \/>\ninstall.packages(\"pwt\")\u00a0 # (installing a package can take a couple of minutes)<br \/>\n<\/code><\/p>\n<p><code>#Setting the library into use<br \/>\nlibrary(pwt) ## Use Penn World Table<br \/>\nlibrary(nonparaeff) # DEA modelling<br \/>\n<\/code><\/p>\n<p>More information about pwt data you can find there (http:\/\/pwt.econ.upenn.edu\/php_site\/pwt_index.php)<\/p>\n<p><code>#my.dat &lt;- pwt5.6\u00a0 #used in 1980-1990<br \/>\n#my.dat &lt;- pwt6.3\u00a0 #<br \/>\nmy.dat &lt;- pwt7.0\u00a0 #used in 1990-2009 and 1992-2002<br \/>\n#head(my.dat)<br \/>\nsummary(my.dat)<br \/>\n#my.dat$country<br \/>\n<\/code><\/p>\n<p><code>#capital stock data missing so we get it from there<br \/>\n# http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap<br \/>\n#picking up OECD countries<br \/>\nmy.oecd.ctry &lt;- c(\"AUS\", \"AUT\", \"BEL\", \"CAN\", \"CHE\", \"DNK\", \"ESP\", \"FIN\", \"FRA\", \"GBR\", \"GER\", \"GRC\", \"IRL\", \"ISL\", \"ITA\", \"JPN\", \"KOR\", \"LUX\", \"MEX\", \"NLD\", \"NOR\", \"NZL\", \"PRT\", \"SWE\", \"TUR\", \"USA\", \"DEU\")<br \/>\n<\/code><br \/>\n<code>#NOTE WPCODE USED IN OLDER DATASET<br \/>\n#adding country code<br \/>\n#my.dat &lt;- my.dat[my.dat$wbcode %in% my.oecd.ctry,]\u00a0 #use this with pwt5.6<br \/>\nmy.dat &lt;- my.dat[my.dat$isocode %in% my.oecd.ctry,] #use this with pwt7.0<br \/>\nsummary(my.dat)<\/code><\/p>\n<p><code>#selecting appropriate years<br \/>\n#my.dat &lt;- my.dat[my.dat$year %in% 1980:1990,]<br \/>\n#my.dat &lt;- my.dat[my.dat$year %in% 1950:1992,]<br \/>\nmy.dat &lt;- my.dat[my.dat$year %in% 1990:2009,]<br \/>\n#my.dat &lt;- my.dat[my.dat$year %in% 1992:2002,]<br \/>\nsummary(my.dat)<br \/>\nmy.dat<\/code><\/p>\n<p>Note! I encounter problem (NA or other reason) thats why I do this out of box. my.dat is transformed into data.frame and after<br \/>\nthat modified with Excel. This is only used in timeseries 1992-2002 productivity calculation.<\/p>\n<p><code>#uploading my.dat<br \/>\n#my.dat_df &lt;- as.data.frame(my.dat)<br \/>\n#out<br \/>\n#write.table(my.dat_df, file = \"c:\/data\/my.dat_df.txt\", sep = \"\\t\", col.names = NA, qmethod = \"double\")<\/code><\/p>\n<p>Capital stock data inserted in this phase. source:<a href=\" http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap\"> http:\/\/www.ifw-kiel.de\/forschung\/datenbanken\/netcap<\/a><\/p>\n<pre>#...and in both source\n my.dat\u00a0 &lt;- read.table(\"...\/mydat1990_2009.csv\",\u00a0 header=TRUE, \nsep=\";\", na.strings=\"NA\", dec=\",\", strip.white=TRUE)\nmy.dat &lt;- read.table(\"http:\/\/ekqvist.goeuropeinfo.com\/rbloggerqvist\/\ndata\/oecd\/mydat1990_2009.csv\", header=TRUE, sep=\";\", na.strings=\"NA\", \ndec=\",\", strip.white=TRUE)<\/pre>\n<p><code>#INSERTING some variables\u00a0 to my.dat (ie. INPUT and OUTPUT -variables calculation)<br \/>\nmy.dat$rgdpl &lt;- as.numeric(my.dat$rgdpl) ## GDP per capita<br \/>\nmy.dat$pop &lt;- as.numeric(my.dat$pop) ## total population (1000)<br \/>\nmy.dat$rgdpwok &lt;- as.numeric(my.dat$rgdpwok) ## GDP per labor<\/code><\/p>\n<p><code>my.dat$gdp &lt;- my.dat$rgdpl * my.dat$pop ## Total GDP of a country<br \/>\nmy.dat$labor &lt;- with(my.dat, gdp\/rgdpwok) ## Total labor force<\/code><\/p>\n<pre>my.dat$capital &lt;- with(my.dat, kapw * labor) ## Total capital stock\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MISSING pwt7 note: this is used in pwt5.6\n #my.dat$capital &lt;- as.numeric(my.dat$capital)\u00a0 \n## Total capital stock\u00a0 ADDED FROM DIFF. SOURCE now used in time \nseries 1993-2002<\/pre>\n<pre>my.dat$kapw &lt;- as.numeric(my.dat$kapw) ## Capital stock per labor\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MISSING pwt7 note: this is used in pwt5.6\n #my.dat$kapw &lt;- with(my.dat, my.dat$capital\/my.dat$labor) ## \nCapital stock per labor now used in time series 1993-2002<\/pre>\n<pre>#variable used in 1990-2009 Malmquist productivity calculation<\/pre>\n<p>#1980-1990<br \/>\n#1990-2009<br \/>\n#1992-2002<\/p>\n<p><code>#these variables used in timeseries 1980-1990 and 1992-2002<br \/>\n#oecd &lt;- my.dat[, c(\"country\", \"wbcode\", \"year\", \"gdp\", \"labor\", \"capital\")] #used in time series 1980-1990<br \/>\noecd &lt;- my.dat[, c(\"country\", \"isocode\", \"year\", \"gdp\", \"labor\")] # 1990-2009<br \/>\n#oecd &lt;- my.dat[, c(\"country\", \"isocode\", \"year\", \"gdp\", \"labor\", \"capital\")] #used in time series 1992-2002<\/code><\/p>\n<p><code>summary(oecd)<br \/>\nhead(oecd)<br \/>\n<\/code><br \/>\n<code>#removing\u00a0 NA-rows<br \/>\noecd &lt;- oecd[!is.na(oecd$capital),]<br \/>\nsummary(oecd)<\/code><\/p>\n<p><code>#Now calcuatel productivity (pc), effiency (ec) and technical efficiency (tc)<br \/>\n#huom. t\u00e4m\u00e4 on tehty eri aikasarjoille ja hyv\u00e4 niin koska mahdollistaa eri aikajaksojen tarkastelun<br \/>\nlibrary(nonparaeff) # DEA modelling<br \/>\nre.oecd &lt;- faremalm2(dat = oecd, noutput = 1, id = \"isocode\", year = \"year\")<br \/>\n#re.oecd &lt;- faremalm2(dat = oecd, noutput = 1, id = \"wbcode\", year = \"year\")<\/code><\/p>\n<p><code>summary(re.oecd)<\/code><\/p>\n<p><code>######################################################<br \/>\n#ISOCODE USED IN #1990-2009 and 1992-2002<br \/>\n#note:<\/code><\/p>\n<p><code>## productivity growth for each country<br \/>\npc.c &lt;- tapply(re.oecd$pc, re.oecd$isocode, geometric.mean)<br \/>\n#pc.c &lt;- tapply(re.oecd$pc, re.oecd$wbcode, geometric.mean)<br \/>\n## a trend of productivity growth of SELECTED countries<br \/>\npc.y &lt;- tapply(re.oecd$pc, re.oecd$year, geometric.mean)<\/code><\/p>\n<p>## technical efficiency\u00a0 for each country<br \/>\ntc.c &lt;- tapply(re.oecd$tc, re.oecd$isocode, geometric.mean)<br \/>\n#tc.c &lt;- tapply(re.oecd$tc, re.oecd$wbcode, geometric.mean)<\/p>\n<p>## a trend of technical efficiency growth of SELECTED\u00a0 countries<br \/>\ntc.y &lt;- tapply(re.oecd$tc, re.oecd$year, geometric.mean)<\/p>\n<p>## efficiency change for each country<br \/>\nec.c &lt;- tapply(re.oecd$ec, re.oecd$isocode, geometric.mean)<br \/>\n#ec.c &lt;- tapply(re.oecd$ec, re.oecd$wbcode, geometric.mean)<br \/>\n## a trend of efficiency change of SELECTED\u00a0 countries<br \/>\nec.y &lt;- tapply(re.oecd$ec, re.oecd$year, geometric.mean)<br \/>\n######################################################<br \/>\npc.c<\/p>\n<p><code>#1980-1990, 1990-2009<br \/>\n#country -variable(we use it in google vis plotting)<br \/>\n## productivity growth for each country<br \/>\npc.c &lt;- tapply(re.oecd$pc, re.oecd$country, geometric.mean)<\/code><\/p>\n<p>## technical efficiency\u00a0 for each country<br \/>\ntc.c &lt;- tapply(re.oecd$tc, re.oecd$country, geometric.mean)<\/p>\n<p>## efficiency change for each country<br \/>\nec.c &lt;- tapply(re.oecd$ec, re.oecd$country, geometric.mean)<\/p>\n<p><code><br \/>\n#missing time series 1992-2002 TURKEY, KOREA, LUXEMBOURG AND MEKSIKO capital stock data<br \/>\n#VUOSITTAINEN startyear-endyear KESKIARVO TEHOKKUUSKERTOIMESSA (MALMQUIST - FARREL)<br \/>\n#ec: efficiency change\u00a0 #TEHOKKUUSMUUTOS<br \/>\nec.c_df &lt;- as.data.frame(ec.c)<br \/>\nsummary(ec.c_df)<br \/>\nec.c_df<br \/>\n#tc: technical change\u00a0 #TEKNISEN TEHOKKUUDEN MUUTOS<br \/>\ntc.c_df &lt;- as.data.frame(tc.c)<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>#pc: productivity change\u00a0 #TUOTTAVUUDEN MUUTOS<br \/>\npc.c_df &lt;- as.data.frame(pc.c)<\/p>\n<p><code>#LITTLE TRICK<br \/>\n#ec: efficiency change\u00a0 #TEHOKKUUSMUUTOS<br \/>\nwrite.table(ec.c_df, file = \"c:\/data\/ec.c_df.txt\", sep = \"\\t\", col.names = NA, qmethod = \"double\")<br \/>\nec.c_df2\u00a0 &lt;- read.table(\"c:\/data\/ec.c_df.txt\",\u00a0 header=TRUE, sep=\"\\t\", na.strings=\"NA\", dec=\".\", strip.white=TRUE)<br \/>\nnames(ec.c_df2)&lt;- c(\"Country\", \"Effiency\")<\/code><\/p>\n<p><code><br \/>\n#tc: technical change\u00a0 #TEKNISEN TEHOKKUUDEN MUUTOS<br \/>\nwrite.table(tc.c_df, file = \"c:\/data\/tc.c_df.txt\", sep = \"\\t\", col.names = NA, qmethod = \"double\")<br \/>\ntc.c_df2\u00a0 &lt;- read.table(\"c:\/data\/tc.c_df.txt\",\u00a0 header=TRUE, sep=\"\\t\", na.strings=\"NA\", dec=\".\", strip.white=TRUE)<br \/>\nnames(tc.c_df2)&lt;- c(\"Country\", \"Effiency\")<\/code><\/p>\n<p>#pc: productivity change\u00a0 #TUOTTAVUUDEN MUUTOS<br \/>\nwrite.table(pc.c_df, file = &#8220;c:\/data\/pc.c_df.txt&#8221;, sep = &#8220;\\t&#8221;, col.names = NA, qmethod = &#8220;double&#8221;)<br \/>\npc.c_df2\u00a0 &lt;- read.table(&#8220;c:\/data\/pc.c_df.txt&#8221;,\u00a0 header=TRUE, sep=&#8221;\\t&#8221;, na.strings=&#8221;NA&#8221;, dec=&#8221;.&#8221;, strip.white=TRUE)<br \/>\nnames(pc.c_df2)&lt;- c(&#8220;Country&#8221;, &#8220;Effiency&#8221;)<\/p>\n<p><code>#REMOVING NA-VALUES<br \/>\nec.c_df2 &lt;- ec.c_df2[!is.na(ec.c_df2$Effiency),]<br \/>\ntc.c_df2 &lt;- tc.c_df2[!is.na(tc.c_df2$Effiency),]<br \/>\npc.c_df2 &lt;- pc.c_df2[!is.na(pc.c_df2$Effiency),]<br \/>\nsummary(ec.c_df2)<\/code><\/p>\n<p><code>#just cecking country names<br \/>\nec.c_df2$Country<\/code><\/p>\n<p>#replace some country name with new one&#8230;<br \/>\nec.c_df3 &lt;- gsub(&#8220;United States of America&#8221;, &#8220;United States&#8221;, ec.c_df2$Country)<br \/>\nec.c_df3 &lt;- gsub(&#8220;Germany, West&#8221;, &#8220;Germany&#8221;, ec.c_df3)<br \/>\nec.c_df3 &lt;- gsub(&#8220;Korea, Republic&#8221;, &#8220;South Korea&#8221;, ec.c_df3)<\/p>\n<p>tc.c_df3 &lt;- gsub(&#8220;United States of America&#8221;, &#8220;United States&#8221;, tc.c_df2$Country)<br \/>\ntc.c_df3 &lt;- gsub(&#8220;Germany, West&#8221;, &#8220;Germany&#8221;, tc.c_df3)<br \/>\ntc.c_df3 &lt;- gsub(&#8220;Korea, Republic&#8221;, &#8220;South Korea&#8221;, tc.c_df3)<\/p>\n<p>pc.c_df3 &lt;- gsub(&#8220;United States of America&#8221;, &#8220;United States&#8221;, pc.c_df2$Country)<br \/>\npc.c_df3 &lt;- gsub(&#8220;Germany, West&#8221;, &#8220;Germany&#8221;, pc.c_df3)<br \/>\npc.c_df3 &lt;- gsub(&#8220;Korea, Republic&#8221;, &#8220;South Korea&#8221;, pc.c_df3)<\/p>\n<p>#as a dataframe MUUNNETAAN DATA FRAMEKSI<br \/>\nec.c_df3 &lt;- as.data.frame(ec.c_df3)<br \/>\ntc.c_df3 &lt;- as.data.frame(tc.c_df3)<br \/>\npc.c_df3 &lt;- as.data.frame(pc.c_df3)<\/p>\n<p>#check total number of rows KATSOTAAN RIVINUMEROINNIT MERGELLE<br \/>\nsummary(ec.c_df2)<br \/>\nnrow(ec.c_df2)<br \/>\nnrow(ec.c_df3)<\/p>\n<p>summary(tc.c_df2)<br \/>\nnrow(tc.c_df2)<br \/>\nnrow(tc.c_df3)<\/p>\n<p>summary(pc.c_df2)<br \/>\nnrow(pc.c_df2)<br \/>\nnrow(pc.c_df3)<\/p>\n<p><code>#used in time series<br \/>\n#1980-1990<br \/>\n#1990-2009<br \/>\n#giving row id ...NUMEROIDDAAN ID MERGE\u00c4 VARTEN<br \/>\nec.c_df2$id1=c(1:26)<br \/>\nec.c_df3$id1=c(1:26)<br \/>\ntc.c_df2$id1=c(1:26)<br \/>\ntc.c_df3$id1=c(1:26)<br \/>\npc.c_df2$id1=c(1:26)<br \/>\npc.c_df3$id1=c(1:26)<br \/>\n<\/code><br \/>\n<code>#...and for time series<br \/>\n#1991-2002<br \/>\n#giving row id ...NUMEROIDDAAN ID MERGE\u00c4 VARTEN<br \/>\nec.c_df2$id1=c(1:22)<br \/>\nec.c_df3$id1=c(1:22)<br \/>\ntc.c_df2$id1=c(1:22)<br \/>\ntc.c_df3$id1=c(1:22)<br \/>\npc.c_df2$id1=c(1:22)<br \/>\npc.c_df3$id1=c(1:22)<br \/>\n<\/code><br \/>\n<code>#merge data table and renamed country\u00a0 by id\u00a0 .....<br \/>\nec.c_df4 &lt;-merge(ec.c_df2, ec.c_df3,\u00a0 by.x=\"id1\", by.y=\"id1\", all = TRUE)<br \/>\ntc.c_df4 &lt;-merge(tc.c_df2, tc.c_df3,\u00a0 by.x=\"id1\", by.y=\"id1\", all = TRUE)<br \/>\npc.c_df4 &lt;-merge(pc.c_df2, pc.c_df3,\u00a0 by.x=\"id1\", by.y=\"id1\", all = TRUE)<\/code><\/p>\n<p><code>#check the data<br \/>\nhead(ec.c_df4)<br \/>\nhead(tc.c_df4)<br \/>\nhead(pc.c_df4)<br \/>\nsummary(ec.c_df4)<\/code><\/p>\n<p><code>#selecting columns to the gvisGeoMapping\u00a0 .....<br \/>\nec.c_df5 &lt;- data.frame(ec.c_df4$ec.c_df3, ec.c_df4$Effiency )<br \/>\ntc.c_df5 &lt;- data.frame(tc.c_df4$tc.c_df3, tc.c_df4$Effiency )<br \/>\npc.c_df5 &lt;- data.frame(pc.c_df4$pc.c_df3, pc.c_df4$Effiency )<\/code><\/p>\n<p><code>#check the data<br \/>\nhead(ec.c_df5)<br \/>\nhead(tc.c_df5)<br \/>\nhead(pc.c_df5)<\/code><\/p>\n<p>summary(ec.c_df5)<br \/>\nsummary(tc.c_df5)<br \/>\nsummary(pc.c_df5)<\/p>\n<p><code>#naming trick<br \/>\nnames(ec.c_df5)&lt;- c(\"Country\", \"Effiency change in OECD 1980-1990\")<br \/>\nnames(tc.c_df5)&lt;- c(\"Country\", \"Technical Effiency change in OECD 1980-1990\")<br \/>\nnames(pc.c_df5)&lt;- c(\"Country\", \"Productivity change in OECD 1980-1990\")<br \/>\n<\/code><\/p>\n<p><code>#naming time series 1991-2009<br \/>\nnames(ec.c_df5)&lt;- c(\"Country\", \"Effiency change in OECD 1991-2009\")<br \/>\nnames(tc.c_df5)&lt;- c(\"Country\", \"Technical Effiency change in OECD 1991-2009\")<br \/>\nnames(pc.c_df5)&lt;- c(\"Country\", \"Productivity change in OECD 1991-2009\")<br \/>\n<\/code><\/p>\n<p><code>#1991-2002<br \/>\nnames(ec.c_df5)&lt;- c(\"Country\", \"Effiency change in OECD 1991-2002\")<br \/>\nnames(tc.c_df5)&lt;- c(\"Country\", \"Technical Effiency change in OECD 1991-2002\")<br \/>\nnames(pc.c_df5)&lt;- c(\"Country\", \"Productivity change in OECD 1991-2002\")<\/code><\/p>\n<p><code>head(ec.c_df5)<br \/>\nhead(tc.c_df5)<br \/>\nhead(pc.c_df5)<\/code><\/p>\n<p>#set library<br \/>\nlibrary(googleVis)<\/p>\n<p><code>#1980-1990<br \/>\n#me\/230712<br \/>\n#1<br \/>\n#KMEAN VALUE OF MALMQUIST INDICES 1980-1990 Efficency change<br \/>\nGeo1=gvisGeoMap(ec.c_df5, locationvar=\"Country\", numvar=\"Effiency change in OECD 1980-1990\", options=list (height=450, width=800, dataMode='regions'))<br \/>\n#plot(Geo1)<br \/>\ncat(Geo1$html$chart, file=\"...\/oecd_mean_eff_1980_1990_malmquist2.html\")<br \/>\n<\/code><\/p>\n<p><code>#2<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES 1980-1990 Efficency change<br \/>\nGeo2=gvisGeoMap(tc.c_df5, locationvar=\"Country\", numvar=\"Technical Effiency change in OECD 1980-1990\", options=list(height=450, width=800, dataMode='regions'))<br \/>\n#plot(Geo2)<br \/>\ncat(Geo2$html$chart, file=\"...\/oecd_mean_tech_eff_1980_1990_malmquist2.html\")<\/code><\/p>\n<p><code>#3<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES 1980-1990 Efficency change<br \/>\nGeo3=gvisGeoMap(pc.c_df5, locationvar=\"Country\", numvar=\"Productivity change in OECD 1980-1990\", options=list(height=450, width=800, dataMode='regions'))<br \/>\n#plot(Geo3)<br \/>\ncat(Geo3$html$chart, file=\"...\/oecd_mean_prod_1980_1990_malmquist2.html\")<br \/>\n<\/code><\/p>\n<p><code>#1991-2009 (capital var dropped)<br \/>\n#me\/240712<br \/>\n#1<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES<br \/>\nGeo1=gvisGeoMap(ec.c_df5, locationvar=\"Country\", numvar=\"Effiency change in OECD 1991-2009\", options=list (height=450, width=800, dataMode='regions'))<br \/>\nplot(Geo1)<br \/>\ncat(Geo1$html$chart, file=\"...\/oecd_mean_eff_1991_2009_malmquist2.html\")<br \/>\n<\/code><\/p>\n<p><code>#2<br \/>\n#VALUE OF MALMQUIST INDICES<br \/>\nGeo2=gvisGeoMap(tc.c_df5, locationvar=\"Country\", numvar=\"Technical Effiency change in OECD 1991-2009\", options=list(height=450, width=800, dataMode='regions'))<br \/>\nplot(Geo2)<br \/>\ncat(Geo2$html$chart, file=\"...\/oecd_mean_tech_eff_1991_2009_malmquist2.html\")<br \/>\n<\/code><\/p>\n<p><code>#3<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES<br \/>\nGeo3=gvisGeoMap(pc.c_df5, locationvar=\"Country\", numvar=\"Productivity change in OECD 1991-2009\", options=list(height=450, width=800, dataMode='regions'))<br \/>\nplot(Geo3)<br \/>\ncat(Geo3$html$chart, file=\"...\/oecd_mean_prod_1991_2009_malmquist2.html\")<\/code><\/p>\n<p><code>#1991-2002 (capital as input)<br \/>\n#me\/240712<br \/>\n#1<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES<br \/>\nGeo1=gvisGeoMap(ec.c_df5, locationvar=\"Country\", numvar=\"Effiency change in OECD 1991-2002\", options=list (height=450, width=800, dataMode='regions'))<br \/>\nplot(Geo1)<br \/>\ncat(Geo1$html$chart, file=\"...\/oecd_mean_eff_1991_2002_malmquist2.html\")<br \/>\n<\/code><\/p>\n<p><code><br \/>\n#2<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES<br \/>\nGeo2=gvisGeoMap(tc.c_df5, locationvar=\"Country\", numvar=\"Technical Effiency change in OECD 1991-2002\", options=list(height=450, width=800, dataMode='regions'))<br \/>\nplot(Geo2)<br \/>\ncat(Geo2$html$chart, file=\"...\/oecd_mean_tech_eff_1991_2002_malmquist2.html\")<br \/>\n<\/code><\/p>\n<p><code>#3<br \/>\n#KESKIARVO MEAN VALUE OF MALMQUIST INDICES<br \/>\nGeo3=gvisGeoMap(pc.c_df5, locationvar=\"Country\", numvar=\"Productivity change in OECD 1991-2002\", options=list(height=450, width=800, dataMode='regions'))<br \/>\nplot(Geo3)<br \/>\ncat(Geo3$html$chart, file=\"...\/oecd_mean_prod_1991_2002_malmquist2.html\")<\/code><\/p>\n<h1>World Map (producitivity, efficiency)<\/h1>\n<h4>1980-1990<\/h4>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_eff_1980_1990_malmquist2.html\">oecd_mean_eff_1980_1990_malmquist2<\/a><\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_prod_1980_1990_malmquist21.html\">oecd_mean_prod_1980_1990_malmquist2<\/a><\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_tech_eff_1980_1990_malmquist21.html\">oecd_mean_tech_eff_1980_1990_malmquist2<\/a><\/p>\n<h3>1991-2002<\/h3>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_eff_1991_2002_malmquist21.html\">oecd_mean_eff_1991_2002_malmquist2<\/a><\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_prod_1991_2002_malmquist22.html\">oecd_mean_prod_1991_2002_malmquist2<\/a><\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_tech_eff_1991_2002_malmquist21.html\">oecd_mean_tech_eff_1991_2002_malmquist2<\/a><\/p>\n<h4>1991-2009<\/h4>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_eff_1991_2009_malmquist21.html\">oecd_mean_eff_1991_2009_malmquist2<\/a><\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_prod_1991_2009_malmquist21.html\">oecd_mean_prod_1991_2009_malmquist2<\/a><\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/oecd_mean_tech_eff_1991_2009_malmquist21.html\">oecd_mean_tech_eff_1991_2009_malmquist2<\/a><\/p>\n<h1>The cubic smoothing spline model<\/h1>\n<p>Now we plot productivity, effectiveness and technical effectiveness mean values historical trend and forecast by using<br \/>\nThe cubic smoothing spline model. It is equivalent to an ARIMA(0,2,2) model.<\/p>\n<p><code>###############################################################<br \/>\nlibrary(forecast)<br \/>\n#library(ggplot2)<br \/>\n#1980-1990<br \/>\n#1990-2009<br \/>\n#1991-2002<br \/>\n#####################################################################<br \/>\n#1<br \/>\n#1980-1990<br \/>\n#####################################################################<br \/>\n#PRODUCTIVITY<br \/>\npc.y<br \/>\nfcast_pc &lt;- splinef(pc.y,h=10, fan=T) #NOTE confidence leve 50, 99<br \/>\nplot(fcast_pc,\u00a0 main=\"Productivity, forecast from Cubic Smoothing Spline\", ylab=\"Malmquist indices - Productivity\", xlab=\"Year(0=1980, 10=1990, 20=2000)\")<\/code><\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Productivity 1980_1990_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_pc,\u00a0 main=&#8221;Productivity, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Productivity&#8221;, xlab=&#8221;Year(0=1980, 10=1990, 20=2000)&#8221;)<br \/>\ndev.off()<br \/>\n<a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-236\" title=\"Productivity 1980_1990_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1980_1990_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1980_1990_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>#TECHNICAL EFFICIENCY<br \/>\nfcast_tc &lt;- splinef(tc.y,h=10, fan=T)<br \/>\nplot(fcast_tc,\u00a0 main=&#8221;Technical Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Technical Efficiency&#8221;, xlab=&#8221;Year(0=1980, 10=1990, 20=2000)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Technical efficiency 1980_1990_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_tc,\u00a0 main=&#8221;Technical Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Technical Efficiency&#8221;, xlab=&#8221;Year(0=1980, 10=1990, 20=2000)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-239\" title=\"Technical efficiency 1980_1990_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>#EFFICIENCY<br \/>\nfcast_ec &lt;- splinef(ec.y,h=10, fan=T)<br \/>\nplot(fcast_ec,\u00a0 main=&#8221;Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Efficiency&#8221;, xlab=&#8221;Year(0=1980, 10=1990, 20=2000)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;G:\/data\/home\/2012\/marko\/blogi_rbloggerqvist\/tekstiaihiot\/40\/Efficiency 1980_1990_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_ec,\u00a0 main=&#8221;Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Efficiency&#8221;, xlab=&#8221;Year(0=1980, 10=1990, 20=2000)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-233\" title=\"Efficiency 1980_1990_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1980_1990_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>summary(fcast_pc)<br \/>\nsummary(fcast_tc)<br \/>\nsummary(fcast_ec)<\/p>\n<p>#####################################################################<br \/>\n#2<br \/>\n#1991-2009<br \/>\n#####################################################################<br \/>\n#PRODUCTIVITY<br \/>\npc.y<br \/>\nfcast_pc &lt;- splinef(pc.y,h=10, fan=T) #NOTE confidence leve 50, 99<br \/>\nplot(fcast_pc,\u00a0 main=&#8221;Productivity, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Productivity&#8221;, xlab=&#8221;Year(0=1990, 20=2010)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Productivity 1991_2009_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_pc,\u00a0 main=&#8221;Productivity, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Productivity&#8221;, xlab=&#8221;Year(0=1990, 20=2010)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y21.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-238\" title=\"Productivity 1991_2009_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y21.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y21.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y21-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2009_Forecast-Cubic_Smoothing_Spline10y21-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>#TECHNICAL EFFICIENCY<br \/>\nfcast_tc &lt;- splinef(tc.y,h=10, fan=T)<br \/>\nplot(fcast_tc,\u00a0 main=&#8221;Technical Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Technical Efficiency&#8221;, xlab=&#8221;Year(0=1990, 20=2010)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;G:\/data\/home\/2012\/marko\/blogi_rbloggerqvist\/tekstiaihiot\/40\/Technical efficiency 1991_2009_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_tc,\u00a0 main=&#8221;Technical Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Technical Efficiency&#8221;, xlab=&#8221;Year(0=1990, 20=2010)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-241\" title=\"Technical efficiency 1991_2009_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>#EFFICIENCY<br \/>\nfcast_ec &lt;- splinef(ec.y,h=10, fan=T)<br \/>\nplot(fcast_ec,\u00a0 main=&#8221;Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Efficiency&#8221;, xlab=&#8221;Year(0=1990, 20=2010)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Efficiency 1991_2009_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_ec,\u00a0 main=&#8221;Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Efficiency&#8221;, xlab=&#8221;Year(0=1990, 20=2010)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-235\" title=\"Efficiency 1991_2009_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2009_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>summary(fcast_pc)<br \/>\nsummary(fcast_tc)<br \/>\nsummary(fcast_ec)<br \/>\n######################################################################3<br \/>\n#1991-2002 (capital included)<br \/>\n#<br \/>\n#####################################################################<br \/>\n#PRODUCTIVITY<br \/>\nfcast_pc &lt;- splinef(pc.y,h=10, fan=T) #NOTE confidence leve 50, 99<br \/>\nplot(fcast_pc,\u00a0 main=&#8221;Productivity, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Productivity&#8221;, xlab=&#8221;Year(1=1991, 10=2000, 20=2012)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Productivity 1991_2002_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_pc,\u00a0 main=&#8221;Productivity, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Productivity&#8221;, xlab=&#8221;Year(1=1991, 10=2000, 20=2012)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-237\" title=\"Productivity 1991_2002_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2002_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Productivity-1991_2002_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>#TECHNICAL EFFICIENCY<br \/>\nfcast_tc &lt;- splinef(tc.y,h=10, fan=T)<br \/>\nplot(fcast_tc,\u00a0 main=&#8221;Technical Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Technical Efficiency&#8221;, xlab=&#8221;Year(1=1991, 10=2000, 20=2012)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Technical efficiency 1991_2002_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_tc,\u00a0 main=&#8221;Technical Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Technical Efficiency&#8221;, xlab=&#8221;Year(1=1991, 10=2000, 20=2012)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-240\" title=\"Technical efficiency 1991_2002_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Technical-efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>#EFFICIENCY<br \/>\nfcast_ec &lt;- splinef(ec.y,h=10, fan=T)<br \/>\nplot(fcast_ec,\u00a0 main=&#8221;Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Efficiency&#8221;, xlab=&#8221;Year(1=1991, 10=2000, 20=2012)&#8221;)<\/p>\n<p># example &#8211; output graph to jpeg file<br \/>\njpeg(&#8220;&#8230;\/Efficiency 1991_2002_Forecast Cubic_Smoothing_Spline10y2.jpg&#8221;)<br \/>\nplot(fcast_ec,\u00a0 main=&#8221;Efficiency, forecast from Cubic Smoothing Spline&#8221;, ylab=&#8221;Malmquist indices &#8211; Efficiency&#8221;, xlab=&#8221;Year(1=1991, 10=2000, 20=2012)&#8221;)<br \/>\ndev.off()<\/p>\n<p><a href=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-234\" title=\"Efficiency 1991_2002_Forecast Cubic_Smoothing_Spline10y2\" src=\"http:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg\" alt=\"\" width=\"480\" height=\"480\" srcset=\"https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2.jpg 480w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2-150x150.jpg 150w, https:\/\/science.ekqvist.fi\/blogi\/wp-content\/uploads\/2012\/07\/Efficiency-1991_2002_Forecast-Cubic_Smoothing_Spline10y2-300x300.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>summary(fcast_pc)<br \/>\nsummary(fcast_tc)<br \/>\nsummary(fcast_ec)<br \/>\n#####################################################################<\/p>\n<p>Ok, that&#8217;s it,<br \/>\nHave fun with Linear Programming for the Malmquist Productivity Growth Index and its wide range of applications&#8230;<\/p>\n<p>Marko<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data Envelopment Analysis Within couple of days I have been testing DEA modelling (Data Envelopment Analysis) with different R-package. Finally,&#8230;. I have found such a comprehensive way to calculate Malmquist indices. My primary purpose is to show how to use nonparametric methods for measuring efficiency and productivity by using R-programs nonparaeff -package. At this same <a class=\"read-more-excerpt\" href=\"https:\/\/science.ekqvist.fi\/blogi\/dea\/linear-programming-for-the-malmquist-productivity-growth-index\/\">[&#8230;] Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"gallery","meta":[],"categories":[16,17,18,19,23],"tags":[31,40,48],"_links":{"self":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts\/199"}],"collection":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":0,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"wp:attachment":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}