{smcl} {* *! version 1.0 8may2018}{...} {* *! version 1.1 21may2018}{...} {cmd:help gciget} {hline} {title:Title} {p2colset 5 20 22 2}{...} {phang} {bf:gciget} {hline 2} Reads Global Competitiveness Index data from http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/ into Stata{p_end} {p2colreset}{...} {title:Syntax} {p 8 17 2} {cmd:gciget} [{it:{help varlist:varlist}}] [, {cmd:}{it:{help gciget##options:options}}] {synoptset 28 tabbed}{...} {marker Variables_to_be_retrieved}{...} {synopthdr :Variables to be retrieved} {synoptline} {syntab :Variables} {synopt :{it:{varlist}}}List of Global Competitiveness Index (GCI) variables to be retrieved{p_end} {synoptset 28 tabbed}{...} {synopthdr :options} {synoptline} {syntab :Main} {synopt :{opt clear}}replace data in memory{p_end} {synopt :{opt {ul on}noxt{ul off}set}}do not declare the loaded data to be panel data{p_end} {synopt :{opt noquery}}suppress summary calculations by {cmd:xtset}{p_end} {synopt :{opth panelv:ar(newvar)}}generate numeric {it:panelvar} {it:newvar}{p_end} {syntab :Advanced} {synopt :{opt url(filename)}}download link{p_end} {synopt :{opt sheet("sheetname")}}excel worksheet to load{p_end} {synopt :{opt cellrange:([start][:end])}}excel cell range to load{p_end} {synopt :{opt {ul on}nowarn{ul off}ings}}do not display warnings{p_end} {synoptline} {p2colreset}{...} {p 4 6 2} {title:Description} {pstd} {cmd:gciget} facilitates the retrieval of country level data of the Global Competitiveness Index (World Economic Forum, 2018) from {browse "http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/":http://reports.weforum.org/} using stata. Please note that {cmd:gciget} does not provide autonomous access to the GCI data, but only facilitates data retrieval under exactly those terms and conditions under which the owner of the data grants access. {cmd:gciget} is designed for being used with version 2018-02-26 of the Global Competitiveness Index Dataset (World Economic Forum, 2018) and might not work with later published versions of the GCI. Only values and labels are retrieved, but no further information that is provided at {browse "http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/":http://reports.weforum.org/}, information about the source of the data, for instance. Visiting the website of the {browse "http://wef.ch/gcr17":Global Competitiveness Report} is strongly recommended to get familiar with the data and with the terms and conditions under which users are allowed to use the data. {cmd:gciget} is similar to the user written command {cmd:wbopendata} that facilitates the retrieval of World Bank country level data. {title:Variables} {dlgtab:Variables} {phang} {opt varlist} specifies the list of variables of the Global Competitiveness Index Dataset to be retrieved from {browse "http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/":http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/}. The original names of the GCI variables are expected, even if they are invalid stata names (e.g., GCI.A.02.01). {cmd:gciget} will automatically rename these variables by replacing "." with "_". Variables not found in the GCI are ignored. If {it:varlist} is left unspecified, all variables in the GCI are retrieved. {cmd:gciget} always downloads the variables {it:year}, {it:countrycode}, {it:country}, {it:imfincgroup}, {it:imfregion}, and {it:wefregion}, which hence do not need to be included in {it:varlist}. {marker options}{...} {title:Options} {dlgtab:Main} {phang} {opt clear} clears data in memory before loading the GCI data. {phang} {opt noxtset} prevents {cmd:gciget} from declaring the loaded date to be panel data. Without {opt noxtset} {cmd:gciget} declares the loaded data to be panel data (see {cmd:{help xtset}}). For this, {cmd:gciget} generates a new numeric {it:panelvar}, which is a numeric equivalent to the string variable {it:countrycode}. {it:year} serves as {it:timevar}. {phang} {opt noquery} suppresses summary calculations by {cmd:xtset}. With {opt noxtset} {opt noquery} has no effect. {phang} {opt panelvar(newvar)} sepcifies the name of the numeric {it:panelvar} that is generated by {cmd:gciget}. The default name is {it:cnNumber}. With {opt noxtset} specifying {opt panelvar} has no effect. {dlgtab:Advanced} {phang} {opt url(filename)} specifies the url of the GCI data. The default is the currently valid web address {browse "http://www3.weforum.org/docs/GCR2017-2018/GCI_Dataset_2007-2017.xlsx"}. Specifying {opt url(filename)} might become necessary if a new version of the GCI is published and the name of the data file changes, or if the web address changes for any other reason. {opt url(filename)} may also be used to specify the path to the GCI data, if the excel file GCI_Dataset_2007-2017.xlsx has already been downloaded and locally stored (see {help gciget##examples:examples}). {phang} {opt sheet("sheetname")} specifies the excel worksheet to load. The default is the currently valid name "Data". Specifying {opt sheet("sheetname")} might become necessary if a new version of the GCI is published and the name of the relevant excel worksheet changes. {it:"sheetname"} is passed through to {cmd:import excel}. {phang} {opt "cellrange([start][:end])"} specifies a range of cells within the excel sheet to load. The default is the currently valid range A3:FM6527. Specifying {opt "cellrange([start][:end])"} might become neasseary if a new version of the GCI is published and the structure of the excel file changes. {it:start:end} is passed through to {cmd:import excel}. {phang} {opt nowarnings} prevents {cmd:gciget} from displaying warnings that are routinely issued if the options {opt url(filename)}, {opt sheet("sheetname")}, and {opt "cellrange([start][:end])"} deviate from the respective default.{p_end} {marker examples}{...} {title:Examples} {pstd}Loading all variables of the GCI into stata's already cleared memory{p_end} {phang2}{cmd:. gciget}{p_end} {pstd}Loading three selected GCI variables, replacing all data in stata's memory{p_end} {phang2}{cmd:. gciget EOSQ048 EOSQ051 GCI.A.02.01, clear}{p_end} {pstd}The same as above, using a locally stored copy of the excel file GCI_Dataset_2007-2017.xlsx, first using Stata for MS Windows and second using Stata for Mac or Stata for Unix, see {manhelp cd D:cd}{p_end} {phang2}{cmd:. gciget EOSQ048 EOSQ051 GCI.A.02.01, clear url(C:\data\gci\GCI_Dataset_2007-2017.xlsx)} {p_end} {phang2}{cmd:. gciget EOSQ048 EOSQ051 GCI.A.02.01, clear url(~/data/gci/GCI_Dataset_2007-2017.xlsx)} {p_end} {title:Stored results} {pstd} The results saved in {cmd:r()} are those saved by {help xtset##results:xtset}. With option {opt noxtset} no results are saved. {title:References} {pstd} Schwab, K., ed. (2017). The Global Competitiveness Report 2017-2018, Geneva: World Economic Forum. {pstd} World Economic Forum (2018). The Global Competitiveness Index Dataset 2007-2018, {browse "http://www3.weforum.org/docs/GCR2017-2018/GCI_Dataset_2007-2017.xlsx"}. {title:Also see} {psee} Manual: {manlink D import excel}, {manlink XT xtset} {psee} {space 2}Help: {manhelp import_excel D:import excel}, {manhelp xtset XT:xtset}{break} {psee} Online: {helpb wbopendata}{p_end} {title:Authors} {psee} Oleg Badunenko{p_end}{psee} University of Portsmouth{p_end}{psee} Portsmouth, UK{p_end}{psee}E-mail: obadunenko@port.ac.uk {p_end} {psee} Harald Tauchmann{p_end}{psee} Friedrich-Alexander-Universit{c a:}t Erlangen-N{c u:}rnberg (FAU){p_end}{psee} N{c u:}rnberg, Germany{p_end}{psee}E-mail: harald.tauchmann@fau.de {p_end} {title:Disclaimer} {pstd} The World Economic Forum is the provider of the Global Competitiveness Index 2017-2018, a framework and a corresponding set of indicators for 137 economies. The software gciget.ado provides a practical way to read the indicators into Stata (R). The responsibility of complying with the terms and conditions of use under which the owner of the data grants access to the indicators is entirely with the user but not with the authors of the software gciget.ado. Any user of gciget.ado is responsible for making him or herself familiar with the terms of use under which she or he is allowed to work with the data of the Global Competitiveness Index. For more information and methodology, please see (http://wef.ch/gcr17). In no event will the authors, owners, and creators of gciget.ado, or their employers or any other party who may modify and/or redistribute this software, accept liability for any loss or damage suffered as a result of using the gciget.ado software.