# Example 1:
# Dataframe in the format years by countries:
require(tibble)
myTB1 <- tibble::tribble(
~years, ~UK, ~DE, ~IT,
1990, 998, 1250, 332,
1988, 1201, 868, 578,
1989, 1150, 978, 682,
1991, 1600, 1350, 802
)
# Sort the time variable:
newdata <- myTB1[order(myTB1$years),]
# Beta convergence statistic by considering just two times, e.g. 1989 and 1991:
myBC1 <- beta_conv(newdata,1989,1991,timeName="years")
# Visualize the summary of the results (estimated coefficients, standard errors, p-values):
myBC1$res$summary
# Visualize the adjusted R-squared:
myBC1$res$adj.r.squared
# Beta convergence statistic by considering more than two times:
myBC2 <- beta_conv(newdata,1988,1991,all_within=TRUE,timeName="years")
# Example 2:
# Dataframe in the format years by countries, time variable already sorted:
testTB <- tribble(
~time, ~countryA , ~countryB, ~countryC,
2000, 0.8, 2.7, 3.9,
2001, 1.2, 3.2, 4.2,
2002, 0.9, 2.9, 4.1,
2003, 1.3, 2.9, 4.0,
2004, 1.2, 3.1, 4.1,
2005, 1.2, 3.0, 4.0
)
myBC3 <- beta_conv(testTB, time_0 = 2000, time_t = 2005, timeName = "time")
myBC4 <- beta_conv(testTB, time_0 = 2000, time_t = 2005, all_within = TRUE, timeName = "time")
# Example 3
# Beta convergence for the emp_20_64_MS Eurofound dataset:
data(emp_20_64_MS)
empBC <- beta_conv(emp_20_64_MS, time_0 = 2002, time_t = 2006, timeName = "time")
# Summary of the model results:
empBC$res$summary
# Adjusted R-squared:
empBC$res$adj.r.squared
Run the code above in your browser using DataLab