I'm running a data panel regression with R. I use those data(sheet 2).
I want to use a fixed effect for my panel data. Please, find below the code for my fixed effect
FE_1 <- plm(GDP_per_capita_growth ~
log(GDP_per_capita) + GF_GDP + MA_GDP +
start_business + Invest_GDP +
second_schooling + Pop_growth +
log(Inflation_CPI) + Trade +
GF_GDP * start_business +
factor(as.character(time_fixed_effect)) +
factor(as.character(regional)) +
factor(as.character(oil_exporting_countries)),
data = Temp_1,
index = c("country",
"year"),
na.action = na.omit,
model = "within")
When I run the summary for my panel data fixed effect, some variables are missing, such as time_fixed_effect, regional and oil_exporting_countries. Below, the result I got.
Coefficients:
Estimate Std. Error t-value Pr(>|t|)
log(GDP_per_capita) -1.9676e+01 5.0218e+00 -3.9181 0.0001386 ***
GF_GDP 1.2637e+00 1.9705e+00 0.6413 0.5223695
MA_GDP 1.9337e+01 8.3736e+00 2.3093 0.0223807 *
start_business -1.3378e-07 1.0077e-07 -1.3276 0.1864403
Invest_GDP 1.5166e-08 1.1173e-08 1.3574 0.1768341
second_schooling -4.9808e-01 5.4186e+00 -0.0919 0.9268910
Pop_growth -1.6174e+00 5.9779e-01 -2.7055 0.0076606 **
log(Inflation_CPI) 1.3861e-01 3.2403e-01 0.4278 0.6694806
Trade 1.8669e-02 1.8617e-02 1.0028 0.3176852
factor(as.character(time_fixed_effect))1 3.8295e-01 4.4318e-01 0.8641 0.3890017
GF_GDP:start_business 5.0494e-07 3.4416e-07 1.4672 0.1445566
---
I would like to know, what should I need to do to display all my dummy variables. Is there an error somewhere in my code?
Instead of having index = c("country", "year"),
, I wrote index = c("year", "country"),
, and I got this following result:
Coefficients:
Estimate Std. Error t-value Pr(>|t|)
log(GDP_per_capita) -3.3627e+00 2.0642e+00 -1.6291 0.105013
GF_GDP 1.2334e+00 1.8129e+00 0.6804 0.497127
MA_GDP 5.2312e-01 6.4419e+00 0.0812 0.935366
start_business 1.4314e-08 3.0105e-08 0.4755 0.635022
Invest_GDP -9.8744e-10 1.5174e-09 -0.6507 0.516025
second_schooling 1.0860e+00 1.0806e+00 1.0050 0.316205
Pop_growth -6.3753e-01 2.2690e-01 -2.8097 0.005494 **
log(Inflation_CPI) 1.4547e-01 2.5011e-01 0.5816 0.561550
Trade 9.2730e-04 3.8306e-03 0.2421 0.808991
factor(as.character(regional))2 -1.0668e+00 8.3584e-01 -1.2763 0.203441
factor(as.character(regional))3 -2.6186e-01 6.6220e-01 -0.3954 0.692972
factor(as.character(regional))4 1.4760e-01 7.9347e-01 0.1860 0.852639
factor(as.character(regional))5 1.3558e+00 7.2400e-01 1.8727 0.062696 .
factor(as.character(oil_exporting_countries))1 -1.8890e-01 4.4884e-01 -0.4209 0.674344
GF_GDP:start_business -2.9751e-08 1.3526e-07 -0.2199 0.826157
---
I don't know why I got this result! Can you help me to find out why, please? And also help me to display my "time_fixed-effect" variable, please.
Thank you in advance for your precious help.
PS: This is complete code
# Rename column names
colnames(my_data)[4] <- "Invest_GDP" # percentage
colnames(my_data)[9] <- "Pr_sector_GDP" # percentage
colnames(my_data)[12] <- "start_business"
colnames(my_data)[16] <- "second_schooling"
colnames(my_data)[18] <- "GDP_per_capita_growth"
# Transform column "inflation" as numeric
my_data$Inflation_CPI <- as.numeric(my_data$Inflation_CPI)
my_data$second_schooling <- as.numeric(my_data$second_schooling)
Temp_1 <- my_data %>%
select(
-region,
-Pr_sector_GDP,
-Prop_rights,
-T_freedom,
-current_invest
)