# Dummy variables

Hi,

I am trying to conduct the panel regression with dummies, however, R does not calculate dummies for the country. I would be grateful for the help on this issue.

Call:
plm(formula = Y ~ X3 + X4 + X5 + X6 + X7 + X8 + X9 + X10 + X11 +
X12 + factor(country) + factor(year), data = Data_Filip_Victoria_EJIM,
model = "within")

Balanced Panel: n = 26, T = 6, N = 156

Residuals:
Min. 1st Qu. Median 3rd Qu. Max.
-65.4798 -3.5062 0.3463 2.4321 46.3811

## Coefficients: Estimate Std. Error t-value Pr(>|t|) X3 -6.18116 7.36421 -0.8394 0.40301 X4 0.87489 3.51136 0.2492 0.80368 X5 -2.24435 3.57458 -0.6279 0.53134 X6 8.06015 3.60927 2.2332 0.02747 * X7 -4.07536 4.30825 -0.9459 0.34616 X8 -2.00205 6.91613 -0.2895 0.77274 X9 12.62895 5.79572 2.1790 0.03137 * X10 3.24751 8.29986 0.3913 0.69632 X11 -0.15639 6.20799 -0.0252 0.97995 X12 7.04843 5.65464 1.2465 0.21512 factor(year)2010 -0.05394 3.17055 -0.0170 0.98646 factor(year)2012 -0.45208 3.18106 -0.1421 0.88724 factor(year)2014 -5.08268 3.43082 -1.4815 0.14121 factor(year)2016 -3.69588 3.55666 -1.0391 0.30092 factor(year)2018 -5.56154 3.24465 -1.7141 0.08921 .

Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

Total Sum of Squares: 14747
Residual Sum of Squares: 12438
R-Squared: 0.15661
F-statistic: 1.42364 on 15 and 115 DF, p-value: 0.14784

Hi, what does `Data_Filip_Victoria_EJIM` look like? Can you provide a reproducible example?

The data is as follows. Actually, with the previous R version, all the calculations were okay, but this version skips the country dummy.

country year X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 Y
Austria 2007 4,06 6,05 5,55 4,64 5,75 3,83 3,97 4,13 3,97 4,44 6,56
Austria 2010 3,68 6,45 5,54 4,98 6,17 3,49 3,78 3,70 3,83 4,08 0,66
Austria 2012 4,05 6,24 5,29 4,73 5,93 3,77 3,71 4,10 3,97 3,79 0,97
Austria 2014 3,64 6,22 5,22 4,72 5,40 3,53 3,26 3,56 3,93 4,04 1,04
Austria 2016 4,08 6,14 5,29 4,02 5,36 3,79 3,85 4,18 4,36 4,37 -2,15
Austria 2018 4,18 5,95 5,26 3,87 5,21 3,71 3,88 4,08 4,09 4,25 0,46
Belgium 2007 4,00 5,97 5,97 6,26 5,90 3,61 3,65 3,95 3,96 4,25 19,87
Belgium 2010 4,01 5,78 5,61 6,34 6,16 3,83 3,31 4,13 4,22 4,29 11,97
Belgium 2012 4,12 5,36 5,36 6,45 6,22 3,85 3,73 3,98 4,05 4,20 2,35
Belgium 2014 4,10 5,39 4,96 6,28 5,97 3,80 3,80 4,11 4,11 4,39 -0,66
Belgium 2016 4,05 5,14 4,89 6,31 5,84 3,83 4,05 4,07 4,22 4,43 12,44
Belgium 2018 3,98 4,51 4,79 6,14 5,68 3,66 3,99 4,13 4,05 4,41 3,27
Bulgaria 2007 2,47 2,33 2,92 3,45 3,46 2,47 2,79 2,86 3,14 3,56 27,90
Bulgaria 2010 2,30 2,17 2,94 3,62 3,75 2,50 3,07 2,85 2,96 3,18 3,08
Bulgaria 2012 3,20 2,11 2,99 3,75 4,15 2,97 3,25 3,10 3,16 3,56 3,14
Bulgaria 2014 2,94 2,95 3,05 3,92 4,19 2,75 3,31 3,00 2,88 4,04 0,81
Bulgaria 2016 2,35 3,28 3,12 3,91 4,05 2,40 2,93 3,06 2,72 3,31 1,91
Bulgaria 2018 2,76 3,36 3,01 4,12 4,26 2,94 3,23 2,88 3,02 3,31 1,83
Croatia 2007 2,50 4,74 3,55 3,18 4,08 2,36 2,69 2,83 2,46 3,45 7,76
Croatia 2010 2,36 5,06 3,45 3,75 4,34 2,62 2,97 2,53 2,82 3,22 1,96
Croatia 2012 3,35 5,43 3,23 3,98 4,41 3,06 2,95 2,92 3,20 3,54 2,32
Croatia 2014 2,92 5,51 3,10 4,30 4,37 2,95 2,98 3,00 3,11 3,37 5,02
Croatia 2016 2,99 5,57 2,66 4,55 4,16 3,07 3,12 3,21 3,16 3,39 0,53
Croatia 2018 3,01 5,46 2,76 4,64 4,25 2,98 2,93 3,10 3,01 3,59 1,89
Czechia 2007 3,00 3,75 4,43 3,43 5,15 2,95 3,06 3,00 3,27 3,56 5,52
Czechia 2010 3,25 3,32 4,35 4,16 5,90 3,31 3,42 3,27 3,60 4,16 2,96
Czechia 2012 2,96 3,61 4,53 4,67 5,95 2,95 3,01 3,34 3,17 3,40 3,85
Czechia 2014 3,29 3,72 4,59 4,42 5,76 3,24 3,59 3,51 3,56 3,73 2,64
Czechia 2016 3,36 3,97 4,53 3,60 5,41 3,58 3,65 3,65 3,84 3,94 5,03
Czechia 2018 3,46 3,95 4,41 3,47 5,25 3,29 3,75 3,72 3,70 4,13 4,49
Denmark 2007 3,82 6,36 5,90 6,42 6,41 3,97 3,67 3,83 3,76 4,11 2,08
Denmark 2010 3,99 6,06 5,36 6,22 6,43 3,58 3,46 3,83 3,94 4,38 -2,79
Denmark 2012 4,07 6,29 5,51 6,15 6,32 3,93 3,70 4,14 4,10 4,21 0,24
Denmark 2014 3,82 5,45 4,47 5,68 5,64 3,79 3,65 3,74 3,36 4,39 1,33
Denmark 2016 3,75 5,59 4,63 5,76 5,58 3,82 3,66 4,01 3,74 3,92 0,08
Denmark 2018 3,96 5,52 4,56 5,70 6,05 3,92 3,53 4,01 4,18 4,41 0,05
Estonia 2007 2,91 3,68 3,15 5,29 5,21 2,75 2,85 3,00 2,84 3,35 10,30
Estonia 2010 2,75 4,22 3,56 5,60 4,87 3,14 3,17 3,17 2,95 3,68 7,66
Estonia 2012 2,79 4,49 3,53 5,61 4,39 2,51 2,82 2,82 3,00 3,23 6,75
Estonia 2014 3,34 4,20 3,56 5,60 4,14 3,40 3,34 3,27 3,20 3,55 2,56
Estonia 2016 3,18 4,53 3,87 5,55 3,73 3,41 3,07 3,18 3,25 4,08 4,41
Estonia 2018 3,10 4,72 4,11 5,61 5,14 3,32 3,26 3,15 3,21 3,80 4,83
Finland 2007 3,81 5,45 5,83 6,16 6,28 3,68 3,30 3,85 4,17 4,18 4,86
Finland 2010 4,08 5,89 5,86 6,45 6,33 3,86 3,41 3,92 4,09 4,08 2,95
Finland 2012 4,12 5,83 5,56 6,21 6,16 3,98 3,85 4,14 4,14 4,10 1,61
Finland 2014 3,52 6,10 5,87 6,38 6,22 3,89 3,52 3,72 3,31 3,80 6,77
Finland 2016 4,01 5,78 5,82 6,36 6,05 4,01 3,51 3,88 4,04 4,14 3,57
Finland 2018 4,00 5,42 5,63 6,20 6,31 3,82 3,56 3,89 4,32 4,28 -0,88
France 2007 3,82 6,64 7,02 6,02 6,41 3,51 3,63 3,76 3,87 4,02 2,38
France 2010 4,00 6,63 6,53 5,89 6,31 3,63 3,30 3,87 4,01 4,37 0,52
France 2012 3,96 6,56 6,40 5,59 6,33 3,64 3,73 3,82 3,97 4,02 0,60
France 2014 3,98 6,40 6,29 5,41 6,06 3,65 3,68 3,75 3,89 4,17 0,09
France 2016 4,01 6,08 5,81 5,28 5,84 3,71 3,64 3,82 4,02 4,25 0,93
France 2018 4,00 6,05 5,76 5,14 5,73 3,59 3,55 3,84 4,00 4,15 1,37
Germany 2007 4,19 6,55 6,52 6,41 6,65 3,88 3,91 4,21 4,12 4,33 2,34
Germany 2010 4,34 6,49 6,35 6,38 6,61 4,00 3,66 4,14 4,18 4,48 1,93
Germany 2012 4,26 6,15 5,74 6,13 6,45 3,87 3,67 4,09 4,05 4,32 0,80
Germany 2014 4,32 6,01 5,72 5,85 6,08 4,10 3,74 4,12 4,17 4,36 -0,08
Germany 2016 4,44 5,72 5,58 5,61 5,95 4,12 3,86 4,28 4,27 4,45 0,45
Germany 2018 4,37 5,51 5,50 5,45 5,76 4,09 3,86 4,31 4,24 4,39 1,86
Greece 2007 3,05 4,31 2,70 4,53 5,42 3,06 3,11 3,33 3,53 4,12 0,66
Greece 2010 2,94 4,11 2,88 4,14 5,48 2,48 2,85 2,69 3,31 3,49 0,11
Greece 2012 2,88 3,98 2,57 4,13 5,40 2,38 2,69 2,76 2,98 3,32 0,71
Greece 2014 3,17 4,21 2,73 4,49 5,26 3,36 2,97 3,23 3,03 3,50 1,13
Greece 2016 3,32 4,28 2,83 4,59 5,12 2,85 2,97 2,91 3,59 3,85 1,42
Greece 2018 3,17 4,52 2,84 4,53 4,79 2,84 3,30 3,06 3,18 3,66 1,82
Hungary 2007 3,12 3,56 3,29 3,09 4,42 3,00 3,07 3,07 3,00 3,69 2,82
Hungary 2010 3,08 3,76 3,36 3,93 4,80 2,83 2,78 2,87 2,87 3,52 1,79
Hungary 2012 3,14 4,03 3,56 4,05 4,74 2,82 2,99 3,18 3,52 3,41 11,40
Hungary 2014 3,18 4,01 3,56 3,92 3,94 2,97 3,40 3,33 3,82 4,06 5,67
Hungary 2016 3,48 4,22 3,80 3,37 4,23 3,02 3,44 3,35 3,40 3,88 -4,27
Hungary 2018 3,27 4,15 3,60 3,25 4,13 3,35 3,22 3,21 3,67 3,79 5,30
Ireland 2007 3,72 3,71 3,37 4,20 5,34 3,82 3,76 3,93 3,96 4,32 9,15
Ireland 2010 3,76 3,94 3,22 4,44 5,20 3,60 3,70 3,82 4,02 4,47 19,27
Ireland 2012 3,35 4,81 3,95 5,22 5,55 3,40 3,40 3,54 3,65 3,77 21,73
Ireland 2014 3,84 5,29 4,05 5,19 5,55 3,80 3,44 3,94 4,13 4,13 18,67
Ireland 2016 3,77 5,27 4,04 5,33 5,76 3,47 3,83 3,79 3,98 3,94 13,11
Ireland 2018 3,29 4,64 3,69 5,11 5,38 3,36 3,42 3,60 3,62 3,76 -7,34
Italy 2007 3,52 4,17 3,12 3,18 4,45 3,19 3,57 3,63 3,66 3,93 1,98
Italy 2010 3,72 4,03 3,40 3,66 4,10 3,38 3,21 3,74 3,83 4,08 0,43
Italy 2012 3,74 4,20 3,53 3,91 4,60 3,34 3,53 3,65 3,73 4,05 0,00
Italy 2014 3,78 4,37 4,24 4,28 4,35 3,36 3,54 3,62 3,84 4,05 1,08
Italy 2016 3,79 4,42 3,96 4,32 4,52 3,45 3,65 3,77 3,86 4,03 1,52
Italy 2018 3,85 4,52 4,08 4,41 4,63 3,47 3,51 3,66 3,85 4,13 1,58
Latvia 2007 2,56 3,44 3,57 4,33 5,04 2,53 3,31 2,94 3,06 3,69 7,52
Latvia 2010 2,88 3,19 3,77 4,40 5,48 2,94 3,38 2,96 3,55 3,72 1,76
Latvia 2012 2,52 3,10 3,87 4,68 5,17 2,71 2,72 2,64 2,97 3,08 3,94
Latvia 2014 3,03 3,00 4,18 5,10 5,39 3,22 3,38 3,21 3,50 4,06 2,85
Latvia 2016 3,24 3,31 4,03 5,18 5,37 3,11 3,28 3,29 3,42 3,62 0,93
Latvia 2018 2,98 3,05 4,24 5,09 5,21 2,80 2,74 2,69 2,79 2,88 2,89
Lithuania 2007 2,30 4,92 4,26 4,00 4,47 2,64 3,00 2,70 2,60 3,40 5,76
Lithuania 2010 2,72 5,28 4,19 4,73 4,22 2,79 3,19 2,85 3,27 3,92 2,75
Lithuania 2012 2,58 5,23 4,44 4,90 3,73 2,73 2,97 2,91 2,73 3,70 1,87
Lithuania 2014 3,18 5,02 4,67 5,13 4,32 3,04 3,10 2,99 3,17 3,60 -0,38
Lithuania 2016 3,57 4,96 4,42 4,85 4,12 3,42 3,49 3,49 3,68 4,14 1,01
Lithuania 2018 2,73 4,73 4,39 4,76 4,36 2,85 2,79 2,96 3,12 3,65 2,05
Luxembourg 2007 3,86 5,69 5,24 4,46 5,22 3,67 3,00 3,22 3,56 4,00 -58,33
Luxembourg 2010 4,06 5,78 5,10 5,52 5,43 4,04 3,67 3,67 3,92 4,58 73,53
Luxembourg 2012 3,79 5,89 5,10 5,21 5,80 3,54 3,70 3,82 3,91 4,19 44,99
Luxembourg 2014 3,91 5,79 5,03 5,40 5,59 3,82 3,82 3,78 3,68 4,71 28,58
Luxembourg 2016 4,24 5,57 5,05 4,68 5,38 3,90 4,24 4,01 4,12 4,80 52,56
Luxembourg 2018 3,63 5,46 4,86 4,55 5,62 3,53 3,37 3,76 3,61 3,90 -23,63
Netherlands 2007 4,29 5,92 5,58 6,68 6,43 3,99 4,05 4,25 4,14 4,38 13,47
Netherlands 2010 4,25 5,35 5,64 6,60 6,36 3,98 3,61 4,16 4,12 4,41 -0,85
Netherlands 2012 4,15 5,65 5,73 6,63 6,50 3,85 3,86 4,05 4,12 4,15 2,98
Netherlands 2014 4,23 6,05 5,48 6,79 6,46 3,96 3,64 4,13 4,07 4,34 5,05
Netherlands 2016 4,29 6,22 5,69 6,77 6,41 4,12 3,94 4,22 4,17 4,41 3,92
Netherlands 2018 4,21 6,14 5,76 6,79 6,58 3,92 3,68 4,09 4,02 4,25 12,50
Poland 2007 2,69 3,20 2,13 3,57 3,88 2,88 2,92 3,04 3,12 3,59 4,62
Poland 2010 2,98 2,06 2,89 2,82 3,74 3,12 3,22 3,26 3,45 4,52 2,67
Poland 2012 3,10 2,33 2,47 3,45 3,65 3,30 3,47 3,30 3,32 4,04 2,48
Poland 2014 3,08 3,05 2,56 3,68 3,91 3,26 3,46 3,47 3,54 4,13 2,62
Poland 2016 3,17 3,81 3,11 4,02 4,07 3,27 3,44 3,39 3,46 3,80 3,32
Poland 2018 3,21 4,10 3,56 4,21 4,46 3,25 3,68 3,58 3,51 3,95 2,38
Portugal 2007 3,16 5,43 4,55 4,73 5,54 3,24 3,23 3,19 3,44 4,06 1,17
Portugal 2010 3,17 5,98 4,41 4,72 5,18 3,31 3,02 3,31 3,38 3,84 1,22
Portugal 2012 3,42 6,29 4,40 4,93 5,53 3,19 3,43 3,48 3,60 3,88 3,81
Portugal 2014 3,37 6,35 4,44 5,18 5,62 3,26 3,43 3,71 3,71 3,87 2,13
Portugal 2016 3,09 6,16 4,26 5,30 5,56 3,37 3,24 3,15 3,65 3,95 2,46
Portugal 2018 3,25 6,02 4,22 5,18 5,45 3,17 3,83 3,71 3,72 4,13 2,82
Romania 2007 2,73 2,06 2,50 3,41 3,78 2,60 3,20 2,86 2,86 3,18 5,57
Romania 2010 2,25 1,98 2,73 3,26 4,05 2,36 3,24 2,68 2,90 3,45 1,80
Romania 2012 2,51 2,10 2,36 2,75 3,64 2,65 2,99 2,83 3,10 3,82 1,87
Romania 2014 2,77 2,08 2,33 3,00 3,36 2,83 3,32 3,20 3,39 4,00 1,61
Romania 2016 2,88 2,80 2,75 3,42 3,56 3,00 3,06 2,82 2,95 3,22 2,65
Romania 2018 2,91 2,70 2,60 3,53 4,04 2,58 3,18 3,07 3,26 3,68 2,60
Slovakia 2007 2,68 3,67 4,40 3,29 3,48 2,61 3,09 3,00 2,87 3,26 5,21
Slovakia 2010 3,00 3,47 4,43 4,12 3,54 2,79 3,05 3,15 3,54 3,92 1,96
Slovakia 2012 2,99 3,59 4,45 3,90 3,18 2,88 2,84 3,07 2,84 3,57 3,16
Slovakia 2014 3,22 3,62 4,35 3,69 3,23 2,89 3,30 3,16 3,02 3,94 -0,51
Slovakia 2016 3,24 4,03 4,59 3,16 3,52 3,28 3,41 3,12 3,12 3,81 0,90
Slovakia 2018 3,00 3,99 4,43 3,01 3,47 2,79 3,10 3,14 2,99 3,14 1,12
Slovenia 2007 3,22 4,44 3,47 4,62 4,71 2,79 3,14 3,09 2,91 3,73 1,58
Slovenia 2010 2,65 4,94 3,48 5,25 4,86 2,59 2,84 2,90 3,16 3,10 0,22
Slovenia 2012 3,24 4,68 2,88 5,24 4,64 3,05 3,34 3,25 3,20 3,60 0,73
Slovenia 2014 3,35 5,08 3,24 5,09 4,33 3,11 3,05 3,51 3,51 3,82 2,11
Slovenia 2016 3,19 4,65 3,18 4,97 4,42 2,88 3,10 3,20 3,27 3,47 2,79
Slovenia 2018 3,26 4,41 2,92 5,03 4,32 3,42 3,19 3,05 3,27 3,70 2,53
Spain 2007 3,51 5,37 4,87 5,06 5,68 3,17 3,45 3,55 3,62 3,86 4,37
Spain 2010 3,58 5,17 4,77 5,18 5,50 3,47 3,11 3,62 3,96 4,12 2,81
Spain 2012 3,74 5,91 5,65 5,76 6,02 3,40 3,68 3,69 3,67 4,02 1,94
Spain 2014 3,77 5,95 5,88 5,78 6,04 3,63 3,51 3,83 3,54 4,07 1,65
Spain 2016 3,72 5,80 5,95 5,65 5,89 3,48 3,63 3,73 3,82 4,00 2,56
Spain 2018 3,84 5,50 5,46 5,52 5,83 3,62 3,83 3,80 3,83 4,06 3,17
Sweden 2007 4,11 5,50 5,74 5,69 5,79 3,85 3,90 4,06 4,15 4,43 5,86
Sweden 2010 4,03 5,69 5,42 5,87 6,04 3,88 3,83 4,22 4,22 4,32 0,02
Sweden 2012 4,13 5,66 5,00 6,04 6,25 3,68 3,39 3,90 3,82 4,26 2,95
Sweden 2014 4,09 5,52 4,57 5,82 5,73 3,75 3,76 3,98 3,97 4,26 0,69
Sweden 2016 4,27 5,36 4,25 5,62 5,60 3,92 4,00 4,25 4,38 4,45 3,71
Sweden 2018 4,24 5,48 4,57 5,50 5,76 4,05 3,92 3,98 3,88 4,28 0,69
United Kingdom 2007 4,05 5,75 4,68 5,38 6,34 3,74 3,85 4,02 4,10 4,25 5,70
United Kingdom 2010 3,95 5,15 4,52 5,22 5,56 3,74 3,66 3,92 4,13 4,37 2,35
United Kingdom 2012 3,95 5,47 4,88 5,61 5,94 3,73 3,63 3,93 4,00 4,19 2,05
United Kingdom 2014 4,16 5,31 5,01 5,68 5,61 3,94 3,63 4,03 4,08 4,33 0,81
United Kingdom 2016 4,21 5,16 4,78 5,67 5,78 3,98 3,77 4,05 4,13 4,33 9,60
United Kingdom 2018 4,03 5,11 4,70 5,49 5,51 3,77 3,67 4,05 4,11 4,33 2,29

Interesting. Not sure. Here is a reproducible example anyway.

``````library(plm)

Data_Filip_Victoria_EJIM <- data.frame(
stringsAsFactors = FALSE,
country = c("Austria",
"Austria","Austria","Austria","Austria","Austria",
"Belgium","Belgium","Belgium","Belgium","Belgium",
"Belgium","Bulgaria","Bulgaria","Bulgaria",
"Bulgaria","Bulgaria","Bulgaria","Croatia",
"Croatia","Croatia","Croatia","Croatia","Croatia",
"Czechia","Czechia","Czechia","Czechia","Czechia",
"Czechia","Denmark","Denmark","Denmark",
"Denmark","Denmark","Denmark","Estonia","Estonia",
"Estonia","Estonia","Estonia","Estonia","Finland",
"Finland","Finland","Finland","Finland",
"Finland","France","France","France","France",
"France","France","Germany","Germany","Germany",
"Germany","Germany","Germany","Greece","Greece",
"Greece","Greece","Greece","Greece","Hungary",
"Hungary","Hungary","Hungary","Hungary","Hungary",
"Ireland","Ireland","Ireland","Ireland",
"Ireland","Ireland","Italy","Italy","Italy","Italy",
"Italy","Italy","Latvia","Latvia","Latvia",
"Latvia","Latvia","Latvia","Lithuania",
"Lithuania","Lithuania","Lithuania","Lithuania",
"Lithuania","Luxembourg","Luxembourg","Luxembourg",
"Luxembourg","Luxembourg","Luxembourg","Netherlands",
"Netherlands","Netherlands","Netherlands",
"Netherlands","Netherlands","Poland","Poland",
"Poland","Poland","Poland","Poland","Portugal",
"Portugal","Portugal","Portugal","Portugal",
"Portugal","Romania","Romania","Romania","Romania",
"Romania","Romania","Slovakia","Slovakia",
"Slovakia","Slovakia","Slovakia","Slovakia","Slovenia",
"Slovenia","Slovenia","Slovenia","Slovenia",
"Slovenia","Spain","Spain","Spain","Spain",
"Spain","Spain","Sweden","Sweden","Sweden",
"Sweden","Sweden","Sweden","United Kingdom",
"United Kingdom","United Kingdom","United Kingdom",
"United Kingdom","United Kingdom"),
year = c(2007L,2010L,2012L,
2014L,2016L,2018L,2007L,2010L,2012L,2014L,
2016L,2018L,2007L,2010L,2012L,2014L,2016L,
2018L,2007L,2010L,2012L,2014L,2016L,2018L,
2007L,2010L,2012L,2014L,2016L,2018L,2007L,2010L,
2012L,2014L,2016L,2018L,2007L,2010L,2012L,
2014L,2016L,2018L,2007L,2010L,2012L,2014L,
2016L,2018L,2007L,2010L,2012L,2014L,2016L,2018L,
2007L,2010L,2012L,2014L,2016L,2018L,2007L,
2010L,2012L,2014L,2016L,2018L,2007L,2010L,
2012L,2014L,2016L,2018L,2007L,2010L,2012L,
2014L,2016L,2018L,2007L,2010L,2012L,2014L,2016L,
2018L,2007L,2010L,2012L,2014L,2016L,2018L,
2007L,2010L,2012L,2014L,2016L,2018L,2007L,
2010L,2012L,2014L,2016L,2018L,2007L,2010L,2012L,
2014L,2016L,2018L,2007L,2010L,2012L,2014L,
2016L,2018L,2007L,2010L,2012L,2014L,2016L,
2018L,2007L,2010L,2012L,2014L,2016L,2018L,
2007L,2010L,2012L,2014L,2016L,2018L,2007L,2010L,
2012L,2014L,2016L,2018L,2007L,2010L,2012L,
2014L,2016L,2018L,2007L,2010L,2012L,2014L,
2016L,2018L,2007L,2010L,2012L,2014L,2016L,2018L),
X3 = c(4.06,3.68,4.05,
3.64,4.08,4.18,4,4.01,4.12,4.1,4.05,3.98,
2.47,2.3,3.2,2.94,2.35,2.76,2.5,2.36,3.35,
2.92,2.99,3.01,3,3.25,2.96,3.29,3.36,3.46,
3.82,3.99,4.07,3.82,3.75,3.96,2.91,2.75,2.79,
3.34,3.18,3.1,3.81,4.08,4.12,3.52,4.01,4,
3.82,4,3.96,3.98,4.01,4,4.19,4.34,4.26,
4.32,4.44,4.37,3.05,2.94,2.88,3.17,3.32,3.17,
3.12,3.08,3.14,3.18,3.48,3.27,3.72,3.76,
3.35,3.84,3.77,3.29,3.52,3.72,3.74,3.78,3.79,
3.85,2.56,2.88,2.52,3.03,3.24,2.98,2.3,2.72,
2.58,3.18,3.57,2.73,3.86,4.06,3.79,3.91,
4.24,3.63,4.29,4.25,4.15,4.23,4.29,4.21,2.69,
2.98,3.1,3.08,3.17,3.21,3.16,3.17,3.42,
3.37,3.09,3.25,2.73,2.25,2.51,2.77,2.88,2.91,
2.68,3,2.99,3.22,3.24,3,3.22,2.65,3.24,
3.35,3.19,3.26,3.51,3.58,3.74,3.77,3.72,3.84,
4.11,4.03,4.13,4.09,4.27,4.24,4.05,3.95,
3.95,4.16,4.21,4.03),
X4 = c(6.05,6.45,6.24,
6.22,6.14,5.95,5.97,5.78,5.36,5.39,5.14,4.51,
2.33,2.17,2.11,2.95,3.28,3.36,4.74,5.06,
5.43,5.51,5.57,5.46,3.75,3.32,3.61,3.72,3.97,
3.95,6.36,6.06,6.29,5.45,5.59,5.52,3.68,
4.22,4.49,4.2,4.53,4.72,5.45,5.89,5.83,6.1,
5.78,5.42,6.64,6.63,6.56,6.4,6.08,6.05,6.55,
6.49,6.15,6.01,5.72,5.51,4.31,4.11,3.98,
4.21,4.28,4.52,3.56,3.76,4.03,4.01,4.22,4.15,
3.71,3.94,4.81,5.29,5.27,4.64,4.17,4.03,
4.2,4.37,4.42,4.52,3.44,3.19,3.1,3,3.31,
3.05,4.92,5.28,5.23,5.02,4.96,4.73,5.69,5.78,
5.89,5.79,5.57,5.46,5.92,5.35,5.65,6.05,
6.22,6.14,3.2,2.06,2.33,3.05,3.81,4.1,5.43,
5.98,6.29,6.35,6.16,6.02,2.06,1.98,2.1,2.08,
2.8,2.7,3.67,3.47,3.59,3.62,4.03,3.99,4.44,
4.94,4.68,5.08,4.65,4.41,5.37,5.17,5.91,
5.95,5.8,5.5,5.5,5.69,5.66,5.52,5.36,5.48,
5.75,5.15,5.47,5.31,5.16,5.11),
X5 = c(5.55,5.54,5.29,
5.22,5.29,5.26,5.97,5.61,5.36,4.96,4.89,4.79,
2.92,2.94,2.99,3.05,3.12,3.01,3.55,3.45,
3.23,3.1,2.66,2.76,4.43,4.35,4.53,4.59,4.53,
4.41,5.9,5.36,5.51,4.47,4.63,4.56,3.15,
3.56,3.53,3.56,3.87,4.11,5.83,5.86,5.56,5.87,
5.82,5.63,7.02,6.53,6.4,6.29,5.81,5.76,6.52,
6.35,5.74,5.72,5.58,5.5,2.7,2.88,2.57,
2.73,2.83,2.84,3.29,3.36,3.56,3.56,3.8,3.6,
3.37,3.22,3.95,4.05,4.04,3.69,3.12,3.4,3.53,
4.24,3.96,4.08,3.57,3.77,3.87,4.18,4.03,
4.24,4.26,4.19,4.44,4.67,4.42,4.39,5.24,5.1,
5.1,5.03,5.05,4.86,5.58,5.64,5.73,5.48,5.69,
5.76,2.13,2.89,2.47,2.56,3.11,3.56,4.55,
4.41,4.4,4.44,4.26,4.22,2.5,2.73,2.36,2.33,
2.75,2.6,4.4,4.43,4.45,4.35,4.59,4.43,3.47,
3.48,2.88,3.24,3.18,2.92,4.87,4.77,5.65,
5.88,5.95,5.46,5.74,5.42,5,4.57,4.25,4.57,
4.68,4.52,4.88,5.01,4.78,4.7),
X6 = c(4.64,4.98,4.73,
4.72,4.02,3.87,6.26,6.34,6.45,6.28,6.31,6.14,
3.45,3.62,3.75,3.92,3.91,4.12,3.18,3.75,
3.98,4.3,4.55,4.64,3.43,4.16,4.67,4.42,3.6,
3.47,6.42,6.22,6.15,5.68,5.76,5.7,5.29,5.6,
5.61,5.6,5.55,5.61,6.16,6.45,6.21,6.38,
6.36,6.2,6.02,5.89,5.59,5.41,5.28,5.14,6.41,
6.38,6.13,5.85,5.61,5.45,4.53,4.14,4.13,4.49,
4.59,4.53,3.09,3.93,4.05,3.92,3.37,3.25,
4.2,4.44,5.22,5.19,5.33,5.11,3.18,3.66,3.91,
4.28,4.32,4.41,4.33,4.4,4.68,5.1,5.18,5.09,
4,4.73,4.9,5.13,4.85,4.76,4.46,5.52,5.21,
5.4,4.68,4.55,6.68,6.6,6.63,6.79,6.77,6.79,
3.57,2.82,3.45,3.68,4.02,4.21,4.73,4.72,
4.93,5.18,5.3,5.18,3.41,3.26,2.75,3,3.42,
3.53,3.29,4.12,3.9,3.69,3.16,3.01,4.62,5.25,
5.24,5.09,4.97,5.03,5.06,5.18,5.76,5.78,
5.65,5.52,5.69,5.87,6.04,5.82,5.62,5.5,5.38,
5.22,5.61,5.68,5.67,5.49),
X7 = c(5.75,6.17,5.93,
5.4,5.36,5.21,5.9,6.16,6.22,5.97,5.84,5.68,
3.46,3.75,4.15,4.19,4.05,4.26,4.08,4.34,
4.41,4.37,4.16,4.25,5.15,5.9,5.95,5.76,5.41,
5.25,6.41,6.43,6.32,5.64,5.58,6.05,5.21,4.87,
4.39,4.14,3.73,5.14,6.28,6.33,6.16,6.22,
6.05,6.31,6.41,6.31,6.33,6.06,5.84,5.73,6.65,
6.61,6.45,6.08,5.95,5.76,5.42,5.48,5.4,
5.26,5.12,4.79,4.42,4.8,4.74,3.94,4.23,4.13,
5.34,5.2,5.55,5.55,5.76,5.38,4.45,4.1,4.6,
4.35,4.52,4.63,5.04,5.48,5.17,5.39,5.37,
5.21,4.47,4.22,3.73,4.32,4.12,4.36,5.22,5.43,
5.8,5.59,5.38,5.62,6.43,6.36,6.5,6.46,6.41,
6.58,3.88,3.74,3.65,3.91,4.07,4.46,5.54,
5.18,5.53,5.62,5.56,5.45,3.78,4.05,3.64,3.36,
3.56,4.04,3.48,3.54,3.18,3.23,3.52,3.47,
4.71,4.86,4.64,4.33,4.42,4.32,5.68,5.5,6.02,
6.04,5.89,5.83,5.79,6.04,6.25,5.73,5.6,5.76,
6.34,5.56,5.94,5.61,5.78,5.51),
X8 = c(3.83,3.49,3.77,
3.53,3.79,3.71,3.61,3.83,3.85,3.8,3.83,3.66,
2.47,2.5,2.97,2.75,2.4,2.94,2.36,2.62,3.06,
2.95,3.07,2.98,2.95,3.31,2.95,3.24,3.58,
3.29,3.97,3.58,3.93,3.79,3.82,3.92,2.75,3.14,
2.51,3.4,3.41,3.32,3.68,3.86,3.98,3.89,
4.01,3.82,3.51,3.63,3.64,3.65,3.71,3.59,3.88,
4,3.87,4.1,4.12,4.09,3.06,2.48,2.38,3.36,
2.85,2.84,3,2.83,2.82,2.97,3.02,3.35,3.82,
3.6,3.4,3.8,3.47,3.36,3.19,3.38,3.34,3.36,
3.45,3.47,2.53,2.94,2.71,3.22,3.11,2.8,2.64,
2.79,2.73,3.04,3.42,2.85,3.67,4.04,3.54,
3.82,3.9,3.53,3.99,3.98,3.85,3.96,4.12,3.92,
2.88,3.12,3.3,3.26,3.27,3.25,3.24,3.31,
3.19,3.26,3.37,3.17,2.6,2.36,2.65,2.83,3,2.58,
2.61,2.79,2.88,2.89,3.28,2.79,2.79,2.59,
3.05,3.11,2.88,3.42,3.17,3.47,3.4,3.63,3.48,
3.62,3.85,3.88,3.68,3.75,3.92,4.05,3.74,
3.74,3.73,3.94,3.98,3.77),
X9 = c(3.97,3.78,3.71,
3.26,3.85,3.88,3.65,3.31,3.73,3.8,4.05,3.99,
2.79,3.07,3.25,3.31,2.93,3.23,2.69,2.97,
2.95,2.98,3.12,2.93,3.06,3.42,3.01,3.59,3.65,
3.75,3.67,3.46,3.7,3.65,3.66,3.53,2.85,
3.17,2.82,3.34,3.07,3.26,3.3,3.41,3.85,3.52,
3.51,3.56,3.63,3.3,3.73,3.68,3.64,3.55,3.91,
3.66,3.67,3.74,3.86,3.86,3.11,2.85,2.69,
2.97,2.97,3.3,3.07,2.78,2.99,3.4,3.44,3.22,
3.76,3.7,3.4,3.44,3.83,3.42,3.57,3.21,3.53,
3.54,3.65,3.51,3.31,3.38,2.72,3.38,3.28,
2.74,3,3.19,2.97,3.1,3.49,2.79,3,3.67,3.7,
3.82,4.24,3.37,4.05,3.61,3.86,3.64,3.94,3.68,
2.92,3.22,3.47,3.46,3.44,3.68,3.23,3.02,
3.43,3.43,3.24,3.83,3.2,3.24,2.99,3.32,3.06,
3.18,3.09,3.05,2.84,3.3,3.41,3.1,3.14,2.84,
3.34,3.05,3.1,3.19,3.45,3.11,3.68,3.51,
3.63,3.83,3.9,3.83,3.39,3.76,4,3.92,3.85,3.66,
3.63,3.63,3.77,3.67),
X10 = c(4.13,3.7,4.1,
3.56,4.18,4.08,3.95,4.13,3.98,4.11,4.07,4.13,
2.86,2.85,3.1,3,3.06,2.88,2.83,2.53,2.92,3,
3.21,3.1,3,3.27,3.34,3.51,3.65,3.72,3.83,
3.83,4.14,3.74,4.01,4.01,3,3.17,2.82,3.27,
3.18,3.15,3.85,3.92,4.14,3.72,3.88,3.89,
3.76,3.87,3.82,3.75,3.82,3.84,4.21,4.14,4.09,
4.12,4.28,4.31,3.33,2.69,2.76,3.23,2.91,
3.06,3.07,2.87,3.18,3.33,3.35,3.21,3.93,3.82,
3.54,3.94,3.79,3.6,3.63,3.74,3.65,3.62,
3.77,3.66,2.94,2.96,2.64,3.21,3.29,2.69,2.7,
2.85,2.91,2.99,3.49,2.96,3.22,3.67,3.82,3.78,
4.01,3.76,4.25,4.16,4.05,4.13,4.22,4.09,
3.04,3.26,3.3,3.47,3.39,3.58,3.19,3.31,3.48,
3.71,3.15,3.71,2.86,2.68,2.83,3.2,2.82,
3.07,3,3.15,3.07,3.16,3.12,3.14,3.09,2.9,3.25,
3.51,3.2,3.05,3.55,3.62,3.69,3.83,3.73,
3.8,4.06,4.22,3.9,3.98,4.25,3.98,4.02,3.92,
3.93,4.03,4.05,4.05),
X11 = c(3.97,3.83,3.97,
3.93,4.36,4.09,3.96,4.22,4.05,4.11,4.22,4.05,
3.14,2.96,3.16,2.88,2.72,3.02,2.46,2.82,
3.2,3.11,3.16,3.01,3.27,3.6,3.17,3.56,3.84,
3.7,3.76,3.94,4.1,3.36,3.74,4.18,2.84,2.95,
3,3.2,3.25,3.21,4.17,4.09,4.14,3.31,4.04,
4.32,3.87,4.01,3.97,3.89,4.02,4,4.12,4.18,
4.05,4.17,4.27,4.24,3.53,3.31,2.98,3.03,
3.59,3.18,3,2.87,3.52,3.82,3.4,3.67,3.96,4.02,
3.65,4.13,3.98,3.62,3.66,3.83,3.73,3.84,
3.86,3.85,3.06,3.55,2.97,3.5,3.42,2.79,2.6,
3.27,2.73,3.17,3.68,3.12,3.56,3.92,3.91,
3.68,4.12,3.61,4.14,4.12,4.12,4.07,4.17,4.02,
3.12,3.45,3.32,3.54,3.46,3.51,3.44,3.38,3.6,
3.71,3.65,3.72,2.86,2.9,3.1,3.39,2.95,
3.26,2.87,3.54,2.84,3.02,3.12,2.99,2.91,3.16,
3.2,3.51,3.27,3.27,3.62,3.96,3.67,3.54,3.82,
3.83,4.15,4.22,3.82,3.97,4.38,3.88,4.1,
4.13,4,4.08,4.13,4.11),
X12 = c(4.44,4.08,3.79,
4.04,4.37,4.25,4.25,4.29,4.2,4.39,4.43,4.41,
3.56,3.18,3.56,4.04,3.31,3.31,3.45,3.22,
3.54,3.37,3.39,3.59,3.56,4.16,3.4,3.73,3.94,
4.13,4.11,4.38,4.21,4.39,3.92,4.41,3.35,
3.68,3.23,3.55,4.08,3.8,4.18,4.08,4.1,3.8,
4.14,4.28,4.02,4.37,4.02,4.17,4.25,4.15,4.33,
4.48,4.32,4.36,4.45,4.39,4.12,3.49,3.32,3.5,
3.85,3.66,3.69,3.52,3.41,4.06,3.88,3.79,
4.32,4.47,3.77,4.13,3.94,3.76,3.93,4.08,4.05,
4.05,4.03,4.13,3.69,3.72,3.08,4.06,3.62,
2.88,3.4,3.92,3.7,3.6,4.14,3.65,4,4.58,4.19,
4.71,4.8,3.9,4.38,4.41,4.15,4.34,4.41,
4.25,3.59,4.52,4.04,4.13,3.8,3.95,4.06,3.84,
3.88,3.87,3.95,4.13,3.18,3.45,3.82,4,3.22,
3.68,3.26,3.92,3.57,3.94,3.81,3.14,3.73,3.1,
3.6,3.82,3.47,3.7,3.86,4.12,4.02,4.07,4,
4.06,4.43,4.32,4.26,4.26,4.45,4.28,4.25,4.37,
4.19,4.33,4.33,4.33),
Y = c(6.56,0.66,0.97,
1.04,-2.15,0.46,19.87,11.97,2.35,-0.66,12.44,
3.27,27.9,3.08,3.14,0.81,1.91,1.83,7.76,
1.96,2.32,5.02,0.53,1.89,5.52,2.96,3.85,2.64,
5.03,4.49,2.08,-2.79,0.24,1.33,0.08,0.05,
10.3,7.66,6.75,2.56,4.41,4.83,4.86,2.95,1.61,
6.77,3.57,-0.88,2.38,0.52,0.6,0.09,0.93,
1.37,2.34,1.93,0.8,-0.08,0.45,1.86,0.66,0.11,
0.71,1.13,1.42,1.82,2.82,1.79,11.4,5.67,
-4.27,5.3,9.15,19.27,21.73,18.67,13.11,-7.34,
1.98,0.43,0,1.08,1.52,1.58,7.52,1.76,3.94,
2.85,0.93,2.89,5.76,2.75,1.87,-0.38,1.01,
2.05,-58.33,73.53,44.99,28.58,52.56,-23.63,
13.47,-0.85,2.98,5.05,3.92,12.5,4.62,2.67,
2.48,2.62,3.32,2.38,1.17,1.22,3.81,2.13,2.46,
2.82,5.57,1.8,1.87,1.61,2.65,2.6,5.21,1.96,
3.16,-0.51,0.9,1.12,1.58,0.22,0.73,2.11,
2.79,2.53,4.37,2.81,1.94,1.65,2.56,3.17,5.86,
0.02,2.95,0.69,3.71,0.69,5.7,2.35,2.05,
0.81,9.6,2.29)
)

plm(formula = Y ~ X3 + X4 + X5 + X6 + X7 + X8 + X9 + X10 + X11 +
X12 + factor(country) + factor(year), data = Data_Filip_Victoria_EJIM,
model = "within")
``````

Thank you for your help, but unfortunately, the factor(country) does not appear with your suggested code...

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.