Running 'anomalies.R' [3s/4s]
  Running 'bctest.R' [5s/7s]
  Comparing 'bctest.Rout' to 'bctest.Rout.save' ... OK
  Running 'cgsolve.R' [2s/4s]
  Comparing 'cgsolve.Rout' to 'cgsolve.Rout.save' ... OK
  Running 'cluster.R' [3s/4s]
  Comparing 'cluster.Rout' to 'cluster.Rout.save' ... OK
  Running 'comparelm.R' [2s/2s]
  Running 'degenerate.R' [2s/2s]
  Running 'efcheck.R' [2s/3s]
  Running 'fourfac.R' [2s/3s]
  Running 'intact.R' [3s/4s]
  Comparing 'intact.Rout' to 'intact.Rout.save' ... OK
  Running 'interact.R' [2s/2s]
  Running 'ivtest.R' [2s/3s]
  Running 'lfetest.R' [2s/3s]
  Comparing 'lfetest.Rout' to 'lfetest.Rout.save' ... OK
  Running 'mlhs.R' [2s/3s]
  Running 'multiway.R' [2s/3s]
  Comparing 'multiway.Rout' to 'multiway.Rout.save' ... OK
  Running 'naomit.R' [2s/3s]
  Running 'nonest.R' [2s/2s]
  Running 'onefac.R' [2s/3s]
  Running 'testthat.R' [4s/4s]
  Running 'verify.R' [2s/3s]
  Running 'weights.R' [2s/2s]
Running the tests in 'tests/anomalies.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > set.seed(42)
  > options(digits=3, warn=1,lfe.threads=1)
  > x <- rnorm(1000)
  > x1 <- rnorm(1000)
  > x2 <- rnorm(1000) 
  > z1 <- rnorm(1000)
  > z2 <- rnorm(1000)
  > Q <- rnorm(1000) 
  > f1 <- sample(8,length(x), repl=T)
  > f2 <- factor(sample(8,length(x), repl=T))
  > clu <- factor(sample(30,length(x), replace=T))
  > cluerr <- rnorm(nlevels(clu))[clu]
  > err <- abs(x)*rnorm(length(x)) + cluerr
  > y <- x +rnorm(nlevels(clu),sd=0.3)[clu] +  log(f1) + err
  > f1 <- factor(f1)
  > dat <- data.frame(y, x, f1=f1, f2, cluster=clu)
  > 
  > # deprecated stuff
  > summary(felm(y ~x + f1+f2, dat, clustervar='clu'))
  Warning: Argument(s) clustervar are deprecated and will be removed, use multipart formula instead
  
  Call:
     felm(formula = y ~ x + f1 + f2, data = dat, clustervar = "clu") 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.834 -1.150 -0.026  1.183  6.311 
  
  Coefficients:
              Estimate Cluster s.e. t value Pr(>|t|)    
  (Intercept)  -0.4610       0.3126   -1.47  0.14057    
  x             0.9198       0.0704   13.06  < 2e-16 ***
  f12           0.5837       0.1674    3.49  0.00051 ***
  f13           0.9914       0.2345    4.23  2.6e-05 ***
  f14           1.3504       0.1756    7.69  3.5e-14 ***
  f15           1.2982       0.1692    7.67  4.1e-14 ***
  f16           1.7813       0.2045    8.71  < 2e-16 ***
  f17           1.9645       0.1492   13.17  < 2e-16 ***
  f18           2.0515       0.1933   10.62  < 2e-16 ***
  f22           0.1926       0.2160    0.89  0.37279    
  f23          -0.0330       0.2465   -0.13  0.89365    
  f24           0.0556       0.2165    0.26  0.79721    
  f25           0.0413       0.2028    0.20  0.83856    
  f26          -0.0217       0.1980   -0.11  0.91283    
  f27           0.1857       0.2218    0.84  0.40277    
  f28           0.1583       0.1977    0.80  0.42362    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.71 on 984 degrees of freedom
  Multiple R-squared(full model): 0.307   Adjusted R-squared: 0.297 
  Multiple R-squared(proj model): 0.307   Adjusted R-squared: 0.297 
  F-statistic(full model, *iid*):29.1 on 15 and 984 DF, p-value: <2e-16 
  F-statistic(proj model): 52.8 on 15 and 29 DF, p-value: <2e-16 
  
  
  > summary(felm(y ~ x + G(f1)+G(f2), dat, clustervar=clu))
  Warning: Argument(s) clustervar are deprecated and will be removed, use multipart formula instead
  Warning in ..oldfelm(formula = y ~ x + G(f1) + G(f2), data = dat, clustervar = clu) :
    Argument(s) clustervar are deprecated and will be removed, use multipart formula instead
  Warning: The G() syntax is deprecated, please use multipart formulas instead
  
  Call:
     ..oldfelm(formula = y ~ x + G(f1) + G(f2), data = dat, clustervar = clu) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.834 -1.150 -0.026  1.183  6.311 
  
  Coefficients:
    Estimate Cluster s.e. t value Pr(>|t|)    
  x   0.9198       0.0704    13.1   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.7 on 985 degrees of freedom
  Multiple R-squared(full model): 0.307   Adjusted R-squared: 0.297 
  F-statistic(full model, *iid*):31.2 on 14 and 985 DF, p-value: <2e-16 
  F-statistic(proj model):  171 on 1 and 29 DF, p-value: 1.12e-13 
  
  
  > summary(felm(y ~ x | f1+f2, dat, clustervar=clu))
  Warning: Argument(s) clustervar are deprecated and will be removed, use multipart formula instead
  
  Call:
     felm(formula = y ~ x | f1 + f2, data = dat, clustervar = clu) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.834 -1.150 -0.026  1.183  6.311 
  
  Coefficients:
    Estimate Cluster s.e. t value Pr(>|t|)    
  x   0.9198       0.0704    13.1   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.71 on 984 degrees of freedom
  Multiple R-squared(full model): 0.307   Adjusted R-squared: 0.297 
  Multiple R-squared(proj model): 0.225   Adjusted R-squared: 0.213 
  F-statistic(full model, *iid*):29.1 on 15 and 984 DF, p-value: <2e-16 
  F-statistic(proj model):  171 on 1 and 29 DF, p-value: 1.12e-13 
  
  
  > 
  > #anomalies. No variables, etc.
  > summary(est <- felm(y ~ 1 | f1|0|cluster, dat))
  
  Call:
     felm(formula = y ~ 1 | f1 | 0 | cluster, data = dat) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -6.706 -1.223  0.012  1.168  9.396 
  
  Coefficients:
  (No coefficients)
  
  
  > fevcov(est)
        f1
  f1 0.401
  attr(,"bias")
         f1
  f1 0.0184
  > summary(felm(y ~ 0 | f1|0|cluster, dat))
  
  Call:
     felm(formula = y ~ 0 | f1 | 0 | cluster, data = dat) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -6.706 -1.223  0.012  1.168  9.396 
  
  Coefficients:
  (No coefficients)
  
  
  > summary(felm(y ~ 0 | 0|0|cluster, dat))
  
  Call:
     felm(formula = y ~ 0 | 0 | 0 | cluster, data = dat) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.825 -0.488  0.833  2.099 10.277 
  
  Coefficients:
  (No coefficients)
  
  
  > 
  > summary(felm(y ~ x + x2|f1+factor(f2),dat))
  
  Call:
     felm(formula = y ~ x + x2 | f1 + factor(f2), data = dat) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.830 -1.143 -0.025  1.184  6.307 
  
  Coefficients:
     Estimate Std. Error t value Pr(>|t|)    
  x    0.9201     0.0545   16.88   <2e-16 ***
  x2   0.0116     0.0529    0.22     0.83    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.71 on 983 degrees of freedom
  Multiple R-squared(full model): 0.307   Adjusted R-squared: 0.296 
  Multiple R-squared(proj model): 0.225   Adjusted R-squared: 0.212 
  F-statistic(full model):27.2 on 16 and 983 DF, p-value: <2e-16 
  F-statistic(proj model):  143 on 2 and 983 DF, p-value: <2e-16 
  
  
  > summary(felm(y ~ x + x2+f1|factor(f2),dat))
  
  Call:
     felm(formula = y ~ x + x2 + f1 | factor(f2), data = dat) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.830 -1.143 -0.025  1.184  6.307 
  
  Coefficients:
      Estimate Std. Error t value Pr(>|t|)    
  x     0.9201     0.0545   16.88  < 2e-16 ***
  x2    0.0116     0.0529    0.22   0.8269    
  f12   0.5837     0.2136    2.73   0.0064 ** 
  f13   0.9923     0.2164    4.59  5.1e-06 ***
  f14   1.3518     0.2123    6.37  2.9e-10 ***
  f15   1.2983     0.2088    6.22  7.4e-10 ***
  f16   1.7815     0.2203    8.09  1.8e-15 ***
  f17   1.9639     0.2196    8.94  < 2e-16 ***
  f18   2.0519     0.2154    9.53  < 2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.71 on 983 degrees of freedom
  Multiple R-squared(full model): 0.307   Adjusted R-squared: 0.296 
  Multiple R-squared(proj model): 0.302   Adjusted R-squared: 0.29 
  F-statistic(full model):27.2 on 16 and 983 DF, p-value: <2e-16 
  F-statistic(proj model): 47.2 on 9 and 983 DF, p-value: <2e-16 
  
  
  > summary(felm(y ~ x + x2+f1+factor(f2),dat))
  
  Call:
     felm(formula = y ~ x + x2 + f1 + factor(f2), data = dat) 
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.830 -1.143 -0.025  1.184  6.307 
  
  Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
  (Intercept)  -0.4598     0.2060   -2.23   0.0258 *  
  x             0.9201     0.0545   16.88  < 2e-16 ***
  x2            0.0116     0.0529    0.22   0.8269    
  f12           0.5837     0.2136    2.73   0.0064 ** 
  f13           0.9923     0.2164    4.59  5.1e-06 ***
  f14           1.3518     0.2123    6.37  2.9e-10 ***
  f15           1.2983     0.2088    6.22  7.4e-10 ***
  f16           1.7815     0.2203    8.09  1.8e-15 ***
  f17           1.9639     0.2196    8.94  < 2e-16 ***
  f18           2.0519     0.2154    9.53  < 2e-16 ***
  factor(f2)2   0.1884     0.2158    0.87   0.3829    
  factor(f2)3  -0.0327     0.2211   -0.15   0.8825    
  factor(f2)4   0.0554     0.2238    0.25   0.8045    
  factor(f2)5   0.0394     0.2137    0.18   0.8538    
  factor(f2)6  -0.0225     0.2214   -0.10   0.9191    
  factor(f2)7   0.1831     0.2163    0.85   0.3974    
  factor(f2)8   0.1561     0.2210    0.71   0.4802    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.71 on 983 degrees of freedom
  Multiple R-squared(full model): 0.307   Adjusted R-squared: 0.296 
  Multiple R-squared(proj model): 0.307   Adjusted R-squared: 0.296 
  F-statistic(full model):27.2 on 16 and 983 DF, p-value: <2e-16 
  F-statistic(proj model): 27.2 on 16 and 983 DF, p-value: <2e-16 
  
  
  > summary(lm(y ~ x + x2 + f1 + factor(f2),dat))
  
  Call:
  lm(formula = y ~ x + x2 + f1 + factor(f2), data = dat)
  
  Residuals:
     Min     1Q Median     3Q    Max 
  -5.830 -1.143 -0.025  1.184  6.307 
  
  Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
  (Intercept)  -0.4598     0.2060   -2.23   0.0258 *  
  x             0.9201     0.0545   16.88  < 2e-16 ***
  x2            0.0116     0.0529    0.22   0.8269    
  f12           0.5837     0.2136    2.73   0.0064 ** 
  f13           0.9923     0.2164    4.59  5.1e-06 ***
  f14           1.3518     0.2123    6.37  2.9e-10 ***
  f15           1.2983     0.2088    6.22  7.4e-10 ***
  f16           1.7815     0.2203    8.09  1.8e-15 ***
  f17           1.9639     0.2196    8.94  < 2e-16 ***
  f18           2.0519     0.2154    9.53  < 2e-16 ***
  factor(f2)2   0.1884     0.2158    0.87   0.3829    
  factor(f2)3  -0.0327     0.2211   -0.15   0.8825    
  factor(f2)4   0.0554     0.2238    0.25   0.8045    
  factor(f2)5   0.0394     0.2137    0.18   0.8538    
  factor(f2)6  -0.0225     0.2214   -0.10   0.9191    
  factor(f2)7   0.1831     0.2163    0.85   0.3974    
  factor(f2)8   0.1561     0.2210    0.71   0.4802    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 1.71 on 983 degrees of freedom
  Multiple R-squared:  0.307,	Adjusted R-squared:  0.296 
  F-statistic: 27.2 on 16 and 983 DF,  p-value: <2e-16
  
  > summary(felm(y ~ x + x2 + f1 |0|0|0|factor(f2)))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'object' in selecting a method for function 'summary': 'data' must be a data.frame, environment, or list
  Calls: summary ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/comparelm.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=2,digits=5,warn=1)
  > set.seed(65318)
  > x <- rnorm(500)
  > x2 <- rnorm(length(x))
  > 
  > ## create individual and firm
  > id <- factor(sample(10,length(x),replace=TRUE))
  > firm <- factor(sample(6,length(x),replace=TRUE,prob=c(2,rep(1,5))))
  > 
  > ## effects
  > id.eff <- rnorm(nlevels(id))
  > firm.eff <- rnorm(nlevels(firm))
  > 
  > ## left hand side
  > y <- x + 0.25*x2 + id.eff[id] + firm.eff[firm] + rnorm(length(x))
  > y2 <- 0.1*x + 0.2*x2 + id.eff[id] + firm.eff[firm] + rnorm(length(x))
  > 
  > ## estimate
  > smry_est <- summary(est <- felm(y ~ x+x2 | id + firm))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'object' in selecting a method for function 'summary': 'data' must be a data.frame, environment, or list
  Calls: summary ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/degenerate.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > set.seed(127)
  > options(lfe.threads=1,warn=1,digits=5)
  > x <- rnorm(2000,mean=2000)
  > x2 <- rnorm(length(x))
  > x3 <- 1.2*x + 0.9*x2 
  > x4 <- 0.8*x2 + 0.3*x3
  > ## create individual and firm
  > id <- factor(sample(12,length(x),replace=TRUE))
  > firm <- factor(sample(7,length(x),replace=TRUE))
  > 
  > # these are constant on the levels
  > x5 <- rnorm(nlevels(id))[id]
  > x6 <- rnorm(nlevels(firm))[firm]
  > ## effects
  > id.eff <- rnorm(nlevels(id))
  > firm.eff <- rnorm(nlevels(firm))
  > 
  > ## left hand side
  > y <- x + 0.25*x2 + 0.5*x3 + 0.17*x4 + 0.8*x5 -0.3*x6 + id.eff[id] + firm.eff[firm] + rnorm(length(x))
  > 
  > ## estimate
  > est <- felm(y ~ x+x2 + x3 + x4 + x5 + x6 | id + firm)
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    'data' must be a data.frame, environment, or list
  Calls: felm ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/efcheck.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > set.seed(65513)
  > options(lfe.threads=1,digits=4,warn=1)
  > x <- rnorm(52)
  > x2 <- rnorm(length(x))
  > x3 <- 0.2*x + 0.1*x2
  > ## create individual and firm
  > id <- factor(sample(30,length(x),prob=c(2,2,rep(1,28)),replace=TRUE))
  > firm <- factor(sample(32,length(x),prob=c(2,2,rep(1,30)),replace=TRUE))
  > year <- factor(sample(3,length(x),replace=TRUE))
  > ## effects
  > id.eff <- rnorm(nlevels(id))
  > firm.eff <- rnorm(nlevels(firm))
  > year.eff <- rnorm(nlevels(year))
  > ## left hand side
  > y <- x + 0.25*x2 + x3 + id.eff[id] + firm.eff[firm] + year.eff[year] + rnorm(length(x))
  > 
  > ## estimate and print result
  > est <- felm(y ~ x+x2+x3 |id+firm+year, exactDOF=TRUE)
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    'data' must be a data.frame, environment, or list
  Calls: felm ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/fourfac.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=2,digits=5,warn=1)
  > set.seed(655320)
  > x <- rnorm(5000,mean=200)
  > x2 <- rnorm(length(x))
  > x3 <- rexp(length(x))
  > ## create individual and firm
  > id <- factor(sample(1500,length(x),replace=TRUE))
  > firm <- factor(sample(1300,length(x),replace=TRUE))
  > shoe <- factor(sample(100,length(x),replace=TRUE))
  > shirt <- factor(sample(100,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 + id.eff[id] + firm.eff[firm] + shoe.eff[shoe] + shirt.eff[shirt] + rnorm(length(x))
  > 
  > ## estimate
  > print(est <- felm(y ~ x+x2 + x3 |id+firm+shoe+shirt))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'x' in selecting a method for function 'print': 'data' must be a data.frame, environment, or list
  Calls: print ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/interact.R' failed.
Complete output:
  > 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))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'object' in selecting a method for function 'summary': 'data' must be a data.frame, environment, or list
  Calls: summary ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/ivtest.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=2,digits=5,warn=1,lfe.eps=1e-5)
  > set.seed(42)
  > x <- rnorm(400)
  > x2 <- rnorm(length(x))
  > 
  > id <- factor(sample(10,length(x),replace=TRUE))
  > firm <- factor(sample(3,length(x),replace=TRUE,prob=c(2,1,1)))
  > id.eff <- rnorm(nlevels(id))
  > firm.eff <- rnorm(nlevels(firm))
  > 
  > ## left hand side
  > u <- rnorm(length(x))
  > x3 <- 0.2*x + 0.3*x2 + rnorm(length(x))
  > x4 <- 0.1*x - 0.2*x2 + rnorm(length(x))
  > Q <- 0.3*x3 + 0.4*x4 + x + 0.2*x2 + id.eff[id] + 0.15*u + rnorm(length(x),sd=0.2)
  > R <- 0.3*x3 + 0.33*x4 + 0.2*x + 0.5*x2 + 0.7*id.eff[id] - 0.11*u + rnorm(length(x),sd=0.2)
  > y <- x + 0.5*x2 + id.eff[id] + firm.eff[firm] + Q + R + u
  > 
  > ## estimate and print result
  > est <- felm(y ~ x+x2 | id+firm |(Q|R~x3+x4))
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    'data' must be a data.frame, environment, or list
  Calls: felm ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/mlhs.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(digits=3,warn=1,lfe.threads=2)
  > set.seed(42)
  > x <- rnorm(100)
  > x2 <- rnorm(length(x))
  > x3 <- rnorm(length(x))
  > id <- factor(sample(10, length(x), replace=TRUE))
  > id.eff <- rnorm(nlevels(id))
  > firm <- factor(sample(10,length(x),replace=TRUE))
  > 
  > y <- x + x2 + x3 + id.eff[id] + rnorm(length(x))
  > z <- x/2 + x2/2 + x3/2 + id.eff[id]/2 + rnorm(length(x))
  > v <- x/3 + x2/2 + x3/2 + id.eff[id]/2 + rnorm(length(x))
  > w <- x/2 + x2/3 + x3/2 + id.eff[id]/3 + rnorm(length(x))
  > 
  > est <- felm(v|w|y|z ~ x+x2+x3|id,keepX=TRUE)
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    'data' must be a data.frame, environment, or list
  Calls: felm ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/naomit.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=2,digits=5,warn=1)
  > set.seed(65318)
  > x <- rnorm(500)
  > x2 <- rnorm(length(x))
  > 
  > ## create individual and firm
  > id <- factor(sample(10,length(x),replace=TRUE))
  > firm <- factor(sample(6,length(x),replace=TRUE,prob=c(2,rep(1,5))))
  > 
  > ## effects
  > id.eff <- rnorm(nlevels(id))
  > firm.eff <- rnorm(nlevels(firm))
  > 
  > ## left hand side
  > y <- x + 0.25*x2 + id.eff[id] + firm.eff[firm] + rnorm(length(x))
  > x[sample(500,20)] <- NA
  > y[sample(500,20)] <- NA
  > ## estimate
  > summary(est <- felm(y ~ x+x2 | id+firm))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'object' in selecting a method for function 'summary': 'data' must be a data.frame, environment, or list
  Calls: summary ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/nonest.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=2,digits=5,warn=1)
  > set.seed(6320)
  > x <- rnorm(1000,mean=200)
  > x2 <- rnorm(length(x))
  > x3 <- rexp(length(x))
  > ## create individual and firm
  > id <- factor(sample(200,length(x),replace=TRUE))
  > firm <- factor(sample(200,length(x),replace=TRUE))
  > shoe <- factor(sample(200,length(x),replace=TRUE))
  > shirt <- factor(sample(200,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 + id.eff[id] + firm.eff[firm] + shoe.eff[shoe] + shirt.eff[shirt] + rnorm(length(x))
  > 
  > ## estimate
  > est <- felm(y ~ x+x2 + x3 | id + firm + shoe + shirt)
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    'data' must be a data.frame, environment, or list
  Calls: felm ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/onefac.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=1,digits=3,warn=1)
  > set.seed(6553)
  > # single fixed effect, special case which we risk destroying when we optimize, so check it
  > x <- rnorm(2000)
  > x2 <- rnorm(length(x))
  > x3 <- rnorm(length(x))
  > ## create individual and firm
  > id <- factor(sample(1500,length(x),replace=TRUE))
  > nlevels(id)
  [1] 1112
  > ## effects
  > id.eff <- rnorm(nlevels(id))
  > 
  > ## left hand side
  > y <- x + 0.25*x2 + 0.5*x3 + id.eff[id] + rnorm(length(x))
  > 
  > ## estimate
  > est <- felm(y ~ x+x2 + x3 |id,keepX=TRUE)
  Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data,  : 
    'data' must be a data.frame, environment, or list
  Calls: felm ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/verify.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=2,digits=5,warn=1)
  > set.seed(655320)
  > x <- rnorm(5000,mean=200)
  > x2 <- rnorm(length(x))
  > x3 <- rexp(length(x))
  > ## create individual and firm
  > id <- factor(sample(1500,length(x),replace=TRUE))
  > firm <- factor(sample(1300,length(x),replace=TRUE))
  > shoe <- factor(sample(100,length(x),replace=TRUE))
  > ## effects
  > id.eff <- rnorm(nlevels(id))
  > firm.eff <- rnorm(nlevels(firm))
  > shoe.eff <- rnorm(nlevels(shoe))
  > ## left hand side
  > y <- x + 0.25*x2 + 0.5*x3 + id.eff[id] + firm.eff[firm] + shoe.eff[shoe] + rnorm(length(x))
  > 
  > ## estimate
  > summary(est <- felm(y ~ x+x2 + x3 | id + firm + shoe))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'object' in selecting a method for function 'summary': 'data' must be a data.frame, environment, or list
  Calls: summary ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted
Running the tests in 'tests/weights.R' failed.
Complete output:
  > library(lfe)
  Loading required package: Matrix
  > options(lfe.threads=1,digits=4)
  > set.seed(42)
  > N <- 1000
  > K <- 40
  > id <- factor(sample(K,N, replace=TRUE))
  > firm <- factor(sample(K,N, replace=TRUE))
  > ideff <- rnorm(nlevels(id))
  > firmeff <- rnorm(nlevels(firm))
  > x <- ideff[id] + rnorm(N)
  > y <- x  + ideff[id] - firmeff[firm] + rnorm(N,sd=2)
  > w <- abs(2*x + ideff[id] + firmeff[firm]) + runif(N,0.2,0.4)
  > 
  > # lm says:
  > summary(lm(y ~ x + id + firm, wei=w))
  
  Call:
  lm(formula = y ~ x + id + firm, weights = w)
  
  Weighted Residuals:
     Min     1Q Median     3Q    Max 
  -13.25  -2.08  -0.04   2.09  12.46 
  
  Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
  (Intercept)   1.8613     0.5201    3.58  0.00036 ***
  x             1.0300     0.0652   15.81  < 2e-16 ***
  id2          -2.6194     0.6439   -4.07  5.2e-05 ***
  id3          -0.6692     0.5403   -1.24  0.21582    
  id4          -1.1415     0.7869   -1.45  0.14721    
  id5          -1.2926     0.6286   -2.06  0.04001 *  
  id6          -0.7207     0.6152   -1.17  0.24171    
  id7          -1.0589     0.6822   -1.55  0.12094    
  id8          -1.2310     0.5789   -2.13  0.03372 *  
  id9          -3.4462     0.5759   -5.98  3.1e-09 ***
  id10         -3.0019     0.5100   -5.89  5.5e-09 ***
  id11         -0.5706     0.6209   -0.92  0.35836    
  id12         -2.2776     0.6920   -3.29  0.00104 ** 
  id13         -2.1031     0.6615   -3.18  0.00153 ** 
  id14         -2.6145     0.5455   -4.79  1.9e-06 ***
  id15         -2.3412     0.7968   -2.94  0.00338 ** 
  id16         -1.8604     0.6498   -2.86  0.00429 ** 
  id17         -1.5416     0.6291   -2.45  0.01446 *  
  id18         -1.6685     0.5805   -2.87  0.00414 ** 
  id19         -1.1447     0.5764   -1.99  0.04733 *  
  id20         -2.1958     0.5652   -3.88  0.00011 ***
  id21         -0.9335     0.5952   -1.57  0.11714    
  id22         -1.9375     0.6889   -2.81  0.00502 ** 
  id23         -2.0967     0.5487   -3.82  0.00014 ***
  id24         -1.7334     0.6376   -2.72  0.00668 ** 
  id25          0.1212     0.5341    0.23  0.82053    
  id26         -0.9601     0.5221   -1.84  0.06623 .  
  id27          0.9065     0.4012    2.26  0.02408 *  
  id28         -3.3619     0.5305   -6.34  3.6e-10 ***
  id29         -1.6277     0.6513   -2.50  0.01262 *  
  id30         -1.3184     0.5657   -2.33  0.02000 *  
  id31         -0.3721     0.4793   -0.78  0.43772    
  id32         -0.7692     0.5913   -1.30  0.19367    
  id33         -1.9824     0.5584   -3.55  0.00040 ***
  id34         -1.9499     0.5507   -3.54  0.00042 ***
  id35          0.0516     0.4764    0.11  0.91377    
  id36          0.1067     0.4759    0.22  0.82266    
  id37         -1.5141     0.5486   -2.76  0.00590 ** 
  id38          0.1908     0.4384    0.44  0.66353    
  id39         -1.6424     0.6727   -2.44  0.01482 *  
  id40         -2.5424     0.6198   -4.10  4.5e-05 ***
  firm2        -0.5050     0.5541   -0.91  0.36227    
  firm3         0.2966     0.5515    0.54  0.59082    
  firm4        -0.7015     0.6011   -1.17  0.24347    
  firm5         0.2912     0.5572    0.52  0.60137    
  firm6        -0.8755     0.5805   -1.51  0.13182    
  firm7         0.8419     0.5328    1.58  0.11442    
  firm8        -0.7795     0.5421   -1.44  0.15077    
  firm9        -1.2168     0.5727   -2.12  0.03387 *  
  firm10       -0.3212     0.5286   -0.61  0.54355    
  firm11       -1.2400     0.6150   -2.02  0.04407 *  
  firm12       -2.0502     0.4703   -4.36  1.5e-05 ***
  firm13       -1.5565     0.5272   -2.95  0.00323 ** 
  firm14       -2.1253     0.5368   -3.96  8.1e-05 ***
  firm15        0.2583     0.5686    0.45  0.64980    
  firm16        0.3063     0.6257    0.49  0.62451    
  firm17       -1.5812     0.6148   -2.57  0.01028 *  
  firm18       -0.6810     0.5711   -1.19  0.23341    
  firm19       -3.6899     0.5144   -7.17  1.5e-12 ***
  firm20        2.7891     0.5887    4.74  2.5e-06 ***
  firm21       -0.1260     0.5829   -0.22  0.82886    
  firm22       -1.9048     0.5790   -3.29  0.00104 ** 
  firm23        1.0813     0.5574    1.94  0.05273 .  
  firm24        0.0336     0.6337    0.05  0.95775    
  firm25       -0.2585     0.5185   -0.50  0.61818    
  firm26        0.9889     0.5502    1.80  0.07261 .  
  firm27        0.5730     0.5260    1.09  0.27626    
  firm28       -0.4654     0.4999   -0.93  0.35211    
  firm29       -1.5603     0.5732   -2.72  0.00661 ** 
  firm30        0.9660     0.5754    1.68  0.09355 .  
  firm31       -1.6254     0.5390   -3.02  0.00264 ** 
  firm32       -1.9788     0.5383   -3.68  0.00025 ***
  firm33        0.8544     0.5666    1.51  0.13191    
  firm34        1.9429     0.5533    3.51  0.00047 ***
  firm35       -0.3309     0.5302   -0.62  0.53270    
  firm36       -0.7887     0.6232   -1.27  0.20595    
  firm37       -1.7940     0.5364   -3.34  0.00086 ***
  firm38        0.7225     0.5934    1.22  0.22373    
  firm39       -1.2620     0.5646   -2.24  0.02565 *  
  firm40       -0.8222     0.6186   -1.33  0.18409    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 3.69 on 920 degrees of freedom
  Multiple R-squared:  0.703,	Adjusted R-squared:  0.677 
  F-statistic: 27.6 on 79 and 920 DF,  p-value: <2e-16
  
  > # felm w/o projection says
  > summary(felm(y ~ x + id + firm, wei=w))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'object' in selecting a method for function 'summary': 'data' must be a data.frame, environment, or list
  Calls: summary ... model.frame.Formula -> model.frame -> model.frame.default
  Execution halted