Type: | Package |
Title: | Perform Global Vector Autoregression Estimation and Inference |
Version: | 1.4 |
Date: | 2023-1-30 |
Author: | Ho Tsung-wu |
Maintainer: | Ho Tsung-wu <tsungwu@ntnu.edu.tw> |
Description: | Light procedures for learning Global Vector Autoregression model (GVAR) of Pesaran, Schuermann and Weiner (2004) <doi:10.1198/073500104000000019> and Dees, di Mauro, Pesaran and Smith (2007) <doi:10.1002/jae.932>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
LazyData: | TRUE |
LazyLoad: | yes |
Depends: | R (≥ 3.5.0),vars,xts |
Imports: | lmtest, lubridate, sandwich, strucchange, tsDyn, urca |
NeedsCompilation: | no |
Packaged: | 2023-01-30 00:31:03 UTC; badal |
Repository: | CRAN |
Date/Publication: | 2023-01-30 00:50:02 UTC |
Function to generate foreign variables
Description
Function to generate foreign variables
Usage
GVAR_Ft(data, weight.matrix=NULL)
Arguments
data |
Dataframe is a strictly balanced panel data format,the first column is cross-section ID,and the second column is Time. For the sake of identification, both columns must be named by, respectively, id and Time. |
weight.matrix |
Bilateral trade weight matrix for computing foreign variables. If the computation of foreign variables are weighted by one weighting matrix, weight.matrix must be a "data.frame". If the computation of foreign variables are weighted on a year-to-year basis, then weight.matrix must be a "list", with the same length as the weighting frequency. If NULL, then it computes the foreign vriables by average. |
Value
Ft |
Weighted foerign variables as described in GVAR |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVAR Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
#=== Loading Data ===#
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
#Generate country-specific foreign variables
Ft=GVAR_Ft(data=PriceVol,weight.matrix=tradeweight1)
k=17
head(Ft[[k]])
tail(Ft[[k]])
Compute the structural coefficients matrices G0, G1, G2, and F1, F2
Description
Compute the structural coefficients matrices G0, G1, G2, and F1, F2
Usage
GVAR_GF(data,p, type="const",ic="AIC",weight.matrix)
Arguments
data |
Dataframe is a strictly balanced panel data format,the first column is cross-section ID,and the second column is Time. For the sake of identification, both columns must be named by, respectively, id and Time. |
p |
The number of lag for Xt matrix. The number of lag for foreign variables in country-specific VAR FLag is set to be p+1. Current version restricts p <= 2 for simplicity, which aims at avoiding too many paramaters in low-frequency data of many variables and many countries. It will be relaxed soon. |
type |
Model specificaiton for VAR. As in package vars, we have four selection: "none","const","trend", "both". |
ic |
Information criteria for optimal lag.As in package vars, we have four selection: "AIC", "HQ", "SC", "FPE". |
weight.matrix |
Bilateral trade weight matrix for computing foreign variables. If the computation of foreign variables are weighted by one weighting matrix, weight.matrix must be a "data.frame". If the computation of foreign variables are weighted on a year-to-year basis, then weight.matrix must be a "list", with the same length as the weighting frequency. |
Details
This function generates several structural coefficient matrices of Eq.(2.6) in Filippo and Pesaran(2013, P.17), which are required to compute IRF and multistep forecasts. Besides, it also re-calculates the transformed residuals. In this version, we do not include the impulse responses function(IRF), because the IRF can be computed by these matrices and residuals easily. We will not update it until the next version.
Value
G0 |
Matrix G0 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
G1 |
Matrix G1 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
G2 |
Matrix G2 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
F1 |
Matrix F1 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
F2 |
Matrix F2 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
lagmatrix |
Country-secific optimal lag number, which must be the same. |
RESID |
original residuals=u in Filippo and Pesaran (2013, P.17) |
newRESID |
New residuals=epsilon in Filippo and Pesaran (2013, P.17) |
fitted |
In-sample fitted values, or conditional mean |
data |
data used |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVAR Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweightx")
data("tradeweight1")
p=2
type="const"
ic="SC"
Result=GVAR_GF(data=PriceVol,p,type,ic, weight.matrix=tradeweight1)
Result$G0
Result$G1
Result$G2
Result$F1
Result$F2
Result$lagmatrix
Result$RESID
Result$newRESID
Result$fitted
Result$data
#May use forecast::accuracy(Result$fitted[,1], Result$data[,1]) for performance.
Estimate country-specific VAR in a GVAR setting
Description
Estimate country-specific VAR in a GVAR setting
Usage
GVARest(data,p,lag.max, type="const", ic,weight.matrix=NULL)
Arguments
data |
Dataframe for bivariate VAR is allowed so far, which is also a strictly balanced panel data format,the first column is cross-section ID,and the second column is Time. For the sake of identification, both columns must be named by, respectively, id and Time. Restriction of bivariate VAR will be relaxed soon. |
p |
The number of lag for Xt matrix, foreign variables are set by FLag=p+1. Current version restricts p <= 2 with a view to avoiding too many paramaters in low-frequency data of many variables and many countries. It will be relaxed soon. |
lag.max |
The maximal number of lag for estimating country-specific VAR |
type |
Model specificaiton for VAR. As in package |
ic |
Information criteria for optimal lag.As in package |
weight.matrix |
Bilateral trade weight matrix for computing foreign variables. If the computation of foreign variables are weighted by one weighting matrix, weight.matrix must be a "data.frame". If the computation of foreign variables are weighted on a year-to-year basis, then weight.matrix must be a "list, with the same length as the weighting frequency. |
Value
gvar |
Country-specific GVAR output list |
White |
Coefficient estimates with White robust covariance |
NWHAC |
Coefficient estimates withNewy-West robust covariance |
p |
Number of lags for endogeneous variables in VAR |
K |
Number of lags for Ft variables in VAR |
type |
Model specificaiton. As in package |
datamat |
input data=data |
lagmatrix |
GVAR's Country-secific optimal lag number. |
lagmatrix1 |
VAR's Country-secific optimal lag number. |
exoLag |
Ft lags |
Ft |
Foreign variables |
NAMES |
Names of countries |
gvarRSD |
Country-specific GVAR residuals |
varRSD |
VAR residuals |
weight |
weight.matrix |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVAR Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
mainOUTPUT$lagmatrix # Country-specific GVAR lags
mainOUTPUT$gvar
mainOUTPUT$gvar[[1]]
coef(mainOUTPUT$gvar[[17]])
mainOUTPUT$White[[17]]
mainOUTPUT$NWHAC[[17]][1]
Estimate country-specific Johansen test results in a Global VECM setting
Description
Estimate country-specific Johansen test results in a Global VECM setting
Usage
GVECM.jo(data,p=2,ecdet = "const", type = "eigen",spec = "longrun",
season = NULL,weight.matrix)
Arguments
data |
Dataframe is a strictly balanced panel data format,the first column is cross-section ID,and the second column is Time. For the sake of identification, both columns must be named by, respectively, id and Time. |
p |
The number of lag for Xt matrix. Current version restricts p <= 2 for simplicity, which aims at avoiding too many paramaters in low-frequency data of many variables and many countries. It will be relaxed soon. |
ecdet |
Character, 'none' for no intercept in cointegration, 'const' for constant term in cointegration and 'trend' for trend variable in cointegration. |
type |
Model specificaiton for VECM. As in package VECMs, we have four selection: "none","const","trend", "both". |
spec |
Determines the specification of the VECM, see details in pakcage urca. |
season |
If seasonal dummies should be included, the data frequency must be set accordingly,i.e '4' for quarterly data. |
weight.matrix |
Bilateral trade weight matrix for computing foreign VECMiables. If the computation of foreign VECMiables are weighted by one weighting matrix, weight.matrix must be a "data.frame". If the computation of foreign VECMiables are weighted on a year-to-year basis, then weight.matrix must be a "list, with the same length as the weighting frequency. |
Value
JO.test |
List object of country-specific Johansen test results |
VECMoutputs |
List object of country-specific VECM results |
RESID |
List object of country-specific VECM residuals, obtained by using vars::vec2var |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVECM Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
type="const"
ic="SC"
weight.matrix=tradeweight1
mainOUT.JO=GVECM.jo(data=PriceVol,p=2,weight.matrix=weight.matrix)
mainOUT.JO$JO.test
Compute the structural coefficients matrices G0, G1, G2, and F1, F2
Description
Compute the structural coefficients matrices G0, G1, G2, and F1, F2
Usage
GVECM_GF(data,p,type="const",ic="AIC",weight.matrix)
Arguments
data |
Dataframe is a strictly balanced panel data format,the first column is cross-section ID,and the second column is Time. For the sake of identification, both columns must be named by, respectively, id and Time. |
p |
The number of lag for Xt matrix. The number of lag for foreign variables in country-specific VAR FLag is set to be p+1.Current version restricts p <= 2 for simplicity, which aims at avoiding too many paramaters in low-frequency data of many variables and many countries. It will be relaxed soon. |
type |
Model specificaiton for VAR. As in package vars, we have four selection: "none","const","trend", "both". |
ic |
Information criteria for optimal lag.As in package vars, we have four selection: "AIC", "HQ", "SC", "FPE". |
weight.matrix |
Bilateral trade weight matrix for computing foreign variables. If the computation of foreign variables are weighted by one weighting matrix, weight.matrix must be a "data.frame". If the computation of foreign variables are weighted on a year-to-year basis, then weight.matrix must be a "list", with the same length as the weighting frequency. |
Details
This function generates several structural coefficient matrices of Eq.(2.6) in Filippo and Pesaran(2013, P.17), which are required to compute IRF and multistep forecasts. Besides, it also re-calculates the transformed residuals. In this version, we do not include the impulse responses function(IRF), because the IRF can be computed by these matrices and residuals easily. We will not update it until the next version.
Value
G0 |
Matrix G0 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
G1 |
Matrix G1 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
G2 |
Matrix G2 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
F1 |
Matrix F1 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
F2 |
Matrix F2 of Eq.(2.6) in Filippo and Pesaran(2013, P.17) |
lagmatrix |
Country-secific optimal lag number. |
newRESID |
New residuals=epsilon in Filippo and Pesaran (2013, P.17) |
fitted |
In-sample fitted values, or conditional mean |
data |
data used |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVAR Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweightx")
data("tradeweight1")
p=2
type="const"
ic="SC"
Result.vecm=GVECM_GF(data=PriceVol,p,type,ic, weight.matrix=tradeweight1)
Result.vecm$G0
Result.vecm$G1
Result.vecm$F1
Result.vecm$G2
Result.vecm$F2
Result.vecm$lagmatrix
Result.vecm$newRESID
Result.vecm$fitted
Result.vecm$data
Estimate country-specific Engle-Granger VECM in a Global VECM setting
Description
Estimate country-specific Engle-Granger VECM in a Global VECM setting
Usage
GVECMest(data,p=2,lag.max=NULL, type="const", ic,weight.matrix=NULL)
Arguments
data |
Dataframe is a strictly balanced panel data format,the first column is cross-section ID,and the second column is Time. For the sake of identification, both columns must be named by, respectively, id and Time. |
p |
The number of lag for Xt matrix. Foreign variables are set by FLag=p+1. Current version restricts p <= 2 for simplicity, which aims at avoiding too many paramaters in low-frequency data of many variables and many countries. It will be relaxed soon. |
lag.max |
The maximal number of lag for estimating country-specific VECM |
type |
Model specificaiton for VECM. As in package VECMs, we have four selection: "none","const","trend", "both". |
ic |
Information criteria for optimal lag.As in package VECMs, we have four selection: "AIC", "HQ", "SC", and "FPE". |
weight.matrix |
Bilateral trade weight matrix for computing foreign VECMiables. If the computation of foreign VECMiables are weighted by one weighting matrix, weight.matrix must be a "data.frame". If the computation of foreign VECMiables are weighted on a year-to-year basis, then weight.matrix must be a "list, with the same length as the weighting frequency. |
Value
gvecm |
Country-specific GVECM output list |
White |
Coefficient estimates with White robust coVECMiance |
NWHAC |
Coefficient estimates withNewy-West robust coVECMiance |
p |
Number of lags for endogeneous VECMiables in VECM |
K |
Number of lags for Ft VECMiables in VECM |
type |
Model specificaiton. As in package VECMs, we have four selection: "none","const","trend", and "both". |
datamat |
input data=data |
lagmatrix |
GVECM's Country-secific optimal lag number. |
lagmatrix1 |
VECM's Country-secific optimal lag number. |
exoLag |
Ft lags |
Ft |
Foreign VECMiables |
NAMES |
Names of countries |
gvecmRSD |
Country-specific Global VECM residuals |
vecmRSD |
VECM residuals |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVECM Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVECMest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
mainOUTPUT$lagmatrix # Country-specific GVECM lags
mainOUTPUT$gvecm
mainOUTPUT$gvecm[[1]]
coef(mainOUTPUT$gvecm[[17]])
mainOUTPUT$White[[17]]
mainOUTPUT$NWHAC[[17]][1]
Dataset price-volumn of 17 mareket indices
Description
A nine-year balanced panel price-volumn data of 17 mareket indices, 2006/8/30-2014/11/19
Usage
data("PriceVol")
Format
A data frame with 0 observations on the following 2 variables.
ID
Names of country, cross-section ID
Time
Time index
Ret
Daily returns computed by close-to-close
Vol
Daily transaction volumn, by log
Source
Yahoo finance
Examples
data(PriceVol)
Comparing average residual correlations.
Description
Average pairwise cross-section residual correlations.
Usage
averageCORgvar(out)
Arguments
out |
Estimation results object generated by GVARest |
Details
This function compares the dependency of residuals in VAR and GVAR.
Value
varRSDcor |
A list object of average residual correlations of country-specific VAR |
gvarRSDcor |
A list object of average residual correlations of country-specific VAR augmented by foreign variables(GVAR) |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVAR Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
cor2_avg=averageCORgvar(out=mainOUTPUT)
as.matrix((cor2_avg$varRSDcor)[[1]])
as.matrix((cor2_avg$varRSDcor)[[2]])
as.matrix(cor2_avg$gvarRSDcor[[1]])
as.matrix(cor2_avg$gvarRSDcor[[2]])
Comparing average residual correlations of GVECM and VECM.
Description
Average pairwise cross-section residual correlations of GVECM and VECM.
Usage
averageCORgvecm(out)
Arguments
out |
Estimation results object generated by GVECMest |
Details
This function compares the dependency of residuals in VAR and GVAR.
Value
vecmRSDcor |
A list object of average residual correlations of country-specific VECM |
gvecmRSDcor |
A list object of average residual correlations of country-specific VECM augmented by foreign variables(GVECM) |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Mauro Filippo di and Pesaran H. M. (2013) The GVAR Handbook– Structure and Applications of a Macro Model of the Global Economy for Policy. Oxford University Press.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVECMest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
cor2_avg=averageCORgvecm(out=mainOUTPUT)
as.matrix((cor2_avg$vecmRSDcor)[[1]])
as.matrix((cor2_avg$vecmRSDcor)[[2]])
as.matrix(cor2_avg$gvecmRSDcor[[1]])
as.matrix(cor2_avg$gvecmRSDcor[[2]])
Return country-specific standard LS coefficient estimates.
Description
Extract country-specific standard LS coefficient estimates.
Usage
getCOEF(out,sheet)
Arguments
out |
A list object of estimation results generated by GVARest() |
sheet |
The number of country in out file |
Details
Extract country-specific standard LS coefficient estimates.
Value
coef |
Country-specific coefficient estimates |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
COEF=getCOEF(out=mainOUTPUT,sheet=1)
All-country LS coefficient estimates.
Description
Extract all-country LS coefficient estimates.
Usage
getCOEFexo(out)
Arguments
out |
A list object of estimation results generated by GVARest(). |
Details
Extract all-country LS coefficient estimates.
Value
coef |
Country-specific coefficient estimates. |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
#COEF=getCOEFexo(out=mainOUTPUT)
Extract country-specific LS coefficient estimates with Newy-West robust covariance.
Description
Extract country-specific LS coefficient estimates with Newy-West robust covariance.
Usage
getNWCOEF(out,sheet)
Arguments
out |
A list object of estimation results generated by GVARest. |
sheet |
The number of country in out that is to be saved. |
Value
coef |
Country-specific coefficient estimates. |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Newey WK and West KD (1994) Automatic Lag Selection in Covariance Matrix Estimation. Review of Economic Studies,61,631-653.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
COEF=getNWCOEF(out=mainOUTPUT,sheet=1)
Extract all-country coefficient estimates with Newy-West robust covariance.
Description
Extract all-country coefficient estimates with Newy-West robust covariance.
Usage
getNWCOEFexo(out)
Arguments
out |
A list object of estimation results generated by GVARest. |
Value
coef |
Country-specific coefficient estimates. |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
References
Newey WK and West KD (1994) Automatic Lag Selection in Covariance Matrix Estimation. Review of Economic Studies, 61, 631-653.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
COEF=getNWCOEFexo(out=mainOUTPUT)
Extract country-specific LS coefficient estimates with White robust covariance.
Description
Extract country-specific LS coefficient estimates with White robust covariance.
Usage
getWhiteCOEF(out,sheet)
Arguments
out |
A list object of estimation results generated by GVARest. |
sheet |
The number of country in out that is to be saved. |
Value
coef |
Country-specific coefficient estimates. |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
COEF=getWhiteCOEF(out=mainOUTPUT,sheet=1)
Extract all-country coefficient estimates with White robust covariance.
Description
Extract all-country coefficient estimates with Newy-West robust covariance, and save them in a .csv file.
Usage
getWhiteCOEFexo(out)
Arguments
out |
A list object of estimation results generated by GVARest. |
Value
coef |
Country-specific coefficient estimates. |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Examples
data("PriceVol")
data("tradeweight1")
data("tradeweightx")
p=2
FLag=2
lag.max=15
type="const"
ic="SC"
weight.matrix=tradeweightx
mainOUTPUT = GVARest(data=PriceVol,p,lag.max,type,ic,weight.matrix)
COEF=getWhiteCOEFexo(out=mainOUTPUT)
A single year cross-section bilateral trade weight matrix, 2014.
Description
A single year cross-section bilateral trade weight matrix, 2014
Usage
data("tradeweight1")
Format
A matrix of 17 by 17 bilateral trade weight matrix,2014
Australia
Bilateral trade weight matrix of Australia, 2014
Austria
Bilateral trade weight matrix of Austria, 2014
Belgium
Bilateral trade weight matrix of Belgium, 2014
Brazil
Bilateral trade weight matrix of Brazil, 2014
France
Bilateral trade weight matrix of France, 2014
UK
Bilateral trade weight matrix of UK, 2014
US
Bilateral trade weight matrix of US, 2014
Canada
Bilateral trade weight matrix of Canada, 2014
HongKong
Bilateral trade weight matrix of Hong Kong, 2014
Indonesia
Bilateral trade weight matrix of Indonesia, 2014
Malaysia
Bilateral trade weight matrix of Malaysia, 2014
Korea
Bilateral trade weight matrix of Korea, 2014
Mexico
Bilateral trade weight matrix of Mexico, 2014
Japan
Bilateral trade weight matrix of Japan, 2014
Swiss
Bilateral trade weight matrix of Swiss, 2014
China
Bilateral trade weight matrix of China, 2014
Taiwan
Bilateral trade weight matrix of Taiwan, 2014
Details
This matrix is a 17 by 17 trade weight matrix, the column names are 17 countries. Given column j, the row-wise elements are bilateral trade weights of country j. Please make sure that the order of countries exactly matches the dataset's ID column.
Examples
data(tradeweight1)
is.data.frame(tradeweight1)
A nine-year bilateral trade weight matrix, 2006-2014
Description
A nine-year bilateral trade weight matrix, 2006-2014
Usage
data("tradeweightx")
Format
A list with 17 by 17 matrix on the following variable.
Australia
Bilateral trade weight matrix of Australia, 2014
Austria
Bilateral trade weight matrix of Austria, 2014
Belgium
Bilateral trade weight matrix of Belgium, 2014
Brazil
Bilateral trade weight matrix of Brazil, 2014
France
Bilateral trade weight matrix of France, 2014
UK
Bilateral trade weight matrix of UK, 2014
US
Bilateral trade weight matrix of US, 2014
Canada
Bilateral trade weight matrix of Canada, 2014
HongKong
Bilateral trade weight matrix of Hong Kong, 2014
Indonesia
Bilateral trade weight matrix of Indonesia, 2014
Malaysia
Bilateral trade weight matrix of Malaysia, 2014
Korea
Bilateral trade weight matrix of Korea, 2014
Mexico
Bilateral trade weight matrix of Mexico, 2014
Japan
Bilateral trade weight matrix of Japan, 2014
Swiss
Bilateral trade weight matrix of Swiss, 2014
China
Bilateral trade weight matrix of China, 2014
Taiwan
Bilateral trade weight matrix of Taiwan, 2014
Details
This example data is annual trade weight matrix, it is a list with length 9 (2006-2014).Each list is a year specific 17 by 17 trade weight matrix, the column names are 17 countries. Given column j, the row-wise elements are bilateral trade weights of country j. Make sure that the length of list must exactly match with the number of years. Because once you use this as tradewieght input matrix, R function will automatically compute foreign variables weighted year-by-year. Please make sure that the order of countries exactly matches the dataset's ID column.
Examples
data(tradeweightx)
is.data.frame(tradeweightx)