R Under development (unstable) (2024-02-22 r85974 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(lfe) Loading required package: Matrix > options(lfe.threads=2,digits=3,warn=1) > set.seed(42) > x <- rnorm(5000,mean=2) > x2 <- rnorm(length(x)) > x3 <- rexp(length(x)) > #ix <- rep(2.0,length(x)) > ## create individual and firm > id <- factor(sample(150,length(x),replace=TRUE)) > ix <- matrix(rnorm(2*length(x)),length(x),2)*sqrt(as.numeric(id)/nlevels(id)) > colnames(ix) <- c('col1','col2') > firm <- factor(sample(130,length(x),replace=TRUE)) > fx <- rnorm(length(x))*sqrt(as.numeric(id)/nlevels(firm)) > shoe <- factor(sample(10,length(x),replace=TRUE)) > shirt <- factor(sample(10,length(x),replace=TRUE)) > ## effects > id.eff <- rnorm(nlevels(id)) > firm.eff <- rnorm(nlevels(firm)) > shoe.eff <- rnorm(nlevels(shoe)) > shirt.eff <- rnorm(nlevels(shirt)) > ## left hand side > y <- x + 0.25*x2 + 0.5*x3 + rowSums(ix*id.eff[id]) + id.eff[id] + fx*firm.eff[firm] + firm.eff[firm] + shoe.eff[shoe] + shirt.eff[shirt] + rnorm(length(x)) > > ## estimate > summary(est <- felm(y ~ x+x2+x3 | ix:id+id+fx:firm+firm+shoe+shirt, exactDOF=T)) Call: felm(formula = y ~ x + x2 + x3 | ix:id + id + fx:firm + firm + shoe + shirt, exactDOF = T) Residuals: Min 1Q Median 3Q Max -3.151 -0.632 0.005 0.612 3.508 Coefficients: Estimate Std. Error t value Pr(>|t|) x 0.9905 0.0153 64.8 <2e-16 *** x2 0.2548 0.0153 16.7 <2e-16 *** x3 0.4906 0.0150 32.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1 on 4270 degrees of freedom Multiple R-squared(full model): 0.884 Adjusted R-squared: 0.864 Multiple R-squared(proj model): 0.567 Adjusted R-squared: 0.493 F-statistic(full model):44.6 on 729 and 4270 DF, p-value: <2e-16 F-statistic(proj model): 1.86e+03 on 3 and 4270 DF, p-value: <2e-16 > getfe(est) effect obs comp fe idx id.1 0.49564 40 1 id 1 id.2 -0.38389 33 1 id 2 id.3 1.38215 44 1 id 3 id.4 1.80740 28 1 id 4 id.5 2.44934 20 1 id 5 id.6 0.10947 40 1 id 6 id.7 1.29765 19 1 id 7 id.8 -0.99399 32 1 id 8 id.9 -1.76977 29 1 id 9 id.10 -1.22763 35 1 id 10 id.11 -0.70509 34 1 id 11 id.12 0.29630 35 1 id 12 id.13 1.16658 43 1 id 13 id.14 -0.29005 38 1 id 14 id.15 -0.39850 33 1 id 15 id.16 0.55770 24 1 id 16 id.17 0.74281 25 1 id 17 id.18 2.21846 36 1 id 18 id.19 -0.39237 47 1 id 19 id.20 1.26095 31 1 id 20 id.21 -0.64979 41 1 id 21 id.22 1.00946 32 1 id 22 id.23 1.34228 42 1 id 23 id.24 0.74402 28 1 id 24 id.25 1.22309 27 1 id 25 id.26 -0.47922 34 1 id 26 id.27 2.73046 33 1 id 27 id.28 -0.46796 35 1 id 28 id.29 -2.28337 29 1 id 29 id.30 -1.06163 28 1 id 30 id.31 0.55579 24 1 id 31 id.32 0.32734 29 1 id 32 id.33 0.21592 32 1 id 33 id.34 0.30518 33 1 id 34 id.35 -0.66661 31 1 id 35 id.36 0.27436 40 1 id 36 id.37 -0.29739 29 1 id 37 id.38 -1.99801 36 1 id 38 id.39 -0.13401 31 1 id 39 id.40 0.02186 25 1 id 40 id.41 -0.14169 27 1 id 41 id.42 1.27584 43 1 id 42 id.43 -0.35124 32 1 id 43 id.44 -0.07465 35 1 id 44 id.45 1.29735 31 1 id 45 id.46 -0.09637 21 1 id 46 id.47 -0.64019 31 1 id 47 id.48 -0.51439 30 1 id 48 id.49 1.25610 38 1 id 49 id.50 0.26787 35 1 id 50 id.51 0.29863 44 1 id 51 id.52 1.21326 32 1 id 52 id.53 1.54260 38 1 id 53 id.54 0.00979 27 1 id 54 id.55 0.79513 34 1 id 55 id.56 -0.73451 39 1 id 56 id.57 0.42637 30 1 id 57 id.58 -0.65165 39 1 id 58 id.59 0.11995 35 1 id 59 id.60 1.54198 35 1 id 60 id.61 1.41921 33 1 id 61 id.62 -0.80698 36 1 id 62 id.63 0.35816 28 1 id 63 id.64 -0.25192 29 1 id 64 id.65 -0.10579 34 1 id 65 id.66 -0.75351 35 1 id 66 id.67 0.10706 31 1 id 67 id.68 0.38750 28 1 id 68 id.69 0.10635 35 1 id 69 id.70 0.68325 35 1 id 70 id.71 0.64959 32 1 id 71 id.72 0.25461 28 1 id 72 id.73 0.03985 33 1 id 73 id.74 -1.90944 26 1 id 74 id.75 0.68198 33 1 id 75 id.76 0.50526 44 1 id 76 id.77 0.05289 38 1 id 77 id.78 0.15337 33 1 id 78 id.79 -0.03405 33 1 id 79 id.80 1.17287 31 1 id 80 id.81 0.07516 36 1 id 81 id.82 -0.15321 19 1 id 82 id.83 0.43959 36 1 id 83 id.84 0.80468 33 1 id 84 id.85 2.11528 45 1 id 85 id.86 -0.66525 33 1 id 86 id.87 -0.18003 32 1 id 87 id.88 -0.42125 36 1 id 88 id.89 -0.15096 45 1 id 89 id.90 1.18750 34 1 id 90 id.91 -0.77415 41 1 id 91 id.92 1.50022 30 1 id 92 id.93 -0.97634 42 1 id 93 id.94 1.88670 32 1 id 94 id.95 0.51941 33 1 id 95 id.96 0.41769 39 1 id 96 id.97 0.62080 41 1 id 97 id.98 0.22928 36 1 id 98 id.99 0.59570 31 1 id 99 id.100 -1.43839 32 1 id 100 id.101 -0.66474 32 1 id 101 id.102 -1.52660 38 1 id 102 id.103 0.00837 36 1 id 103 id.104 -0.10577 33 1 id 104 id.105 0.58873 40 1 id 105 id.106 0.26031 31 1 id 106 id.107 0.09199 36 1 id 107 id.108 0.57709 33 1 id 108 id.109 0.94888 36 1 id 109 id.110 0.34919 33 1 id 110 id.111 0.19489 37 1 id 111 id.112 0.23684 36 1 id 112 id.113 1.05188 24 1 id 113 id.114 -0.25153 39 1 id 114 id.115 -0.37498 24 1 id 115 id.116 -0.58156 33 1 id 116 id.117 0.06532 35 1 id 117 id.118 -0.29628 31 1 id 118 id.119 0.15429 29 1 id 119 id.120 -0.39357 39 1 id 120 id.121 0.70483 33 1 id 121 id.122 -0.80776 23 1 id 122 id.123 1.30827 21 1 id 123 id.124 -0.97230 35 1 id 124 id.125 1.07594 34 1 id 125 id.126 0.63038 24 1 id 126 id.127 -1.63626 40 1 id 127 id.128 0.22547 34 1 id 128 id.129 0.97743 30 1 id 129 id.130 0.91684 31 1 id 130 id.131 -0.07903 35 1 id 131 id.132 -0.39402 29 1 id 132 id.133 0.18697 40 1 id 133 id.134 0.25070 32 1 id 134 id.135 -0.84899 33 1 id 135 id.136 -0.21829 22 1 id 136 id.137 0.78553 34 1 id 137 id.138 -0.02852 27 1 id 138 id.139 0.65877 41 1 id 139 id.140 -0.73848 33 1 id 140 id.141 -0.22186 36 1 id 141 id.142 0.66198 38 1 id 142 id.143 0.66242 34 1 id 143 id.144 0.22590 27 1 id 144 id.145 0.57323 28 1 id 145 id.146 0.37281 35 1 id 146 id.147 -0.08534 41 1 id 147 id.148 1.58225 46 1 id 148 id.149 0.74651 41 1 id 149 id.150 -1.12037 26 1 id 150 firm.1 1.04053 43 1 firm 1 firm.2 1.61600 41 1 firm 2 firm.3 0.17553 49 1 firm 3 firm.4 2.28898 38 1 firm 4 firm.5 -0.92407 41 1 firm 5 firm.6 0.48633 30 1 firm 6 firm.7 1.86365 45 1 firm 7 firm.8 1.44609 28 1 firm 8 firm.9 0.66257 39 1 firm 9 firm.10 -0.62474 48 1 firm 10 firm.11 0.26068 35 1 firm 11 firm.12 1.53548 37 1 firm 12 firm.13 1.77138 41 1 firm 13 firm.14 -0.42551 41 1 firm 14 firm.15 1.34805 46 1 firm 15 firm.16 0.71288 48 1 firm 16 firm.17 0.71173 33 1 firm 17 firm.18 0.96744 45 1 firm 18 firm.19 1.69951 34 1 firm 19 firm.20 1.57493 37 1 firm 20 firm.21 1.22302 36 1 firm 21 firm.22 -0.99220 32 1 firm 22 firm.23 0.61304 37 1 firm 23 firm.24 4.33202 36 1 firm 24 firm.25 1.03821 41 1 firm 25 firm.26 1.01297 34 1 firm 26 firm.27 0.28996 44 1 firm 27 firm.28 -0.35843 44 1 firm 28 firm.29 0.76486 47 1 firm 29 firm.30 2.47956 50 1 firm 30 firm.31 2.58950 43 1 firm 31 firm.32 0.57954 39 1 firm 32 firm.33 1.83058 32 1 firm 33 firm.34 1.05188 34 1 firm 34 firm.35 1.42750 43 1 firm 35 firm.36 1.51339 42 1 firm 36 firm.37 1.60862 40 1 firm 37 firm.38 0.10061 42 1 firm 38 firm.39 -1.45941 40 1 firm 39 firm.40 1.24291 37 1 firm 40 firm.41 0.03343 40 1 firm 41 firm.42 2.05151 33 1 firm 42 firm.43 0.70698 21 1 firm 43 firm.44 0.79306 39 1 firm 44 firm.45 2.42290 35 1 firm 45 firm.46 -0.23183 47 1 firm 46 firm.47 0.91094 39 1 firm 47 firm.48 0.66921 46 1 firm 48 firm.49 1.49226 40 1 firm 49 firm.50 0.29599 39 1 firm 50 firm.51 1.38105 37 1 firm 51 firm.52 1.51191 39 1 firm 52 firm.53 -0.96188 39 1 firm 53 firm.54 -1.27000 34 1 firm 54 firm.55 0.77884 34 1 firm 55 firm.56 -0.17318 35 1 firm 56 firm.57 1.24852 46 1 firm 57 firm.58 1.75282 21 1 firm 58 firm.59 0.73630 39 1 firm 59 firm.60 2.25158 44 1 firm 60 firm.61 -0.10388 48 1 firm 61 firm.62 0.31914 41 1 firm 62 firm.63 1.78224 51 1 firm 63 firm.64 1.44504 41 1 firm 64 firm.65 0.59799 43 1 firm 65 firm.66 0.41685 38 1 firm 66 firm.67 -0.72291 41 1 firm 67 firm.68 0.70669 43 1 firm 68 firm.69 3.04348 41 1 firm 69 firm.70 1.75975 34 1 firm 70 firm.71 2.23983 45 1 firm 71 firm.72 -0.61861 41 1 firm 72 firm.73 0.44071 23 1 firm 73 firm.74 0.02851 42 1 firm 74 firm.75 1.24159 48 1 firm 75 firm.76 0.05175 47 1 firm 76 firm.77 0.56299 35 1 firm 77 firm.78 -0.49504 35 1 firm 78 firm.79 0.90239 50 1 firm 79 firm.80 0.67225 38 1 firm 80 firm.81 1.19056 34 1 firm 81 firm.82 1.45682 40 1 firm 82 firm.83 0.98084 39 1 firm 83 firm.84 1.09221 31 1 firm 84 firm.85 0.63392 35 1 firm 85 firm.86 -0.39033 36 1 firm 86 firm.87 0.57938 31 1 firm 87 firm.88 1.64506 45 1 firm 88 firm.89 1.37133 31 1 firm 89 firm.90 0.83538 42 1 firm 90 firm.91 1.23528 45 1 firm 91 firm.92 1.45881 38 1 firm 92 firm.93 -0.56824 38 1 firm 93 firm.94 1.21684 33 1 firm 94 firm.95 0.47407 34 1 firm 95 firm.96 1.62691 45 1 firm 96 firm.97 0.84720 47 1 firm 97 firm.98 1.41141 39 1 firm 98 firm.99 1.92975 38 1 firm 99 firm.100 0.21326 34 1 firm 100 firm.101 1.82636 36 1 firm 101 firm.102 0.47180 26 1 firm 102 firm.103 0.05167 48 1 firm 103 firm.104 1.75170 34 1 firm 104 firm.105 0.71366 36 1 firm 105 firm.106 -1.47233 35 1 firm 106 firm.107 2.06258 31 1 firm 107 firm.108 0.10824 29 1 firm 108 firm.109 -0.18916 36 1 firm 109 firm.110 -0.15111 35 1 firm 110 firm.111 0.82342 31 1 firm 111 firm.112 1.11660 38 1 firm 112 firm.113 1.95756 41 1 firm 113 firm.114 -0.08760 40 1 firm 114 firm.115 -0.11347 43 1 firm 115 firm.116 1.86605 45 1 firm 116 firm.117 2.95313 30 1 firm 117 firm.118 -1.20317 37 1 firm 118 firm.119 0.54192 29 1 firm 119 firm.120 0.51133 37 1 firm 120 firm.121 0.85356 43 1 firm 121 firm.122 0.47709 30 1 firm 122 firm.123 -0.82196 34 1 firm 123 firm.124 1.35298 30 1 firm 124 firm.125 2.87196 33 1 firm 125 firm.126 0.75459 34 1 firm 126 firm.127 -0.66411 27 1 firm 127 firm.128 0.00000 53 1 firm 128 firm.129 -0.90405 43 1 firm 129 firm.130 2.40309 37 1 firm 130 shoe.1 -0.13136 506 2 shoe 1 shoe.2 0.15931 514 2 shoe 2 shoe.3 -1.78842 499 2 shoe 3 shoe.4 -0.49922 483 2 shoe 4 shoe.5 -0.78929 483 2 shoe 5 shoe.6 -2.49435 493 2 shoe 6 shoe.7 -0.81708 491 2 shoe 7 shoe.8 -2.61567 511 2 shoe 8 shoe.9 -0.59733 480 2 shoe 9 shoe.10 0.00000 540 2 shoe 10 shirt.1 1.68066 493 3 shirt 1 shirt.2 0.00000 556 3 shirt 2 shirt.3 -0.85603 491 3 shirt 3 shirt.4 0.08520 515 3 shirt 4 shirt.5 -0.97138 485 3 shirt 5 shirt.6 -0.52083 507 3 shirt 6 shirt.7 1.07986 504 3 shirt 7 shirt.8 -0.91009 469 3 shirt 8 shirt.9 1.03319 503 3 shirt 9 shirt.10 -1.44824 477 3 shirt 10 ixcol1:id.1 3.00552 40 0 ixcol1:id 1 ixcol1:id.2 -2.33783 33 0 ixcol1:id 2 ixcol1:id.3 1.74082 44 0 ixcol1:id 3 ixcol1:id.4 1.81140 28 0 ixcol1:id 4 ixcol1:id.5 1.99227 20 0 ixcol1:id 5 ixcol1:id.6 0.56029 40 0 ixcol1:id 6 ixcol1:id.7 1.95404 19 0 ixcol1:id 7 ixcol1:id.8 -1.01062 32 0 ixcol1:id 8 ixcol1:id.9 -2.29422 29 0 ixcol1:id 9 ixcol1:id.10 -1.73999 35 0 ixcol1:id 10 ixcol1:id.11 -0.54051 34 0 ixcol1:id 11 ixcol1:id.12 0.50412 35 0 ixcol1:id 12 ixcol1:id.13 0.64614 43 0 ixcol1:id 13 ixcol1:id.14 -1.83608 38 0 ixcol1:id 14 ixcol1:id.15 -0.77013 33 0 ixcol1:id 15 ixcol1:id.16 0.87036 24 0 ixcol1:id 16 ixcol1:id.17 0.57246 25 0 ixcol1:id 17 ixcol1:id.18 1.51318 36 0 ixcol1:id 18 ixcol1:id.19 -1.72219 47 0 ixcol1:id 19 ixcol1:id.20 0.45292 31 0 ixcol1:id 20 ixcol1:id.21 -0.93121 41 0 ixcol1:id 21 ixcol1:id.22 0.02833 32 0 ixcol1:id 22 ixcol1:id.23 1.22823 42 0 ixcol1:id 23 ixcol1:id.24 0.35339 28 0 ixcol1:id 24 ixcol1:id.25 1.25669 27 0 ixcol1:id 25 ixcol1:id.26 -1.12589 34 0 ixcol1:id 26 ixcol1:id.27 1.91928 33 0 ixcol1:id 27 ixcol1:id.28 -0.97140 35 0 ixcol1:id 28 ixcol1:id.29 -2.57240 29 0 ixcol1:id 29 ixcol1:id.30 -0.75691 28 0 ixcol1:id 30 ixcol1:id.31 0.03873 24 0 ixcol1:id 31 ixcol1:id.32 -0.26897 29 0 ixcol1:id 32 ixcol1:id.33 -0.57108 32 0 ixcol1:id 33 ixcol1:id.34 0.44013 33 0 ixcol1:id 34 ixcol1:id.35 -0.67824 31 0 ixcol1:id 35 ixcol1:id.36 -0.33994 40 0 ixcol1:id 36 ixcol1:id.37 -0.21123 29 0 ixcol1:id 37 ixcol1:id.38 -1.90836 36 0 ixcol1:id 38 ixcol1:id.39 -0.15655 31 0 ixcol1:id 39 ixcol1:id.40 -0.05633 25 0 ixcol1:id 40 ixcol1:id.41 -1.01473 27 0 ixcol1:id 41 ixcol1:id.42 1.35562 43 0 ixcol1:id 42 ixcol1:id.43 -0.18610 32 0 ixcol1:id 43 ixcol1:id.44 -0.96803 35 0 ixcol1:id 44 ixcol1:id.45 1.70049 31 0 ixcol1:id 45 ixcol1:id.46 -0.91940 21 0 ixcol1:id 46 ixcol1:id.47 -1.07088 31 0 ixcol1:id 47 ixcol1:id.48 -0.62403 30 0 ixcol1:id 48 ixcol1:id.49 1.46865 38 0 ixcol1:id 49 ixcol1:id.50 0.09861 35 0 ixcol1:id 50 ixcol1:id.51 -0.32330 44 0 ixcol1:id 51 ixcol1:id.52 1.53517 32 0 ixcol1:id 52 ixcol1:id.53 1.08662 38 0 ixcol1:id 53 ixcol1:id.54 -0.46067 27 0 ixcol1:id 54 ixcol1:id.55 0.25124 34 0 ixcol1:id 55 ixcol1:id.56 -1.07363 39 0 ixcol1:id 56 ixcol1:id.57 -0.06026 30 0 ixcol1:id 57 ixcol1:id.58 -0.85897 39 0 ixcol1:id 58 ixcol1:id.59 0.05119 35 0 ixcol1:id 59 ixcol1:id.60 1.29023 35 0 ixcol1:id 60 ixcol1:id.61 1.30158 33 0 ixcol1:id 61 ixcol1:id.62 -1.12277 36 0 ixcol1:id 62 ixcol1:id.63 -0.45885 28 0 ixcol1:id 63 ixcol1:id.64 -0.49067 29 0 ixcol1:id 64 ixcol1:id.65 -0.80410 34 0 ixcol1:id 65 ixcol1:id.66 -1.38536 35 0 ixcol1:id 66 ixcol1:id.67 0.18186 31 0 ixcol1:id 67 ixcol1:id.68 0.24227 28 0 ixcol1:id 68 ixcol1:id.69 -0.06854 35 0 ixcol1:id 69 ixcol1:id.70 0.47769 35 0 ixcol1:id 70 ixcol1:id.71 -0.29128 32 0 ixcol1:id 71 ixcol1:id.72 -0.04006 28 0 ixcol1:id 72 ixcol1:id.73 -0.44754 33 0 ixcol1:id 73 ixcol1:id.74 -2.13175 26 0 ixcol1:id 74 ixcol1:id.75 -0.24799 33 0 ixcol1:id 75 ixcol1:id.76 -0.25071 44 0 ixcol1:id 76 ixcol1:id.77 -0.27126 38 0 ixcol1:id 77 ixcol1:id.78 -0.08217 33 0 ixcol1:id 78 ixcol1:id.79 -0.38868 33 0 ixcol1:id 79 ixcol1:id.80 0.94118 31 0 ixcol1:id 80 ixcol1:id.81 -0.22698 36 0 ixcol1:id 81 ixcol1:id.82 -0.08043 19 0 ixcol1:id 82 ixcol1:id.83 0.49189 36 0 ixcol1:id 83 ixcol1:id.84 0.08828 33 0 ixcol1:id 84 ixcol1:id.85 1.92395 45 0 ixcol1:id 85 ixcol1:id.86 -0.26502 33 0 ixcol1:id 86 ixcol1:id.87 -0.64857 32 0 ixcol1:id 87 ixcol1:id.88 -0.91341 36 0 ixcol1:id 88 ixcol1:id.89 -0.42450 45 0 ixcol1:id 89 ixcol1:id.90 0.53594 34 0 ixcol1:id 90 ixcol1:id.91 -0.92256 41 0 ixcol1:id 91 ixcol1:id.92 1.58141 30 0 ixcol1:id 92 ixcol1:id.93 -0.92378 42 0 ixcol1:id 93 ixcol1:id.94 1.60438 32 0 ixcol1:id 94 ixcol1:id.95 0.65310 33 0 ixcol1:id 95 ixcol1:id.96 0.22568 39 0 ixcol1:id 96 ixcol1:id.97 -0.15471 41 0 ixcol1:id 97 ixcol1:id.98 0.26457 36 0 ixcol1:id 98 ixcol1:id.99 0.65019 31 0 ixcol1:id 99 ixcol1:id.100 -1.50520 32 0 ixcol1:id 100 ixcol1:id.101 -0.67809 32 0 ixcol1:id 101 ixcol1:id.102 -1.59798 38 0 ixcol1:id 102 ixcol1:id.103 0.67295 36 0 ixcol1:id 103 ixcol1:id.104 -0.40669 33 0 ixcol1:id 104 ixcol1:id.105 -0.02260 40 0 ixcol1:id 105 ixcol1:id.106 -0.06994 31 0 ixcol1:id 106 ixcol1:id.107 -0.39841 36 0 ixcol1:id 107 ixcol1:id.108 -0.63088 33 0 ixcol1:id 108 ixcol1:id.109 0.51262 36 0 ixcol1:id 109 ixcol1:id.110 0.08283 33 0 ixcol1:id 110 ixcol1:id.111 -0.24742 37 0 ixcol1:id 111 ixcol1:id.112 0.74555 36 0 ixcol1:id 112 ixcol1:id.113 1.32386 24 0 ixcol1:id 113 ixcol1:id.114 -0.45027 39 0 ixcol1:id 114 ixcol1:id.115 -0.70115 24 0 ixcol1:id 115 ixcol1:id.116 -0.59985 33 0 ixcol1:id 116 ixcol1:id.117 -0.24727 35 0 ixcol1:id 117 ixcol1:id.118 -0.34419 31 0 ixcol1:id 118 ixcol1:id.119 -0.10506 29 0 ixcol1:id 119 ixcol1:id.120 -0.37464 39 0 ixcol1:id 120 ixcol1:id.121 0.32326 33 0 ixcol1:id 121 ixcol1:id.122 -1.29644 23 0 ixcol1:id 122 ixcol1:id.123 1.40301 21 0 ixcol1:id 123 ixcol1:id.124 -1.47195 35 0 ixcol1:id 124 ixcol1:id.125 0.47882 34 0 ixcol1:id 125 ixcol1:id.126 0.10024 24 0 ixcol1:id 126 ixcol1:id.127 -1.95085 40 0 ixcol1:id 127 ixcol1:id.128 0.41746 34 0 ixcol1:id 128 ixcol1:id.129 0.92666 30 0 ixcol1:id 129 ixcol1:id.130 0.26963 31 0 ixcol1:id 130 ixcol1:id.131 -0.12564 35 0 ixcol1:id 131 ixcol1:id.132 -1.06519 29 0 ixcol1:id 132 ixcol1:id.133 -0.11396 40 0 ixcol1:id 133 ixcol1:id.134 -0.30503 32 0 ixcol1:id 134 ixcol1:id.135 -0.82474 33 0 ixcol1:id 135 ixcol1:id.136 0.22569 22 0 ixcol1:id 136 ixcol1:id.137 0.56588 34 0 ixcol1:id 137 ixcol1:id.138 -0.43803 27 0 ixcol1:id 138 ixcol1:id.139 0.21390 41 0 ixcol1:id 139 ixcol1:id.140 -0.73170 33 0 ixcol1:id 140 ixcol1:id.141 -0.32569 36 0 ixcol1:id 141 ixcol1:id.142 0.39917 38 0 ixcol1:id 142 ixcol1:id.143 0.94248 34 0 ixcol1:id 143 ixcol1:id.144 -0.07696 27 0 ixcol1:id 144 ixcol1:id.145 -0.54596 28 0 ixcol1:id 145 ixcol1:id.146 -0.03608 35 0 ixcol1:id 146 ixcol1:id.147 -0.73449 41 0 ixcol1:id 147 ixcol1:id.148 1.56724 46 0 ixcol1:id 148 ixcol1:id.149 0.58708 41 0 ixcol1:id 149 ixcol1:id.150 -1.26544 26 0 ixcol1:id 150 ixcol2:id.1 3.05202 40 0 ixcol2:id 1 ixcol2:id.2 1.82210 33 0 ixcol2:id 2 ixcol2:id.3 0.94728 44 0 ixcol2:id 3 ixcol2:id.4 -0.10638 28 0 ixcol2:id 4 ixcol2:id.5 1.54235 20 0 ixcol2:id 5 ixcol2:id.6 0.98761 40 0 ixcol2:id 6 ixcol2:id.7 0.36144 19 0 ixcol2:id 7 ixcol2:id.8 -1.65295 32 0 ixcol2:id 8 ixcol2:id.9 -3.01485 29 0 ixcol2:id 9 ixcol2:id.10 -1.76140 35 0 ixcol2:id 10 ixcol2:id.11 -1.47643 34 0 ixcol2:id 11 ixcol2:id.12 1.37400 35 0 ixcol2:id 12 ixcol2:id.13 1.51723 43 0 ixcol2:id 13 ixcol2:id.14 -1.51649 38 0 ixcol2:id 14 ixcol2:id.15 0.14835 33 0 ixcol2:id 15 ixcol2:id.16 -0.05284 24 0 ixcol2:id 16 ixcol2:id.17 -0.63369 25 0 ixcol2:id 17 ixcol2:id.18 2.69373 36 0 ixcol2:id 18 ixcol2:id.19 -0.12060 47 0 ixcol2:id 19 ixcol2:id.20 1.29237 31 0 ixcol2:id 20 ixcol2:id.21 -1.23328 41 0 ixcol2:id 21 ixcol2:id.22 0.31318 32 0 ixcol2:id 22 ixcol2:id.23 0.81736 42 0 ixcol2:id 23 ixcol2:id.24 0.39645 28 0 ixcol2:id 24 ixcol2:id.25 -0.61084 27 0 ixcol2:id 25 ixcol2:id.26 -1.27379 34 0 ixcol2:id 26 ixcol2:id.27 2.52379 33 0 ixcol2:id 27 ixcol2:id.28 -0.72321 35 0 ixcol2:id 28 ixcol2:id.29 -2.84279 29 0 ixcol2:id 29 ixcol2:id.30 -0.76189 28 0 ixcol2:id 30 ixcol2:id.31 0.03633 24 0 ixcol2:id 31 ixcol2:id.32 0.15467 29 0 ixcol2:id 32 ixcol2:id.33 -0.06110 32 0 ixcol2:id 33 ixcol2:id.34 0.01703 33 0 ixcol2:id 34 ixcol2:id.35 -0.84834 31 0 ixcol2:id 35 ixcol2:id.36 0.04698 40 0 ixcol2:id 36 ixcol2:id.37 -0.69901 29 0 ixcol2:id 37 ixcol2:id.38 -2.34843 36 0 ixcol2:id 38 ixcol2:id.39 -0.86619 31 0 ixcol2:id 39 ixcol2:id.40 -0.56143 25 0 ixcol2:id 40 ixcol2:id.41 -0.84543 27 0 ixcol2:id 41 ixcol2:id.42 1.09250 43 0 ixcol2:id 42 ixcol2:id.43 -0.59681 32 0 ixcol2:id 43 ixcol2:id.44 -0.06186 35 0 ixcol2:id 44 ixcol2:id.45 1.54340 31 0 ixcol2:id 45 ixcol2:id.46 -1.32221 21 0 ixcol2:id 46 ixcol2:id.47 -0.92804 31 0 ixcol2:id 47 ixcol2:id.48 -0.84400 30 0 ixcol2:id 48 ixcol2:id.49 1.31519 38 0 ixcol2:id 49 ixcol2:id.50 0.12494 35 0 ixcol2:id 50 ixcol2:id.51 -0.22165 44 0 ixcol2:id 51 ixcol2:id.52 1.10537 32 0 ixcol2:id 52 ixcol2:id.53 1.47013 38 0 ixcol2:id 53 ixcol2:id.54 -0.05454 27 0 ixcol2:id 54 ixcol2:id.55 0.57896 34 0 ixcol2:id 55 ixcol2:id.56 -0.57540 39 0 ixcol2:id 56 ixcol2:id.57 0.44498 30 0 ixcol2:id 57 ixcol2:id.58 -0.79662 39 0 ixcol2:id 58 ixcol2:id.59 0.27703 35 0 ixcol2:id 59 ixcol2:id.60 1.27310 35 0 ixcol2:id 60 ixcol2:id.61 1.25144 33 0 ixcol2:id 61 ixcol2:id.62 -0.61574 36 0 ixcol2:id 62 ixcol2:id.63 0.06499 28 0 ixcol2:id 63 ixcol2:id.64 -0.19065 29 0 ixcol2:id 64 ixcol2:id.65 -0.55092 34 0 ixcol2:id 65 ixcol2:id.66 -1.53084 35 0 ixcol2:id 66 ixcol2:id.67 0.75512 31 0 ixcol2:id 67 ixcol2:id.68 -0.53233 28 0 ixcol2:id 68 ixcol2:id.69 0.24887 35 0 ixcol2:id 69 ixcol2:id.70 0.27945 35 0 ixcol2:id 70 ixcol2:id.71 0.18956 32 0 ixcol2:id 71 ixcol2:id.72 0.08184 28 0 ixcol2:id 72 ixcol2:id.73 -0.49585 33 0 ixcol2:id 73 ixcol2:id.74 -2.27719 26 0 ixcol2:id 74 ixcol2:id.75 0.02748 33 0 ixcol2:id 75 ixcol2:id.76 0.10910 44 0 ixcol2:id 76 ixcol2:id.77 -0.94643 38 0 ixcol2:id 77 ixcol2:id.78 0.11597 33 0 ixcol2:id 78 ixcol2:id.79 -0.19317 33 0 ixcol2:id 79 ixcol2:id.80 0.91121 31 0 ixcol2:id 80 ixcol2:id.81 0.01238 36 0 ixcol2:id 81 ixcol2:id.82 -0.46418 19 0 ixcol2:id 82 ixcol2:id.83 0.67824 36 0 ixcol2:id 83 ixcol2:id.84 0.63413 33 0 ixcol2:id 84 ixcol2:id.85 2.07397 45 0 ixcol2:id 85 ixcol2:id.86 -0.79844 33 0 ixcol2:id 86 ixcol2:id.87 -0.20975 32 0 ixcol2:id 87 ixcol2:id.88 -1.21271 36 0 ixcol2:id 88 ixcol2:id.89 -0.22827 45 0 ixcol2:id 89 ixcol2:id.90 1.36669 34 0 ixcol2:id 90 ixcol2:id.91 -0.98625 41 0 ixcol2:id 91 ixcol2:id.92 1.37083 30 0 ixcol2:id 92 ixcol2:id.93 -0.96652 42 0 ixcol2:id 93 ixcol2:id.94 1.54558 32 0 ixcol2:id 94 ixcol2:id.95 0.58868 33 0 ixcol2:id 95 ixcol2:id.96 0.12852 39 0 ixcol2:id 96 ixcol2:id.97 0.23016 41 0 ixcol2:id 97 ixcol2:id.98 -0.72285 36 0 ixcol2:id 98 ixcol2:id.99 0.57235 31 0 ixcol2:id 99 ixcol2:id.100 -1.84545 32 0 ixcol2:id 100 ixcol2:id.101 -0.80367 32 0 ixcol2:id 101 ixcol2:id.102 -1.83239 38 0 ixcol2:id 102 ixcol2:id.103 -0.01669 36 0 ixcol2:id 103 ixcol2:id.104 -0.29500 33 0 ixcol2:id 104 ixcol2:id.105 0.02067 40 0 ixcol2:id 105 ixcol2:id.106 0.13526 31 0 ixcol2:id 106 ixcol2:id.107 -0.03543 36 0 ixcol2:id 107 ixcol2:id.108 -0.59366 33 0 ixcol2:id 108 ixcol2:id.109 0.74261 36 0 ixcol2:id 109 ixcol2:id.110 0.02166 33 0 ixcol2:id 110 ixcol2:id.111 -0.06979 37 0 ixcol2:id 111 ixcol2:id.112 0.09201 36 0 ixcol2:id 112 ixcol2:id.113 1.17190 24 0 ixcol2:id 113 ixcol2:id.114 -0.37000 39 0 ixcol2:id 114 ixcol2:id.115 -0.51527 24 0 ixcol2:id 115 ixcol2:id.116 -1.05932 33 0 ixcol2:id 116 ixcol2:id.117 -0.59686 35 0 ixcol2:id 117 ixcol2:id.118 -0.16684 31 0 ixcol2:id 118 ixcol2:id.119 -0.11692 29 0 ixcol2:id 119 ixcol2:id.120 -0.51886 39 0 ixcol2:id 120 ixcol2:id.121 0.73156 33 0 ixcol2:id 121 ixcol2:id.122 -1.35579 23 0 ixcol2:id 122 ixcol2:id.123 1.67564 21 0 ixcol2:id 123 ixcol2:id.124 -1.17298 35 0 ixcol2:id 124 ixcol2:id.125 0.68353 34 0 ixcol2:id 125 ixcol2:id.126 0.43395 24 0 ixcol2:id 126 ixcol2:id.127 -1.99719 40 0 ixcol2:id 127 ixcol2:id.128 0.34157 34 0 ixcol2:id 128 ixcol2:id.129 0.48754 30 0 ixcol2:id 129 ixcol2:id.130 0.75252 31 0 ixcol2:id 130 ixcol2:id.131 -0.54636 35 0 ixcol2:id 131 ixcol2:id.132 -0.78064 29 0 ixcol2:id 132 ixcol2:id.133 -0.30642 40 0 ixcol2:id 133 ixcol2:id.134 -0.13612 32 0 ixcol2:id 134 ixcol2:id.135 -0.66962 33 0 ixcol2:id 135 ixcol2:id.136 -0.41527 22 0 ixcol2:id 136 ixcol2:id.137 0.53141 34 0 ixcol2:id 137 ixcol2:id.138 -0.32603 27 0 ixcol2:id 138 ixcol2:id.139 0.28108 41 0 ixcol2:id 139 ixcol2:id.140 -0.76335 33 0 ixcol2:id 140 ixcol2:id.141 -0.64799 36 0 ixcol2:id 141 ixcol2:id.142 0.28236 38 0 ixcol2:id 142 ixcol2:id.143 0.39075 34 0 ixcol2:id 143 ixcol2:id.144 0.09901 27 0 ixcol2:id 144 ixcol2:id.145 0.23524 28 0 ixcol2:id 145 ixcol2:id.146 0.22538 35 0 ixcol2:id 146 ixcol2:id.147 -0.38212 41 0 ixcol2:id 147 ixcol2:id.148 1.38770 46 0 ixcol2:id 148 ixcol2:id.149 0.57190 41 0 ixcol2:id 149 ixcol2:id.150 -0.89635 26 0 ixcol2:id 150 fx:firm.1 0.45871 43 0 fx:firm 1 fx:firm.2 0.65874 41 0 fx:firm 2 fx:firm.3 -0.08092 49 0 fx:firm 3 fx:firm.4 0.98370 38 0 fx:firm 4 fx:firm.5 -1.22038 41 0 fx:firm 5 fx:firm.6 -0.57355 30 0 fx:firm 6 fx:firm.7 1.25410 45 0 fx:firm 7 fx:firm.8 1.08904 28 0 fx:firm 8 fx:firm.9 -0.18038 39 0 fx:firm 9 fx:firm.10 -1.51463 48 0 fx:firm 10 fx:firm.11 -0.63360 35 0 fx:firm 11 fx:firm.12 0.72127 37 0 fx:firm 12 fx:firm.13 1.10832 41 0 fx:firm 13 fx:firm.14 -1.08607 41 0 fx:firm 14 fx:firm.15 0.66877 46 0 fx:firm 15 fx:firm.16 -0.34731 48 0 fx:firm 16 fx:firm.17 -0.10422 33 0 fx:firm 17 fx:firm.18 0.14648 45 0 fx:firm 18 fx:firm.19 0.95014 34 0 fx:firm 19 fx:firm.20 0.96165 37 0 fx:firm 20 fx:firm.21 0.43541 36 0 fx:firm 21 fx:firm.22 -2.01938 32 0 fx:firm 22 fx:firm.23 -0.86529 37 0 fx:firm 23 fx:firm.24 3.33712 36 0 fx:firm 24 fx:firm.25 0.19545 41 0 fx:firm 25 fx:firm.26 -0.08634 34 0 fx:firm 26 fx:firm.27 -0.30893 44 0 fx:firm 27 fx:firm.28 -1.20919 44 0 fx:firm 28 fx:firm.29 0.30761 47 0 fx:firm 29 fx:firm.30 1.80284 50 0 fx:firm 30 fx:firm.31 1.76402 43 0 fx:firm 31 fx:firm.32 -0.58739 39 0 fx:firm 32 fx:firm.33 0.85060 32 0 fx:firm 33 fx:firm.34 0.16848 34 0 fx:firm 34 fx:firm.35 0.94714 43 0 fx:firm 35 fx:firm.36 0.71746 42 0 fx:firm 36 fx:firm.37 0.96941 40 0 fx:firm 37 fx:firm.38 -0.61359 42 0 fx:firm 38 fx:firm.39 -2.14326 40 0 fx:firm 39 fx:firm.40 0.58689 37 0 fx:firm 40 fx:firm.41 -0.74563 40 0 fx:firm 41 fx:firm.42 0.59543 33 0 fx:firm 42 fx:firm.43 -0.67767 21 0 fx:firm 43 fx:firm.44 -0.35029 39 0 fx:firm 44 fx:firm.45 1.70723 35 0 fx:firm 45 fx:firm.46 -1.19019 47 0 fx:firm 46 fx:firm.47 -0.43317 39 0 fx:firm 47 fx:firm.48 -0.32375 46 0 fx:firm 48 fx:firm.49 0.79475 40 0 fx:firm 49 fx:firm.50 -0.52408 39 0 fx:firm 50 fx:firm.51 0.55711 37 0 fx:firm 51 fx:firm.52 1.09489 39 0 fx:firm 52 fx:firm.53 -1.45175 39 0 fx:firm 53 fx:firm.54 -2.69660 34 0 fx:firm 54 fx:firm.55 0.17981 34 0 fx:firm 55 fx:firm.56 -0.95292 35 0 fx:firm 56 fx:firm.57 0.19760 46 0 fx:firm 57 fx:firm.58 0.87556 21 0 fx:firm 58 fx:firm.59 -0.22302 39 0 fx:firm 59 fx:firm.60 1.57243 44 0 fx:firm 60 fx:firm.61 -0.60214 48 0 fx:firm 61 fx:firm.62 -0.37226 41 0 fx:firm 62 fx:firm.63 0.51509 51 0 fx:firm 63 fx:firm.64 0.92343 41 0 fx:firm 64 fx:firm.65 -0.07997 43 0 fx:firm 65 fx:firm.66 0.02304 38 0 fx:firm 66 fx:firm.67 -2.06120 41 0 fx:firm 67 fx:firm.68 -0.01708 43 0 fx:firm 68 fx:firm.69 2.14913 41 0 fx:firm 69 fx:firm.70 1.50290 34 0 fx:firm 70 fx:firm.71 1.81312 45 0 fx:firm 71 fx:firm.72 -1.63143 41 0 fx:firm 72 fx:firm.73 0.12677 23 0 fx:firm 73 fx:firm.74 -0.55048 42 0 fx:firm 74 fx:firm.75 0.36173 48 0 fx:firm 75 fx:firm.76 -1.06240 47 0 fx:firm 76 fx:firm.77 0.14373 35 0 fx:firm 77 fx:firm.78 -1.52546 35 0 fx:firm 78 fx:firm.79 0.17083 50 0 fx:firm 79 fx:firm.80 -0.18508 38 0 fx:firm 80 fx:firm.81 0.59050 34 0 fx:firm 81 fx:firm.82 0.73104 40 0 fx:firm 82 fx:firm.83 -0.25165 39 0 fx:firm 83 fx:firm.84 0.80361 31 0 fx:firm 84 fx:firm.85 -0.28550 35 0 fx:firm 85 fx:firm.86 -1.77529 36 0 fx:firm 86 fx:firm.87 0.02633 31 0 fx:firm 87 fx:firm.88 0.89191 45 0 fx:firm 88 fx:firm.89 0.86753 31 0 fx:firm 89 fx:firm.90 0.18028 42 0 fx:firm 90 fx:firm.91 -0.48425 45 0 fx:firm 91 fx:firm.92 0.65919 38 0 fx:firm 92 fx:firm.93 -1.74857 38 0 fx:firm 93 fx:firm.94 0.85792 33 0 fx:firm 94 fx:firm.95 -0.25194 34 0 fx:firm 95 fx:firm.96 0.56705 45 0 fx:firm 96 fx:firm.97 0.13549 47 0 fx:firm 97 fx:firm.98 0.87588 39 0 fx:firm 98 fx:firm.99 1.10140 38 0 fx:firm 99 fx:firm.100 -0.28309 34 0 fx:firm 100 fx:firm.101 1.27069 36 0 fx:firm 101 fx:firm.102 -0.41130 26 0 fx:firm 102 fx:firm.103 -0.43629 48 0 fx:firm 103 fx:firm.104 1.16549 34 0 fx:firm 104 fx:firm.105 0.20549 36 0 fx:firm 105 fx:firm.106 -2.42462 35 0 fx:firm 106 fx:firm.107 0.90413 31 0 fx:firm 107 fx:firm.108 -0.45533 29 0 fx:firm 108 fx:firm.109 -1.03676 36 0 fx:firm 109 fx:firm.110 -0.48923 35 0 fx:firm 110 fx:firm.111 -0.16806 31 0 fx:firm 111 fx:firm.112 0.35828 38 0 fx:firm 112 fx:firm.113 0.76310 41 0 fx:firm 113 fx:firm.114 -0.47402 40 0 fx:firm 114 fx:firm.115 -0.85266 43 0 fx:firm 115 fx:firm.116 0.14742 45 0 fx:firm 116 fx:firm.117 2.54730 30 0 fx:firm 117 fx:firm.118 -1.49770 37 0 fx:firm 118 fx:firm.119 0.31317 29 0 fx:firm 119 fx:firm.120 -0.42312 37 0 fx:firm 120 fx:firm.121 0.15890 43 0 fx:firm 121 fx:firm.122 -0.09859 30 0 fx:firm 122 fx:firm.123 -1.60132 34 0 fx:firm 123 fx:firm.124 0.60489 30 0 fx:firm 124 fx:firm.125 2.47736 33 0 fx:firm 125 fx:firm.126 0.20063 34 0 fx:firm 126 fx:firm.127 -1.84892 27 0 fx:firm 127 fx:firm.128 -0.98862 53 0 fx:firm 128 fx:firm.129 -2.22475 43 0 fx:firm 129 fx:firm.130 1.80810 37 0 fx:firm 130 > > # make sure this one works, > summary(est <- felm(y ~ x | x2:id + x3:id + id)) Call: felm(formula = y ~ x | x2:id + x3:id + id) Residuals: Min 1Q Median 3Q Max -11.678 -1.408 0.014 1.405 11.416 Coefficients: Estimate Std. Error t value Pr(>|t|) x 0.9725 0.0342 28.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.32 on 4549 degrees of freedom Multiple R-squared(full model): 0.34 Adjusted R-squared: 0.274 Multiple R-squared(proj model): 0.151 Adjusted R-squared: 0.0673 F-statistic(full model): 5.2 on 450 and 4549 DF, p-value: <2e-16 F-statistic(proj model): 810 on 1 and 4549 DF, p-value: <2e-16 *** Standard errors may be too high due to more than 2 groups and exactDOF=FALSE > > > # compare with lm > x <- rnorm(100) > id <- factor(sample(5,length(x), replace=T)) > id.eff <- rnorm(nlevels(id)) > firm.eff <- rnorm(nlevels(firm)) > firm <- factor(sample(7,length(x), replace=T)) > fx <- rnorm(length(x)) > ix <- matrix(rnorm(2*length(x)),length(x),2) > y <- x + rowSums(ix*id.eff[id]) + fx*firm.eff[firm] + firm.eff[firm] + rnorm(length(x)) > summary(est <- felm(y ~ x | ix:id + fx:firm + firm, exactDOF='rM')) Call: felm(formula = y ~ x | ix:id + fx:firm + firm, exactDOF = "rM") Residuals: Min 1Q Median 3Q Max -2.5370 -0.4690 -0.0234 0.5613 2.1140 Coefficients: Estimate Std. Error t value Pr(>|t|) x 0.920 0.123 7.48 1.2e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.942 on 75 degrees of freedom Multiple R-squared(full model): 0.908 Adjusted R-squared: 0.878 Multiple R-squared(proj model): 0.427 Adjusted R-squared: 0.244 F-statistic(full model):30.7 on 24 and 75 DF, p-value: <2e-16 F-statistic(proj model): 56 on 1 and 75 DF, p-value: 1.15e-10 > getfe(est) effect obs comp fe idx firm.1 -1.14276 13 1 firm 1 firm.2 -1.31466 11 1 firm 2 firm.3 0.50482 16 1 firm 3 firm.4 -2.10112 15 1 firm 4 firm.5 1.29378 15 1 firm 5 firm.6 -0.65678 15 1 firm 6 firm.7 1.33263 15 1 firm 7 ix1:id.1 0.12195 21 0 ix1:id 1 ix1:id.2 -1.67347 16 0 ix1:id 2 ix1:id.3 -2.78925 21 0 ix1:id 3 ix1:id.4 0.35090 21 0 ix1:id 4 ix1:id.5 -0.00459 21 0 ix1:id 5 ix2:id.1 0.89843 21 0 ix2:id 1 ix2:id.2 -1.62595 16 0 ix2:id 2 ix2:id.3 -2.41852 21 0 ix2:id 3 ix2:id.4 0.80095 21 0 ix2:id 4 ix2:id.5 -0.09832 21 0 ix2:id 5 fx:firm.1 -1.07405 13 0 fx:firm 1 fx:firm.2 -1.72752 11 0 fx:firm 2 fx:firm.3 0.06534 16 0 fx:firm 3 fx:firm.4 -1.54553 15 0 fx:firm 4 fx:firm.5 1.05628 15 0 fx:firm 5 fx:firm.6 -0.08033 15 0 fx:firm 6 fx:firm.7 1.01506 15 0 fx:firm 7 > summary(lm(y ~ x + ix:id + fx:firm + firm)) Call: lm(formula = y ~ x + ix:id + fx:firm + firm) Residuals: Min 1Q Median 3Q Max -2.5370 -0.4690 -0.0234 0.5613 2.1140 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.14276 0.27244 -4.19 7.4e-05 *** x 0.92005 0.12299 7.48 1.2e-10 *** firm2 -0.17190 0.40501 -0.42 0.67246 firm3 1.64758 0.36706 4.49 2.5e-05 *** firm4 -0.95837 0.38099 -2.52 0.01403 * firm5 2.43654 0.38715 6.29 1.9e-08 *** firm6 0.48598 0.37902 1.28 0.20372 firm7 2.47539 0.38344 6.46 9.5e-09 *** ix1:id1 0.12195 0.21223 0.57 0.56726 ix2:id1 0.89843 0.35054 2.56 0.01238 * ix1:id2 -1.67347 0.30866 -5.42 6.9e-07 *** ix2:id2 -1.62595 0.31333 -5.19 1.7e-06 *** ix1:id3 -2.78925 0.26750 -10.43 3.0e-16 *** ix2:id3 -2.41852 0.18337 -13.19 < 2e-16 *** ix1:id4 0.35090 0.19812 1.77 0.08059 . ix2:id4 0.80095 0.21019 3.81 0.00028 *** ix1:id5 -0.00459 0.26969 -0.02 0.98647 ix2:id5 -0.09832 0.26423 -0.37 0.71086 fx:firm1 -1.07405 0.31495 -3.41 0.00105 ** fx:firm2 -1.72752 0.34129 -5.06 2.9e-06 *** fx:firm3 0.06534 0.21070 0.31 0.75732 fx:firm4 -1.54553 0.38552 -4.01 0.00014 *** fx:firm5 1.05628 0.31100 3.40 0.00109 ** fx:firm6 -0.08033 0.29074 -0.28 0.78309 fx:firm7 1.01506 0.27422 3.70 0.00041 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.942 on 75 degrees of freedom Multiple R-squared: 0.908, Adjusted R-squared: 0.878 F-statistic: 30.7 on 24 and 75 DF, p-value: <2e-16 > > > proc.time() user system elapsed 0.98 0.23 1.20